diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs index e6f685535..cdf2248a6 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml.cs @@ -17,14 +17,17 @@ using Tango.DragAndDrop; using Tango.MachineStudio.Developer.Converters; using Tango.MachineStudio.Developer.ViewModels; using System.Windows.Threading; +using Tango.SharedUI; namespace Tango.MachineStudio.Developer.Views { /// <summary> /// Interaction logic for MainView.xaml /// </summary> - public partial class MainView : UserControl + public partial class MainView : UserControl, IMainView { + public static MainView Self { get; set; } + private MainViewVM _vm; private DispatcherTimer _jobBrushTimer; @@ -36,14 +39,19 @@ namespace Tango.MachineStudio.Developer.Views public static readonly DependencyProperty DraggingSurfaceProperty = DependencyProperty.Register("DraggingSurface", typeof(DraggingSurface), typeof(MainView), new PropertyMetadata(null)); + public event EventHandler<IView> ViewAttached; + public MainView() { + Self = this; + InitializeComponent(); DraggingSurface = draggingSurface; this.Loaded += (x, y) => { _vm = DataContext as MainViewVM; + ViewAttached?.Invoke(this, this); }; chkGraphs.Checked += (x, y) => { graphRowDefinition.Height = new GridLength(440, GridUnitType.Pixel); }; |
