File size: 5,789 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 150 151 152 | // Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
//
// <auto-generated>
// This code was generated by a tool. DO NOT EDIT
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
#region StyleCop Suppression - generated code
using System;
using System.Collections;
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
namespace Microsoft.Management.UI.Internal
{
/// <summary>
/// This control is the row in the ListOrganizer and offers editing functionality.
/// </summary>
/// <remarks>
///
///
/// If a custom template is provided for this control, then the template MUST provide the following template parts:
///
/// PART_DeleteButton - A required template part which must be of type Button. Button which keeps track of whether the row should be deleted.
/// PART_EditBox - A required template part which must be of type TextBox. Displays the text content in an editable manner.
/// PART_LinkButton - A required template part which must be of type Button. Displays the text content in a read-only manner and allows single click selection.
/// PART_RenameButton - A required template part which must be of type ToggleButton. Button which allows for editing the name of the item.
///
/// </remarks>
[TemplatePart(Name="PART_DeleteButton", Type=typeof(Button))]
[TemplatePart(Name="PART_EditBox", Type=typeof(TextBox))]
[TemplatePart(Name="PART_LinkButton", Type=typeof(Button))]
[TemplatePart(Name="PART_RenameButton", Type=typeof(ToggleButton))]
[Localizability(LocalizationCategory.None)]
partial class ListOrganizerItem
{
//
// Fields
//
private Button deleteButton;
private TextBox editBox;
private Button linkButton;
private ToggleButton renameButton;
//
// TextContentPropertyName dependency property
//
/// <summary>
/// Identifies the TextContentPropertyName dependency property.
/// </summary>
public static readonly DependencyProperty TextContentPropertyNameProperty = DependencyProperty.Register( "TextContentPropertyName", typeof(string), typeof(ListOrganizerItem), new PropertyMetadata( string.Empty, TextContentPropertyNameProperty_PropertyChanged) );
/// <summary>
/// Gets or sets a value which dictates what binding is used to provide content for the items in the list.
/// </summary>
[Bindable(true)]
[Category("Common Properties")]
[Description("Gets or sets a value which dictates what binding is used to provide content for the items in the list.")]
[Localizability(LocalizationCategory.None)]
public string TextContentPropertyName
{
get
{
return (string) GetValue(TextContentPropertyNameProperty);
}
set
{
SetValue(TextContentPropertyNameProperty,value);
}
}
static private void TextContentPropertyNameProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
{
ListOrganizerItem obj = (ListOrganizerItem) o;
obj.OnTextContentPropertyNameChanged( new PropertyChangedEventArgs<string>((string)e.OldValue, (string)e.NewValue) );
}
/// <summary>
/// Occurs when TextContentPropertyName property changes.
/// </summary>
public event EventHandler<PropertyChangedEventArgs<string>> TextContentPropertyNameChanged;
/// <summary>
/// Called when TextContentPropertyName property changes.
/// </summary>
protected virtual void OnTextContentPropertyNameChanged(PropertyChangedEventArgs<string> e)
{
OnTextContentPropertyNameChangedImplementation(e);
RaisePropertyChangedEvent(TextContentPropertyNameChanged, e);
}
partial void OnTextContentPropertyNameChangedImplementation(PropertyChangedEventArgs<string> 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);
}
}
//
// OnApplyTemplate
//
/// <summary>
/// Called when ApplyTemplate is called.
/// </summary>
public override void OnApplyTemplate()
{
PreOnApplyTemplate();
base.OnApplyTemplate();
this.deleteButton = WpfHelp.GetTemplateChild<Button>(this,"PART_DeleteButton");
this.editBox = WpfHelp.GetTemplateChild<TextBox>(this,"PART_EditBox");
this.linkButton = WpfHelp.GetTemplateChild<Button>(this,"PART_LinkButton");
this.renameButton = WpfHelp.GetTemplateChild<ToggleButton>(this,"PART_RenameButton");
PostOnApplyTemplate();
}
partial void PreOnApplyTemplate();
partial void PostOnApplyTemplate();
//
// Static constructor
//
/// <summary>
/// Called when the type is initialized.
/// </summary>
static ListOrganizerItem()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(ListOrganizerItem), new FrameworkPropertyMetadata(typeof(ListOrganizerItem)));
StaticConstructorImplementation();
}
static partial void StaticConstructorImplementation();
}
}
#endregion
|