예제 #1
0
        private void EditControl_Loaded(object sender, RoutedEventArgs e)
        {
            // TODO: Use ServiceProvider etc. instead of Load-event.
            this.Loaded -= EditControl_Loaded;

            _viewModel = ((MainWindowViewModel)this.DataContext).ParserDefinition;
            this.DataContext = _viewModel;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="SectionDefinitionViewModel"/> class.
 /// </summary>
 /// <param name="parent">The parent.</param>
 public SectionDefinitionViewModel(ParserDefinitionViewModel parent)
     : this()
 {
     Assertions.AssertNotNull(parent, "parent");
     _parent = parent;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="MainWindowViewModel"/> class.
 /// </summary>
 public MainWindowViewModel()
 {
     ParserDefinition = new ParserDefinitionViewModel();
 }