Quantcast
Channel: Tools for Windows Store apps forum
Viewing all articles
Browse latest Browse all 1019

Invalid Markup Error in VS 2012 with custom generic class

$
0
0
I'm using VS 2012 on Win8 Release  Preview. I get the following errors whenever I open the below XAML file. The Designer window displays the error "Invalid Markup". And the error list contains the following errors.

1) The name "ViewBase" does not exist in the namespace "clr-namespace:MyViewBaseClassExample;assembly=GenericViewBaseClass".

2) The property "TypeArguments" does not exist in the "http://schemas.microsoft.com/winfx/2006/xaml" namespace

XAML file:

<local:ViewBase x:Class="ViewBaseClassExample.Color"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:MyViewBaseClassExample;assembly=GenericViewBaseClass"
             x:TypeArguments="local:ColorData"
             mc:Ignorable="d"
             d:DesignHeight="65" d:DesignWidth="300">
    <Grid Height="100">
        <local:MySelectionUserControl x:Name="ColorFeature"/>
    </Grid>
</local:ViewBase>

The code behind:

    public partial class Color : ViewBase<ColorData>
    {
        public Color()
        {
            InitializeComponent();
        }
    }

The code compiles and runs fine, but I can't see the control UI in designer. Strangely this works fine in VS 2010.

Viewing all articles
Browse latest Browse all 1019

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>