forked from PowerShell/PowerShell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathResizer.Generated.cs
More file actions
426 lines (373 loc) · 15.9 KB
/
Copy pathResizer.Generated.cs
File metadata and controls
426 lines (373 loc) · 15.9 KB
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
// -----------------------------------------------------------------------
// <copyright file="Resizer.Generated.cs" company="Microsoft">
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//
// <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.ComponentModel;
using System.Windows;
using System.Windows.Controls.Primitives;
using System.Windows.Media;
namespace Microsoft.Management.UI.Internal
{
/// <summary>
/// Resizer adds a resizing grip and behavior to any control.
/// </summary>
/// <remarks>
///
///
/// If a custom template is provided for this control, then the template MUST provide the following template parts:
///
/// PART_LeftGrip - A required template part which must be of type Thumb. The grip on the left.
/// PART_RightGrip - A required template part which must be of type Thumb. The grip on the right.
///
/// </remarks>
[TemplatePart(Name="PART_LeftGrip", Type=typeof(Thumb))]
[TemplatePart(Name="PART_RightGrip", Type=typeof(Thumb))]
[Localizability(LocalizationCategory.None)]
partial class Resizer
{
//
// Fields
//
private Thumb leftGrip;
private Thumb rightGrip;
//
// DraggingTemplate dependency property
//
/// <summary>
/// Identifies the DraggingTemplate dependency property.
/// </summary>
public static readonly DependencyProperty DraggingTemplateProperty = DependencyProperty.Register( "DraggingTemplate", typeof(DataTemplate), typeof(Resizer), new PropertyMetadata( null, DraggingTemplateProperty_PropertyChanged) );
/// <summary>
/// Gets or sets the template used for the dragging indicator when ResizeWhileDragging is false.
/// </summary>
[Bindable(true)]
[Category("Common Properties")]
[Description("Gets or sets the template used for the dragging indicator when ResizeWhileDragging is false.")]
[Localizability(LocalizationCategory.None)]
public DataTemplate DraggingTemplate
{
get
{
return (DataTemplate) GetValue(DraggingTemplateProperty);
}
set
{
SetValue(DraggingTemplateProperty,value);
}
}
static private void DraggingTemplateProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
{
Resizer obj = (Resizer) o;
obj.OnDraggingTemplateChanged( new PropertyChangedEventArgs<DataTemplate>((DataTemplate)e.OldValue, (DataTemplate)e.NewValue) );
}
/// <summary>
/// Occurs when DraggingTemplate property changes.
/// </summary>
public event EventHandler<PropertyChangedEventArgs<DataTemplate>> DraggingTemplateChanged;
/// <summary>
/// Called when DraggingTemplate property changes.
/// </summary>
protected virtual void OnDraggingTemplateChanged(PropertyChangedEventArgs<DataTemplate> e)
{
OnDraggingTemplateChangedImplementation(e);
RaisePropertyChangedEvent(DraggingTemplateChanged, e);
}
partial void OnDraggingTemplateChangedImplementation(PropertyChangedEventArgs<DataTemplate> e);
//
// GripBrush dependency property
//
/// <summary>
/// Identifies the GripBrush dependency property.
/// </summary>
public static readonly DependencyProperty GripBrushProperty = DependencyProperty.Register( "GripBrush", typeof(Brush), typeof(Resizer), new PropertyMetadata( new SolidColorBrush(Colors.Black), GripBrushProperty_PropertyChanged) );
/// <summary>
/// Gets or sets the color of the resize grips.
/// </summary>
[Bindable(true)]
[Category("Common Properties")]
[Description("Gets or sets the color of the resize grips.")]
[Localizability(LocalizationCategory.None)]
public Brush GripBrush
{
get
{
return (Brush) GetValue(GripBrushProperty);
}
set
{
SetValue(GripBrushProperty,value);
}
}
static private void GripBrushProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
{
Resizer obj = (Resizer) o;
obj.OnGripBrushChanged( new PropertyChangedEventArgs<Brush>((Brush)e.OldValue, (Brush)e.NewValue) );
}
/// <summary>
/// Occurs when GripBrush property changes.
/// </summary>
public event EventHandler<PropertyChangedEventArgs<Brush>> GripBrushChanged;
/// <summary>
/// Called when GripBrush property changes.
/// </summary>
protected virtual void OnGripBrushChanged(PropertyChangedEventArgs<Brush> e)
{
OnGripBrushChangedImplementation(e);
RaisePropertyChangedEvent(GripBrushChanged, e);
}
partial void OnGripBrushChangedImplementation(PropertyChangedEventArgs<Brush> e);
//
// GripLocation dependency property
//
/// <summary>
/// Identifies the GripLocation dependency property.
/// </summary>
public static readonly DependencyProperty GripLocationProperty = DependencyProperty.Register( "GripLocation", typeof(ResizeGripLocation), typeof(Resizer), new PropertyMetadata( ResizeGripLocation.Right, GripLocationProperty_PropertyChanged) );
/// <summary>
/// Gets or sets a value of what grips.
/// </summary>
[Bindable(true)]
[Category("Common Properties")]
[Description("Gets or sets a value of what grips.")]
[Localizability(LocalizationCategory.None)]
public ResizeGripLocation GripLocation
{
get
{
return (ResizeGripLocation) GetValue(GripLocationProperty);
}
set
{
SetValue(GripLocationProperty,value);
}
}
static private void GripLocationProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
{
Resizer obj = (Resizer) o;
obj.OnGripLocationChanged( new PropertyChangedEventArgs<ResizeGripLocation>((ResizeGripLocation)e.OldValue, (ResizeGripLocation)e.NewValue) );
}
/// <summary>
/// Occurs when GripLocation property changes.
/// </summary>
public event EventHandler<PropertyChangedEventArgs<ResizeGripLocation>> GripLocationChanged;
/// <summary>
/// Called when GripLocation property changes.
/// </summary>
protected virtual void OnGripLocationChanged(PropertyChangedEventArgs<ResizeGripLocation> e)
{
OnGripLocationChangedImplementation(e);
RaisePropertyChangedEvent(GripLocationChanged, e);
}
partial void OnGripLocationChangedImplementation(PropertyChangedEventArgs<ResizeGripLocation> e);
//
// GripWidth dependency property
//
/// <summary>
/// Identifies the GripWidth dependency property.
/// </summary>
public static readonly DependencyProperty GripWidthProperty = DependencyProperty.Register( "GripWidth", typeof(double), typeof(Resizer), new PropertyMetadata( 4.0, GripWidthProperty_PropertyChanged) );
/// <summary>
/// Gets or sets the width of the grips.
/// </summary>
[Bindable(true)]
[Category("Common Properties")]
[Description("Gets or sets the width of the grips.")]
[Localizability(LocalizationCategory.None)]
public double GripWidth
{
get
{
return (double) GetValue(GripWidthProperty);
}
set
{
SetValue(GripWidthProperty,value);
}
}
static private void GripWidthProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
{
Resizer obj = (Resizer) o;
obj.OnGripWidthChanged( new PropertyChangedEventArgs<double>((double)e.OldValue, (double)e.NewValue) );
}
/// <summary>
/// Occurs when GripWidth property changes.
/// </summary>
public event EventHandler<PropertyChangedEventArgs<double>> GripWidthChanged;
/// <summary>
/// Called when GripWidth property changes.
/// </summary>
protected virtual void OnGripWidthChanged(PropertyChangedEventArgs<double> e)
{
OnGripWidthChangedImplementation(e);
RaisePropertyChangedEvent(GripWidthChanged, e);
}
partial void OnGripWidthChangedImplementation(PropertyChangedEventArgs<double> e);
//
// ResizeWhileDragging dependency property
//
/// <summary>
/// Identifies the ResizeWhileDragging dependency property.
/// </summary>
public static readonly DependencyProperty ResizeWhileDraggingProperty = DependencyProperty.Register( "ResizeWhileDragging", typeof(bool), typeof(Resizer), new PropertyMetadata( BooleanBoxes.TrueBox, ResizeWhileDraggingProperty_PropertyChanged) );
/// <summary>
/// Gets or sets a value indicating if resizing occurs while dragging.
/// </summary>
[Bindable(true)]
[Category("Common Properties")]
[Description("Gets or sets a value indicating if resizing occurs while dragging.")]
[Localizability(LocalizationCategory.None)]
public bool ResizeWhileDragging
{
get
{
return (bool) GetValue(ResizeWhileDraggingProperty);
}
set
{
SetValue(ResizeWhileDraggingProperty,BooleanBoxes.Box(value));
}
}
static private void ResizeWhileDraggingProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
{
Resizer obj = (Resizer) o;
obj.OnResizeWhileDraggingChanged( new PropertyChangedEventArgs<bool>((bool)e.OldValue, (bool)e.NewValue) );
}
/// <summary>
/// Occurs when ResizeWhileDragging property changes.
/// </summary>
public event EventHandler<PropertyChangedEventArgs<bool>> ResizeWhileDraggingChanged;
/// <summary>
/// Called when ResizeWhileDragging property changes.
/// </summary>
protected virtual void OnResizeWhileDraggingChanged(PropertyChangedEventArgs<bool> e)
{
OnResizeWhileDraggingChangedImplementation(e);
RaisePropertyChangedEvent(ResizeWhileDraggingChanged, e);
}
partial void OnResizeWhileDraggingChangedImplementation(PropertyChangedEventArgs<bool> e);
//
// ThumbGripLocation dependency property
//
/// <summary>
/// Identifies the ThumbGripLocation dependency property.
/// </summary>
public static readonly DependencyProperty ThumbGripLocationProperty = DependencyProperty.RegisterAttached( "ThumbGripLocation", typeof(ResizeGripLocation), typeof(Resizer), new PropertyMetadata( ResizeGripLocation.Right, ThumbGripLocationProperty_PropertyChanged) );
/// <summary>
/// Gets the location for a grip.
/// </summary>
/// <param name="element">The dependency object that the property is attached to.</param>
/// <returns>
/// The value of ThumbGripLocation that is attached to element.
/// </returns>
static public ResizeGripLocation GetThumbGripLocation(DependencyObject element)
{
return (ResizeGripLocation) element.GetValue(ThumbGripLocationProperty);
}
/// <summary>
/// Sets the location for a grip.
/// </summary>
/// <param name="element">The dependency object that the property will be attached to.</param>
/// <param name="value">The new value.</param>
static public void SetThumbGripLocation(DependencyObject element, ResizeGripLocation value)
{
element.SetValue(ThumbGripLocationProperty,value);
}
static private void ThumbGripLocationProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
{
ThumbGripLocationProperty_PropertyChangedImplementation(o, e);
}
static partial void ThumbGripLocationProperty_PropertyChangedImplementation(DependencyObject o, DependencyPropertyChangedEventArgs e);
//
// VisibleGripWidth dependency property
//
/// <summary>
/// Identifies the VisibleGripWidth dependency property.
/// </summary>
public static readonly DependencyProperty VisibleGripWidthProperty = DependencyProperty.Register( "VisibleGripWidth", typeof(double ), typeof(Resizer), new PropertyMetadata( 1.0, VisibleGripWidthProperty_PropertyChanged) );
/// <summary>
/// Gets or sets the visible width of the grips.
/// </summary>
[Bindable(true)]
[Category("Common Properties")]
[Description("Gets or sets the visible width of the grips.")]
[Localizability(LocalizationCategory.None)]
public double VisibleGripWidth
{
get
{
return (double ) GetValue(VisibleGripWidthProperty);
}
set
{
SetValue(VisibleGripWidthProperty,value);
}
}
static private void VisibleGripWidthProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
{
Resizer obj = (Resizer) o;
obj.OnVisibleGripWidthChanged( new PropertyChangedEventArgs<double >((double )e.OldValue, (double )e.NewValue) );
}
/// <summary>
/// Occurs when VisibleGripWidth property changes.
/// </summary>
public event EventHandler<PropertyChangedEventArgs<double >> VisibleGripWidthChanged;
/// <summary>
/// Called when VisibleGripWidth property changes.
/// </summary>
protected virtual void OnVisibleGripWidthChanged(PropertyChangedEventArgs<double > e)
{
OnVisibleGripWidthChangedImplementation(e);
RaisePropertyChangedEvent(VisibleGripWidthChanged, e);
}
partial void OnVisibleGripWidthChangedImplementation(PropertyChangedEventArgs<double > 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.leftGrip = WpfHelp.GetTemplateChild<Thumb>(this,"PART_LeftGrip");
this.rightGrip = WpfHelp.GetTemplateChild<Thumb>(this,"PART_RightGrip");
PostOnApplyTemplate();
}
partial void PreOnApplyTemplate();
partial void PostOnApplyTemplate();
//
// Static constructor
//
/// <summary>
/// Called when the type is initialized.
/// </summary>
static Resizer()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(Resizer), new FrameworkPropertyMetadata(typeof(Resizer)));
StaticConstructorImplementation();
}
static partial void StaticConstructorImplementation();
}
}
#endregion