protected override void OnDispose() { if (valueRadioBox != null) { BindingOperations.ClearAllBindings(valueRadioBox); } valueRadioBox = null; }
public override void OnApplyTemplate() { base.OnApplyTemplate(); ValueRadioBox = GetTemplateChild <EnumRadioBox>("PART_valueRadioBox"); ValueRadioBox.Value = this.Value; BindingHelper.SetBinding( this, ValueProperty, ValueRadioBox, EnumRadioBox.ValueProperty); }
public override void OnApplyTemplate() { base.OnApplyTemplate(); valueRadioBox = GetTemplateChild <EnumRadioBox>("PART_valueRadioBox"); if (this.IsStable) { valueRadioBox.Value = this.Value; } else { valueRadioBox.IsEmpty = true; } BindingHelper.SetBinding( this, ValueProperty, valueRadioBox, EnumRadioBox.ValueProperty); }
protected override void OnDispose() { ValueRadioBox = null; }