//从外部文件中加载 Button控件
public void LoadEmbeddedXaml2()
{
XmlTextReader xmlreader = new XmlTextReader("d:\\a.xaml");
UIElement obj = XamlReader.Load(xmlreader) as UIElement;
grid1.Children.Add((UIElement)obj);
}
//从外部文件中加载 Button控件
public void LoadEmbeddedXaml2()
{
XmlTextReader xmlreader = new XmlTextReader("d:\\a.xaml");
UIElement obj = XamlReader.Load(xmlreader) as UIElement;
grid1.Children.Add((UIElement)obj);
}