using System.ComponentModel.Composition; using System.Windows; using Infrastructure; namespace Modules.Robot { /// /// RobotView.xaml 的交互逻辑 /// [ViewExport(RegionName = "RobotRegion"), PartCreationPolicy(CreationPolicy.NonShared)] public partial class RobotView { public RobotView() { this.InitializeComponent(); } [Import] private RobotViewModel ViewModel { get { return this.DataContext as RobotViewModel; } set { this.DataContext = value; } } private void btnStart_Click(object sender, RoutedEventArgs e) { ViewModel.Start(); } private void tbLog_TextChanged(object sender, System.Windows.Controls.TextChangedEventArgs e) { tbLog.ScrollToEnd(); } } }