using Aucma.Scada.UI.ViewModel; using System.Windows.Controls; namespace Aucma.Scada.UI { /// /// RecordControl.xaml 的交互逻辑 /// public partial class RecordControl : UserControl { public RecordControl() { InitializeComponent(); RecordViewModel ViewModel = new RecordViewModel(); ViewModel.Query(); //上下文绑定 this.DataContext = ViewModel; } } }