04 2011 档案
摘要:1.在UserControl控件中加入一个ElementHost控件。2.添加后台代码: protected override void OnLoad(EventArgs e) { base.OnLoad(e); if(!DesignMode) { _WPFUserControl = new WpfUserControlLib.UserControl1(); elementHost1.Child = _WPFUserControl; } }
阅读全文
摘要:1.GridControl绑定XML文件方法 XmlDataProvider xmlProvider = new XmlDataProvider(); xmlProvider.IsAsynchronous = true; xmlProvider.Document = new System.Xml.XmlDocument(); xmlProvider.Document.Load(Environment.CurrentDirectory + @"\demo.xml"); dataGrid1.ItemsSource = xmlProvider.Document;2.DataSet
阅读全文