Hi,
I created a usercontrol with a Grid.
With the schema i can load a instance of this usercontrol onto the new usercontrol
Next I load a button onto this
When I now set the name property, the error
"Warning 1 Cannot set Name attribute value 'Btn1' on element 'Button'. 'Button' is under the scope of element 'TestUserControl', which already had a name registered when it was defined in another scope. Line 7 Position 21. .......\NdsPropSections\TestContainer.xaml 7 21 NdsPropSections"
I read something about namescopes but that were old items from jan 2008, I would like to know if there is a simple solution so that i can use the xaml designer to create by base controls and my container controls.....
I created a usercontrol with a Grid.
<UserControl x:Class="TestUserControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="300" Height="300"><Grid Name="MainGrid" Background="Red" ></Grid></UserControl>
Next I created another Project and referenced the dll where this usercontrol is in.<UserControl x:Class="TestContainer"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:nds="http://schemas.test.eu/BaseElements"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="300" Height="300"><Grid><nds:TestUserControl><Button Name="Btn1"></Button></nds:TestUserControl></Grid></UserControl>
With the schema i can load a instance of this usercontrol onto the new usercontrol
Next I load a button onto this
When I now set the name property, the error
"Warning 1 Cannot set Name attribute value 'Btn1' on element 'Button'. 'Button' is under the scope of element 'TestUserControl', which already had a name registered when it was defined in another scope. Line 7 Position 21. .......\NdsPropSections\TestContainer.xaml 7 21 NdsPropSections"
I read something about namescopes but that were old items from jan 2008, I would like to know if there is a simple solution so that i can use the xaml designer to create by base controls and my container controls.....