private static void SeletedIndexOnChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { TabButton Con = (TabButton)sender; int NewValue = (int)e.NewValue; if (NewValue == Con.TabIndex) { Con.Button.Foreground = Con.Resources["SeletedForeground"] as SolidColorBrush; } else { Con.Button.Foreground = Con.UsualForeground; } }
private static void TextOnChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { TabButton Con = (TabButton)sender; Con.TextControl.Text = e.NewValue as string; }
private static void IconOnChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { TabButton Con = (TabButton)sender; Con.IconControl.Content = e.NewValue; }