Yet another issue....XamlReader.Load
first off, below works...
layoutroot.children.clear();layoutroot.children.add(xamlreader.load("<textblock xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" text=\"testblock has been added!\" />".tostring()) as uielement);
but when try:
layoutroot.children.clear();layoutroot.children.add(xamlreader.load(@"<liquidmenu:mainmenu x:name=""filemenu"" itemselected=""testmenu_itemselected"" height=""30"" width=""987"" d:layoutoverrides=""width, height, verticalmargin"" xmlns=""http://schemas.microsoft.com/client/2007"" xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml""><liquidmenu:mainmenu.items xmlns=""http://schemas.microsoft.com/client/2007"" xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml""></liquidmenu:mainmenu.items></liquidmenu:mainmenu>".tostring()) as uielement);
vs2008 starts throwing: "xamlparseexception - undeclared prefix"
i thought adding xmlns=""http://schemas.microsoft.com/client/2007"" xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml would work (as see hasn't... if please explain why isn't working , how correct appreciate it..thanks! joe
you need add xmlns of custom controls in xaml such liquidmenu.
Silverlight > Getting Started with Silverlight
Comments
Post a Comment