示例#1
0
 protected internal void SetParentTabControl(BetterTabControl parentTabControl)
 {
     SetValue(ParentTabControlProperty, parentTabControl);
     settingFromParent = true;
     if (!selectedBackgroundSetManually && parentTabControl != null)
     {
         SelectedBackground = parentTabControl.SelectedTabBackgroundColor;
     }
     if (!selectedForegroundSetManually && parentTabControl != null)
     {
         SelectedForeground = parentTabControl.SelectedTabTextColor;
     }
     if (!mouseOverBackgroundSetManually && parentTabControl != null)
     {
         MouseOverBackground = parentTabControl.MouseOverTabBackgroundColor;
     }
     if (mouseOverForegroundSetManually && parentTabControl != null)
     {
         MouseOverForeground = parentTabControl.MouseOverTabTextColor;
     }
     if (!backgroundSetManually && parentTabControl != null)
     {
         Background = parentTabControl.TabBackgroundColor;
     }
     if (!foregroundSetManually && parentTabControl != null)
     {
         Foreground = parentTabControl.TabTextColor;
     }
 }
示例#2
0
 protected void OnParentTabControlChanged(BetterTabControl oldValue, BetterTabControl newValue)
 {
     ParentTabControlChanged?.Invoke(this, new DependencyPropertyChangedEventArgs(ParentTabControlProperty, oldValue, newValue));
     NotifyPropertyChanged(nameof(ParentTabControl));
 }