File size: 5,616 Bytes
8c763fb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | // 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
{
/// <summary>
/// A TextBox which shows a user provided text when its empty.
/// </summary>
[Localizability(LocalizationCategory.None)]
partial class MessageTextBox
{
//
// BackgroundText dependency property
//
/// <summary>
/// Identifies the BackgroundText dependency property.
/// </summary>
public static readonly DependencyProperty BackgroundTextProperty = DependencyProperty.Register( "BackgroundText", typeof(string), typeof(MessageTextBox), new PropertyMetadata( string.Empty, BackgroundTextProperty_PropertyChanged) );
/// <summary>
/// Gets or sets a value for text presented to user when TextBox is empty.
/// </summary>
[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>((string)e.OldValue, (string)e.NewValue) );
}
/// <summary>
/// Occurs when BackgroundText property changes.
/// </summary>
public event EventHandler<PropertyChangedEventArgs<string>> BackgroundTextChanged;
/// <summary>
/// Called when BackgroundText property changes.
/// </summary>
protected virtual void OnBackgroundTextChanged(PropertyChangedEventArgs<string> e)
{
OnBackgroundTextChangedImplementation(e);
RaisePropertyChangedEvent(BackgroundTextChanged, e);
}
partial void OnBackgroundTextChangedImplementation(PropertyChangedEventArgs<string> e);
//
// IsBackgroundTextShown dependency property
//
/// <summary>
/// Identifies the IsBackgroundTextShown dependency property key.
/// </summary>
private static readonly DependencyPropertyKey IsBackgroundTextShownPropertyKey = DependencyProperty.RegisterReadOnly( "IsBackgroundTextShown", typeof(bool), typeof(MessageTextBox), new PropertyMetadata( BooleanBoxes.TrueBox, IsBackgroundTextShownProperty_PropertyChanged) );
/// <summary>
/// Identifies the IsBackgroundTextShown dependency property.
/// </summary>
public static readonly DependencyProperty IsBackgroundTextShownProperty = IsBackgroundTextShownPropertyKey.DependencyProperty;
/// <summary>
/// Gets a value indicating if the background text is being shown.
/// </summary>
[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>((bool)e.OldValue, (bool)e.NewValue) );
}
/// <summary>
/// Occurs when IsBackgroundTextShown property changes.
/// </summary>
public event EventHandler<PropertyChangedEventArgs<bool>> IsBackgroundTextShownChanged;
/// <summary>
/// Called when IsBackgroundTextShown property changes.
/// </summary>
protected virtual void OnIsBackgroundTextShownChanged(PropertyChangedEventArgs<bool> e)
{
OnIsBackgroundTextShownChangedImplementation(e);
RaisePropertyChangedEvent(IsBackgroundTextShownChanged, e);
}
partial void OnIsBackgroundTextShownChangedImplementation(PropertyChangedEventArgs<bool> e);
/// <summary>
/// Called when a property changes.
/// </summary>
private void RaisePropertyChangedEvent<T>(EventHandler<PropertyChangedEventArgs<T>> eh, PropertyChangedEventArgs<T> e)
{
if (eh != null)
{
eh(this,e);
}
}
//
// Static constructor
//
/// <summary>
/// Called when the type is initialized.
/// </summary>
static MessageTextBox()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(MessageTextBox), new FrameworkPropertyMetadata(typeof(MessageTextBox)));
StaticConstructorImplementation();
}
static partial void StaticConstructorImplementation();
}
}
#endregion
|