XAML build error on VB.NET project with controls from external DLL
I'm trying to migrate a WPF Application based on C# to ide开发者_开发知识库ntical project but based writed in VB.NET.
I have some problem with XAML Window.
The Window have some reference from external dll controls. For example:
<Window x:Class="Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:menus="clr-namespace:My.Frame.UI.WPF;assembly=My.Frame.UI.WPF.Menus">
<DockPanel
LastChildFill="True">
<StackPanel
DockPanel.Dock="Top"
Style="{DynamicResource ToolbarStackPanel}">
<menus:MenuFullMaintenance />
<TextBox Name="Test02"/>
</StackPanel>
</DockPanel>
</Window>
if I build solution with this xaml, it's works correctly. But, if I write:
<menus:MenuFullMaintenance Name="Test01" />
I have this error message: "Error 8 Type 'My.Frame.UI.WPF.MenuFullMaintenance' is not defined. (Window1.g.vb)"
The "Name" property raise this exception...why? How can fix it?
I solve. The problem was the root namespace on project properties.
Now I leave it empty and the application works correctly.
精彩评论