Пример #1
0
 private void SetupNamesEditor(NamesEditor namesEditor, string buttonCaption, RoutedEventHandler routedEventHandler, string toolTip)
 {
     namesEditor.AddButtonCaption.Text = buttonCaption;
     namesEditor.AddButton.ToolTip     = toolTip;
     // Remove existing handler if present (NB: -= should never crash)
     namesEditor.AddButton.Click    -= routedEventHandler;
     namesEditor.AddButton.Click    += routedEventHandler;
     namesEditor.AddButton.IsEnabled = false;
 }
Пример #2
0
 private void LoadNamesEditor(NamesEditor namesEditor, ObservableCollection <TextualProperty> data)
 {
     namesEditor.AddButton.IsEnabled    = data != null;
     namesEditor.NamesModel.ListOfNames = data;
 }