locked
"Cannot craete instance" for subclass of empty parent class RRS feed

  • Question

  • I am newly trying to open a project in Blend (3) but not all UserControls show up. One problem I have is this:
    I have a parent class the XAML code of which is empty (it is mainly used for the code beind). It consequently appears as empty. However, when I want to display any of the derived user controls they say: "Cannot create an instance of "CboSel". What is wrong?

    My parent class looks like this in XAML:

    <UserControl x:Class="WLP.CboSel"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        Width="400" Height="300">
    </UserControl>

    All my derived classes look at the beginning something like this: 

     

    <local:CboSel x:Class="WLP.CboSelDat"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:local="clr-namespace:WLP"
        Width="97" Height="Auto" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" xmlns:WLP_WLPServiceReference="clr-namespace:WLP.WLPServiceReference">
        <Grid x:Name="LayoutRoot" Opacity="1">
            <Grid.RowDefinitions>
    Any Idea why it does not work?
    Thanks for help!
    Thursday, October 1, 2009 8:37 AM

All replies

  • Can you please share out a small project repro for this?

    Thanks,
    Unni
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Thursday, October 1, 2009 7:34 PM