// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#region StyleCop Suppression - generated code
using System;
using System.ComponentModel;
using System.Windows;
namespace Microsoft.Management.UI.Internal
{
///
/// A TextBox which shows a user provided text when its empty.
///
[Localizability(LocalizationCategory.None)]
partial class MessageTextBox
{
//
// BackgroundText dependency property
//
///
/// Identifies the BackgroundText dependency property.
///
public static readonly DependencyProperty BackgroundTextProperty = DependencyProperty.Register( "BackgroundText", typeof(string), typeof(MessageTextBox), new PropertyMetadata( string.Empty, BackgroundTextProperty_PropertyChanged) );
///
/// Gets or sets a value for text presented to user when TextBox is empty.
///
[Bindable(true)]
[Category("Common Properties")]
[Description("Gets or sets a value for text presented to user when TextBox is empty.")]
[Localizability(LocalizationCategory.Text, Modifiability=Modifiability.Modifiable, Readability=Readability.Readable)]
public string BackgroundText
{
get
{
return (string) GetValue(BackgroundTextProperty);
}
set
{
SetValue(BackgroundTextProperty,value);
}
}
static private void BackgroundTextProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
{
MessageTextBox obj = (MessageTextBox) o;
obj.OnBackgroundTextChanged( new PropertyChangedEventArgs((string)e.OldValue, (string)e.NewValue) );
}
///
/// Occurs when BackgroundText property changes.
///
public event EventHandler> BackgroundTextChanged;
///
/// Called when BackgroundText property changes.
///
protected virtual void OnBackgroundTextChanged(PropertyChangedEventArgs e)
{
OnBackgroundTextChangedImplementation(e);
RaisePropertyChangedEvent(BackgroundTextChanged, e);
}
partial void OnBackgroundTextChangedImplementation(PropertyChangedEventArgs e);
//
// IsBackgroundTextShown dependency property
//
///
/// Identifies the IsBackgroundTextShown dependency property key.
///
private static readonly DependencyPropertyKey IsBackgroundTextShownPropertyKey = DependencyProperty.RegisterReadOnly( "IsBackgroundTextShown", typeof(bool), typeof(MessageTextBox), new PropertyMetadata( BooleanBoxes.TrueBox, IsBackgroundTextShownProperty_PropertyChanged) );
///
/// Identifies the IsBackgroundTextShown dependency property.
///
public static readonly DependencyProperty IsBackgroundTextShownProperty = IsBackgroundTextShownPropertyKey.DependencyProperty;
///
/// Gets a value indicating if the background text is being shown.
///
[Bindable(true)]
[Category("Common Properties")]
[Description("Gets a value indicating if the background text is being shown.")]
[Localizability(LocalizationCategory.None)]
public bool IsBackgroundTextShown
{
get
{
return (bool) GetValue(IsBackgroundTextShownProperty);
}
private set
{
SetValue(IsBackgroundTextShownPropertyKey,BooleanBoxes.Box(value));
}
}
static private void IsBackgroundTextShownProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
{
MessageTextBox obj = (MessageTextBox) o;
obj.OnIsBackgroundTextShownChanged( new PropertyChangedEventArgs((bool)e.OldValue, (bool)e.NewValue) );
}
///
/// Occurs when IsBackgroundTextShown property changes.
///
public event EventHandler> IsBackgroundTextShownChanged;
///
/// Called when IsBackgroundTextShown property changes.
///
protected virtual void OnIsBackgroundTextShownChanged(PropertyChangedEventArgs e)
{
OnIsBackgroundTextShownChangedImplementation(e);
RaisePropertyChangedEvent(IsBackgroundTextShownChanged, e);
}
partial void OnIsBackgroundTextShownChangedImplementation(PropertyChangedEventArgs e);
///
/// Called when a property changes.
///
private void RaisePropertyChangedEvent(EventHandler> eh, PropertyChangedEventArgs e)
{
if (eh != null)
{
eh(this,e);
}
}
//
// Static constructor
//
///
/// Called when the type is initialized.
///
static MessageTextBox()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(MessageTextBox), new FrameworkPropertyMetadata(typeof(MessageTextBox)));
StaticConstructorImplementation();
}
static partial void StaticConstructorImplementation();
}
}
#endregion