Skip to content

Commit

Permalink
(GH-3715) Code format ContentControlEx
Browse files Browse the repository at this point in the history
  • Loading branch information
punker76 committed Dec 25, 2019
1 parent 71d4558 commit b8ae0e1
Showing 1 changed file with 20 additions and 25 deletions.
45 changes: 20 additions & 25 deletions src/MahApps.Metro/Controls/ContentControlEx.cs
Expand Up @@ -5,44 +5,39 @@ namespace MahApps.Metro.Controls
{
public class ContentControlEx : ContentControl
{
/// <summary>
/// The DependencyProperty for the CharacterCasing property.
/// Controls whether or not content is converted to upper or lower case
/// Default Value: CharacterCasing.Normal
/// </summary>
public static readonly DependencyProperty ContentCharacterCasingProperty =
DependencyProperty.Register("ContentCharacterCasing",
typeof(CharacterCasing),
typeof(ContentControlEx),
new FrameworkPropertyMetadata(CharacterCasing.Normal, FrameworkPropertyMetadataOptions.Inherits | FrameworkPropertyMetadataOptions.AffectsMeasure),
value => CharacterCasing.Normal <= (CharacterCasing)value && (CharacterCasing)value <= CharacterCasing.Upper);
/// <summary>Identifies the <see cref="ContentCharacterCasing"/> dependency property.</summary>
public static readonly DependencyProperty ContentCharacterCasingProperty
= DependencyProperty.Register(
nameof(ContentCharacterCasing),
typeof(CharacterCasing),
typeof(ContentControlEx),
new FrameworkPropertyMetadata(CharacterCasing.Normal, FrameworkPropertyMetadataOptions.Inherits | FrameworkPropertyMetadataOptions.AffectsMeasure),
value => CharacterCasing.Normal <= (CharacterCasing)value && (CharacterCasing)value <= CharacterCasing.Upper);

/// <summary>
/// Character casing of the Content
/// Gets or sets the character casing of the Content.
/// </summary>
public CharacterCasing ContentCharacterCasing
{
get { return (CharacterCasing)GetValue(ContentCharacterCasingProperty); }
set { SetValue(ContentCharacterCasingProperty, value); }
get { return (CharacterCasing)this.GetValue(ContentCharacterCasingProperty); }
set { this.SetValue(ContentCharacterCasingProperty, value); }
}

/// <summary>
/// The DependencyProperty for the RecognizesAccessKey property.
/// Default Value: false
/// </summary>
public static readonly DependencyProperty RecognizesAccessKeyProperty =
DependencyProperty.Register("RecognizesAccessKey",
typeof(bool),
typeof(ContentControlEx),
new FrameworkPropertyMetadata(false));
/// <summary>Identifies the <see cref="RecognizesAccessKey"/> dependency property.</summary>
public static readonly DependencyProperty RecognizesAccessKeyProperty
= DependencyProperty.Register(
nameof(RecognizesAccessKey),
typeof(bool),
typeof(ContentControlEx),
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); }
get { return (bool)this.GetValue(RecognizesAccessKeyProperty); }
set { this.SetValue(RecognizesAccessKeyProperty, value); }
}

static ContentControlEx()
Expand Down

0 comments on commit b8ae0e1

Please sign in to comment.