public override void OnApplyTemplate() { if (SwitchRendererControl != null) { SwitchRendererControl.LayerRendererChanged -= SwitchRendererControl_LayerRendererChanged; SwitchRendererControl.LayerRendererAttributeChanged -= SwitchRendererControl_LayerRendererAttributeChanged; } if (SymbolConfigControl != null) { SymbolConfigControl.SymbolModified -= SymbolConfigControl_SymbolModified; } if (GraphicSymbolsTakePrecedence != null) { GraphicSymbolsTakePrecedence.Checked -= GraphicSymbolsTakePrecedence_Checked; GraphicSymbolsTakePrecedence.Unchecked -= GraphicSymbolsTakePrecedence_Checked; } base.OnApplyTemplate(); SwitchRendererControl = GetTemplateChild(PART_SWITCHRENDERERCONTROL) as SwitchRendererControl; if (SwitchRendererControl != null) { SwitchRendererControl.LayerRendererChanged += SwitchRendererControl_LayerRendererChanged; SwitchRendererControl.LayerRendererAttributeChanged += SwitchRendererControl_LayerRendererAttributeChanged; } RendererOptionsContainerBorder = GetTemplateChild(PART_RENDEREROPTIONSCONTAINERBORDER) as Border; RendererOptionsContainerControl = GetTemplateChild(PART_RENDEREROPTIONSCONTAINERCONTROL) as ContentControl; RendererSymbolSetContainerControl = GetTemplateChild(PART_RENDERERSYMBOLSETCONTAINERCONTROL) as ContentControl; SymbolConfigControl = GetTemplateChild(PART_SYMBOLCONFIGCONTROL) as SymbolConfigControl; if (SymbolConfigControl != null) { SymbolConfigControl.SymbolModified += SymbolConfigControl_SymbolModified; } CurrentSymbolLabel = GetTemplateChild(PART_CURRENTSYMBOLLABEL) as TextBlock; GraphicSymbolsTakePrecedence = GetTemplateChild(PART_GraphicSymbolsTakePrecedence) as CheckBox; if (GraphicSymbolsTakePrecedence != null) { GraphicSymbolsTakePrecedence.Checked += GraphicSymbolsTakePrecedence_Checked; GraphicSymbolsTakePrecedence.Unchecked += GraphicSymbolsTakePrecedence_Checked; } bindUIToLayer(); if (InitCompleted != null) { InitCompleted(this, EventArgs.Empty); } }
public override void OnApplyTemplate() { if (SwitchRendererControl != null) { SwitchRendererControl.LayerRendererChanged -= SwitchRendererControl_LayerRendererChanged; SwitchRendererControl.LayerRendererAttributeChanged -= SwitchRendererControl_LayerRendererAttributeChanged; } if (SymbolConfigControl != null) SymbolConfigControl.SymbolModified -= SymbolConfigControl_SymbolModified; if (GraphicSymbolsTakePrecedence != null) { GraphicSymbolsTakePrecedence.Checked -= GraphicSymbolsTakePrecedence_Checked; GraphicSymbolsTakePrecedence.Unchecked -= GraphicSymbolsTakePrecedence_Checked; } base.OnApplyTemplate(); SwitchRendererControl = GetTemplateChild(PART_SWITCHRENDERERCONTROL) as SwitchRendererControl; if (SwitchRendererControl != null) { SwitchRendererControl.LayerRendererChanged += SwitchRendererControl_LayerRendererChanged; SwitchRendererControl.LayerRendererAttributeChanged += SwitchRendererControl_LayerRendererAttributeChanged; } RendererOptionsContainerBorder = GetTemplateChild(PART_RENDEREROPTIONSCONTAINERBORDER) as Border; RendererOptionsContainerControl = GetTemplateChild(PART_RENDEREROPTIONSCONTAINERCONTROL) as ContentControl; RendererSymbolSetContainerControl = GetTemplateChild(PART_RENDERERSYMBOLSETCONTAINERCONTROL) as ContentControl; SymbolConfigControl = GetTemplateChild(PART_SYMBOLCONFIGCONTROL) as SymbolConfigControl; if(SymbolConfigControl != null) SymbolConfigControl.SymbolModified += SymbolConfigControl_SymbolModified; CurrentSymbolLabel = GetTemplateChild(PART_CURRENTSYMBOLLABEL) as TextBlock; GraphicSymbolsTakePrecedence = GetTemplateChild(PART_GraphicSymbolsTakePrecedence) as CheckBox; if (GraphicSymbolsTakePrecedence != null) { GraphicSymbolsTakePrecedence.Checked += GraphicSymbolsTakePrecedence_Checked; GraphicSymbolsTakePrecedence.Unchecked += GraphicSymbolsTakePrecedence_Checked; } bindUIToLayer(); if (InitCompleted != null) InitCompleted(this, EventArgs.Empty); }
public override void OnApplyTemplate() { if (UniqueValueConfigItems != null) UniqueValueConfigItems.SelectionChanged -= UniqueValueConfigItems_SelectionChanged; if (ValueTextBox != null) ValueTextBox.TextChanged -= ValueTextBox_TextChanged; if (AddUniqueValueButton != null) AddUniqueValueButton.Click -= AddUniqueValueButton_Click; if (DeleteUniqueValueButton != null) DeleteUniqueValueButton.Click -= DeleteUniqueValueButton_Click; if (PreviousUniqueValueButton != null) PreviousUniqueValueButton.Click -= PreviousUniqueValueButton_Click; if (NextUniqueValueButton != null) NextUniqueValueButton.Click -= NextUniqueValueButton_Click; base.OnApplyTemplate(); UniqueValueConfigItems = GetTemplateChild(PART_UNIQUEVALUECONFIGITEMS) as ListBox; if(UniqueValueConfigItems != null) UniqueValueConfigItems.SelectionChanged += UniqueValueConfigItems_SelectionChanged; AddUniqueValueButton = GetTemplateChild(PART_ADDUNIQUEVALUEBUTTON) as Button; if (AddUniqueValueButton != null) AddUniqueValueButton.Click += AddUniqueValueButton_Click; DeleteUniqueValueButton = GetTemplateChild(PART_DELETEUNIQUEVALUEBUTTON) as Button; if (DeleteUniqueValueButton != null) DeleteUniqueValueButton.Click += DeleteUniqueValueButton_Click; PreviousUniqueValueButton = GetTemplateChild(PART_PREVIOUSUNIQUEVALUEBUTTON) as Button; if (PreviousUniqueValueButton != null) PreviousUniqueValueButton.Click += PreviousUniqueValueButton_Click; NextUniqueValueButton = GetTemplateChild(PART_NEXTUNIQUEVALUEBUTTON) as Button; if (NextUniqueValueButton != null) NextUniqueValueButton.Click += NextUniqueValueButton_Click; SymbolConfigControl = GetTemplateChild(PART_SYMBOLCONFIGCONTROL) as SymbolConfigControl; ValueTextBox = GetTemplateChild(PART_VALUETEXTBOX) as TextBox; bindList(); }
public override void OnApplyTemplate() { if (ClassBreakConfigItems != null) { ClassBreakConfigItems.SelectionChanged -= ClassBreakConfigItems_SelectionChanged; } if (MinTextBox != null) { MinTextBox.TextChanged -= MinTextBox_TextChanged; } if (MaxTextBox != null) { MaxTextBox.TextChanged -= MaxTextBox_TextChanged; } if (AddRangeButton != null) { AddRangeButton.Click -= AddRangeButton_Click; } if (DeleteRangeButton != null) { DeleteRangeButton.Click -= DeleteRangeButton_Click; } if (PreviousRangeButton != null) { PreviousRangeButton.Click -= PreviousRangeButton_Click; } if (NextRangeButton != null) { NextRangeButton.Click -= NextRangeButton_Click; } base.OnApplyTemplate(); ClassBreakConfigItems = GetTemplateChild(PART_CLASSBREAKSCONFIGITEMS) as ListBox; if (ClassBreakConfigItems != null) { ClassBreakConfigItems.SelectionChanged += ClassBreakConfigItems_SelectionChanged; } MinTextBox = GetTemplateChild(PART_MINTEXTBOX) as TextBox; if (MinTextBox != null) { MinTextBox.TextChanged += MinTextBox_TextChanged; } MaxTextBox = GetTemplateChild(PART_MAXTEXTBOX) as TextBox; if (MaxTextBox != null) { MaxTextBox.TextChanged += MaxTextBox_TextChanged; } AddRangeButton = GetTemplateChild(PART_ADDRANGEBUTTON) as Button; if (AddRangeButton != null) { AddRangeButton.Click += AddRangeButton_Click; } DeleteRangeButton = GetTemplateChild(PART_DELETERANGEBUTTON) as Button; if (DeleteRangeButton != null) { DeleteRangeButton.Click += DeleteRangeButton_Click; } PreviousRangeButton = GetTemplateChild(PART_PREVIOUSRANGEBUTTON) as Button; if (PreviousRangeButton != null) { PreviousRangeButton.Click += PreviousRangeButton_Click; } NextRangeButton = GetTemplateChild(PART_NEXTRANGEBUTTON) as Button; if (NextRangeButton != null) { NextRangeButton.Click += NextRangeButton_Click; } SymbolConfigControl = GetTemplateChild(PART_SYMBOLCONFIGCONTROL) as SymbolConfigControl; bindList(); }
public override void OnApplyTemplate() { if (UniqueValueConfigItems != null) { UniqueValueConfigItems.SelectionChanged -= UniqueValueConfigItems_SelectionChanged; } if (ValueTextBox != null) { ValueTextBox.TextChanged -= ValueTextBox_TextChanged; } if (AddUniqueValueButton != null) { AddUniqueValueButton.Click -= AddUniqueValueButton_Click; } if (DeleteUniqueValueButton != null) { DeleteUniqueValueButton.Click -= DeleteUniqueValueButton_Click; } if (PreviousUniqueValueButton != null) { PreviousUniqueValueButton.Click -= PreviousUniqueValueButton_Click; } if (NextUniqueValueButton != null) { NextUniqueValueButton.Click -= NextUniqueValueButton_Click; } base.OnApplyTemplate(); UniqueValueConfigItems = GetTemplateChild(PART_UNIQUEVALUECONFIGITEMS) as ListBox; if (UniqueValueConfigItems != null) { UniqueValueConfigItems.SelectionChanged += UniqueValueConfigItems_SelectionChanged; } AddUniqueValueButton = GetTemplateChild(PART_ADDUNIQUEVALUEBUTTON) as Button; if (AddUniqueValueButton != null) { AddUniqueValueButton.Click += AddUniqueValueButton_Click; } DeleteUniqueValueButton = GetTemplateChild(PART_DELETEUNIQUEVALUEBUTTON) as Button; if (DeleteUniqueValueButton != null) { DeleteUniqueValueButton.Click += DeleteUniqueValueButton_Click; } PreviousUniqueValueButton = GetTemplateChild(PART_PREVIOUSUNIQUEVALUEBUTTON) as Button; if (PreviousUniqueValueButton != null) { PreviousUniqueValueButton.Click += PreviousUniqueValueButton_Click; } NextUniqueValueButton = GetTemplateChild(PART_NEXTUNIQUEVALUEBUTTON) as Button; if (NextUniqueValueButton != null) { NextUniqueValueButton.Click += NextUniqueValueButton_Click; } SymbolConfigControl = GetTemplateChild(PART_SYMBOLCONFIGCONTROL) as SymbolConfigControl; ValueTextBox = GetTemplateChild(PART_VALUETEXTBOX) as TextBox; bindList(); }
public override void OnApplyTemplate() { if(ClassBreakConfigItems != null) ClassBreakConfigItems.SelectionChanged -= ClassBreakConfigItems_SelectionChanged; if(MinTextBox != null) MinTextBox.TextChanged -= MinTextBox_TextChanged; if(MaxTextBox != null) MaxTextBox.TextChanged -= MaxTextBox_TextChanged; if(AddRangeButton != null) AddRangeButton.Click -= AddRangeButton_Click; if(DeleteRangeButton != null) DeleteRangeButton.Click -= DeleteRangeButton_Click; if(PreviousRangeButton != null) PreviousRangeButton.Click -= PreviousRangeButton_Click; if(NextRangeButton != null) NextRangeButton.Click -= NextRangeButton_Click; base.OnApplyTemplate(); ClassBreakConfigItems = GetTemplateChild(PART_CLASSBREAKSCONFIGITEMS) as ListBox; if (ClassBreakConfigItems != null) ClassBreakConfigItems.SelectionChanged += ClassBreakConfigItems_SelectionChanged; MinTextBox = GetTemplateChild(PART_MINTEXTBOX) as TextBox; if (MinTextBox != null) MinTextBox.TextChanged += MinTextBox_TextChanged; MaxTextBox = GetTemplateChild(PART_MAXTEXTBOX) as TextBox; if (MaxTextBox != null) MaxTextBox.TextChanged += MaxTextBox_TextChanged; AddRangeButton = GetTemplateChild(PART_ADDRANGEBUTTON) as Button; if (AddRangeButton != null) AddRangeButton.Click += AddRangeButton_Click; DeleteRangeButton = GetTemplateChild(PART_DELETERANGEBUTTON) as Button; if (DeleteRangeButton != null) DeleteRangeButton.Click += DeleteRangeButton_Click; PreviousRangeButton = GetTemplateChild(PART_PREVIOUSRANGEBUTTON) as Button; if (PreviousRangeButton != null) PreviousRangeButton.Click += PreviousRangeButton_Click; NextRangeButton = GetTemplateChild(PART_NEXTRANGEBUTTON) as Button; if (NextRangeButton != null) NextRangeButton.Click += NextRangeButton_Click; SymbolConfigControl = GetTemplateChild(PART_SYMBOLCONFIGCONTROL) as SymbolConfigControl; bindList(); }
/// <summary> /// SymbolProperty property changed handler. /// </summary> /// <param name="d">SymbolConfigRibbonControl that changed its Symbol.</param> /// <param name="e">Event arguments.</param> private static void OnSymbolPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { SymbolConfigControl source = d as SymbolConfigControl; source.bindUIToSymbol(); }