原文:
ResourceManager resManagerA = new ResourceManager("cn.qssq666.Properties.Resources", typeof(cn.ijiami.keyboard.Properties.Resources).Assembly); string astring = resManagerA.GetString("axml_test"); LogUtil.writeLog("xaml字符串 "+astring); MemoryStream stream = new MemoryStream(System.Text.Encoding.Default.GetBytes(astring)); DependencyObject element =(DependencyObject) XamlReader.Load(stream); Button buttonXaml= LogicalTreeHelper.FindLogicalNode(element, "button1") as Button; DockPanel dockPanel = LogicalTreeHelper.FindLogicalNode(element, "dock_panel") as DockPanel;
posted on 2019-04-10 11:52 阅读( ...) 评论( ...)