Задайте вопросЗадайте вопрос
 

ОтвеченоCustom Root Element

  • 15 августа 2006 г. 14:37mkfl Медали пользователяМедали пользователяМедали пользователяМедали пользователяМедали пользователя
     

    I have a page class (PageRadioWide) in which I want to inherit from UiPageFeature but I'm getting the following error:

    PageRadioWide.xaml(2,5): error MC3074: The tag 'UiPageFeature' does not exist in XML namespace 'clr-namespace:ACPUi'. Line 2 Position 5.

    Can anyone provide some assistance? Thanks in advance.

    Here's some additional information:

    XAML File:

    <MyACPUiNS:UiPageFeature

    x:Class="ACPUiTempTestApp.PageRadioWide"

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    xmlns:MyACPUiNS="clr-namespace:ACPUi"

    xmlns:ACPUiNS="clr-namespace:ACPUi;assembly=ACPUi"

    xmlns:ACPUiTempTestAppNS="clr-namespace:ACPUiTempTestApp"

    Title="PageRadioWide"

    >

    Code-Behind File:

    public partial class PageRadioWide : ACPUi.UiPageFeature

    Generated g.cs File:

    public partial class PageRadioWide : ACPUi.UiPageFeature

    ACPUi Namespace:

    namespace ACPUi

    {

    /// <summary>

    /// Interaction logic for UiPageFeature.xaml

    /// </summary>

    public partial class UiPageFeature : System.Windows.Controls.Page

    {

     

Ответы

  • 15 августа 2006 г. 18:28mkfl Медали пользователяМедали пользователяМедали пользователяМедали пользователяМедали пользователя
     Отвечено

    mmm interesting I just ran across this post: "Inheriting from inherited user control"

    "...

    But then I get: "Error 7 'MyBaseUserControl' cannot be the root of a XAML file because it was defined using XAML."

    I can get it working if I convert it to a CustomControl (no xaml definition), but I loose the declarative inheritance.... mmm... I suppose I still can use templates and styles to reach that.

    Is this a XAML "design decision"?"

    ..so I changed my Custom Page from a WinFx Page file (XAML) to a Class file  (no XAML) and it seems to compile now but I guess I can't do any XAML coding in my Custom Page.

Все ответы