月更
This commit is contained in:
41
AntDesignWPF/Controls/Heading.cs
Normal file
41
AntDesignWPF/Controls/Heading.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
namespace AntDesign.WPF.Controls
|
||||
{
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// A heading of the a page.
|
||||
/// </summary>
|
||||
public class Heading : TextBlock
|
||||
{
|
||||
#region Properties
|
||||
|
||||
public static readonly DependencyProperty SizeProperty =
|
||||
DependencyProperty.Register("Size", typeof(HeadingSizes), typeof(Heading), new PropertyMetadata(HeadingSizes.Normal));
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets the size of the heading.
|
||||
/// </summary>
|
||||
public HeadingSizes Size
|
||||
{
|
||||
get { return (HeadingSizes)GetValue(SizeProperty); }
|
||||
set { SetValue(SizeProperty, value); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
static Heading()
|
||||
{
|
||||
DefaultStyleKeyProperty.OverrideMetadata(typeof(Heading), new FrameworkPropertyMetadata(typeof(Heading)));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
public enum HeadingSizes : byte
|
||||
{
|
||||
ExtraLarge, Large, Medium, Normal, Small, Tiny
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user