Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add font setters to TabControl styles
- Loading branch information
Showing
4 changed files
with
65 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
using ModernWpf.Controls.Primitives; | ||
|
||
namespace System.Windows.Controls | ||
{ | ||
public class Pivot : TabControl | ||
{ | ||
#region Title | ||
|
||
public static readonly DependencyProperty TitleProperty = PivotHelper.TitleProperty.AddOwner(typeof(Pivot)); | ||
|
||
public object Title | ||
{ | ||
get => GetValue(TitleProperty); | ||
set => SetValue(TitleProperty, value); | ||
} | ||
|
||
#endregion | ||
|
||
#region RightHeader | ||
|
||
public static readonly DependencyProperty RightHeaderProperty = PivotHelper.RightHeaderProperty.AddOwner(typeof(Pivot)); | ||
|
||
public object RightHeader | ||
{ | ||
get => GetValue(RightHeaderProperty); | ||
set => SetValue(RightHeaderProperty, value); | ||
} | ||
|
||
#endregion | ||
|
||
protected override void OnInitialized(EventArgs e) | ||
{ | ||
base.OnInitialized(e); | ||
this.InitializeStyle("TabControlPivotStyle"); | ||
} | ||
} | ||
|
||
public class PivotItem : TabItem | ||
{ | ||
protected override void OnInitialized(EventArgs e) | ||
{ | ||
base.OnInitialized(e); | ||
this.InitializeStyle("TabItemPivotStyle"); | ||
} | ||
} | ||
} |