命名调整
This commit is contained in:
39
AntdWpf/Controls/AntdContentControl.cs
Normal file
39
AntdWpf/Controls/AntdContentControl.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
namespace AntdWpf.Controls
|
||||
{
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
public class AntdContentControl : ContentControl
|
||||
{
|
||||
public static readonly DependencyProperty ContentCharacterCasingProperty =
|
||||
DependencyProperty.Register("ContentCharacterCasing", typeof(CharacterCasing), typeof(AntdContentControl),
|
||||
new FrameworkPropertyMetadata(CharacterCasing.Normal, FrameworkPropertyMetadataOptions.Inherits | FrameworkPropertyMetadataOptions.AffectsMeasure),
|
||||
value => CharacterCasing.Normal <= (CharacterCasing)value && (CharacterCasing)value <= CharacterCasing.Upper);
|
||||
|
||||
/// <summary>
|
||||
/// Character casing of the Content
|
||||
/// </summary>
|
||||
public CharacterCasing ContentCharacterCasing
|
||||
{
|
||||
get { return (CharacterCasing)GetValue(ContentCharacterCasingProperty); }
|
||||
set { SetValue(ContentCharacterCasingProperty, value); }
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty RecognizesAccessKeyProperty =
|
||||
DependencyProperty.Register("RecognizesAccessKey", typeof(bool), typeof(AntdContentControl), new FrameworkPropertyMetadata(false));
|
||||
|
||||
/// <summary>
|
||||
/// Determine if the inner ContentPresenter should use AccessText in its style
|
||||
/// </summary>
|
||||
public bool RecognizesAccessKey
|
||||
{
|
||||
get { return (bool)GetValue(RecognizesAccessKeyProperty); }
|
||||
set { SetValue(RecognizesAccessKeyProperty, value); }
|
||||
}
|
||||
|
||||
static AntdContentControl()
|
||||
{
|
||||
DefaultStyleKeyProperty.OverrideMetadata(typeof(AntdContentControl), new FrameworkPropertyMetadata(typeof(AntdContentControl)));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user