silverlight和wpf中暴露 给子类override

时间:2023-03-09 20:21:13
silverlight和wpf中暴露 给子类override
 protected virtual void OnSelectionChanged(SelectionChangedEventArgs args)
{
}
  public TestTabControl()
{
KeyEventHandler handler = null;
SelectionChangedEventHandler handler2 = null;
this._updateIndex = true;
this.SelectedIndex = -; if (handler == null)
{
handler = (sender, e) => this.OnKeyDown(e);
}
base.KeyDown += handler; //make child can override SelectionChanged event
if (handler2 == null)
{
handler2 = (sender, e) => this.OnSelectionChanged(e);
}
this.SelectionChanged += handler2; base.IsEnabledChanged += new DependencyPropertyChangedEventHandler(this.OnIsEnabledChanged);
base.DefaultStyleKey = typeof(TestTabControl); }