Beispiel #1
0
        void comboEdit_SelectedIndexChanged(object sender, System.Windows.RoutedEventArgs e)
        {
            var data = DataContext as DataControlPageViewModel;

            if (data == null)
            {
                return;
            }

            // please react finally on SelectedObject change!!
            DataControlPageViewModel.OnChanged(data, data.SelectedObject);
        }
Beispiel #2
0
        public void OnFinishedLoad()
        {
            CodeEdit   = this.codeEdit;
            CodeViewer = this.code;
            CodeViewer.Bind(this);

            var data = this.DataContext as DataControlPageViewModel;

            if (data != null && DataControlPageViewModel.OnChanged != null)
            {
                DataControlPageViewModel.OnChanged(data, data.SelectedObject);   // Lazy init
            }
        }