|
1 |
| -using System; |
2 |
| -using System.Collections.Generic; |
3 |
| -using System.Text; |
4 |
| -using Microsoft.UI.Xaml; |
5 |
| -using Microsoft.UI.Xaml.Controls; |
| 1 | +// Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | +// Licensed under the MIT License. See LICENSE in the project root for license information. |
| 3 | +// MUX Reference dxaml\xcp\dxaml\lib\AppBarSeparator_Partial.cpp, tag winui3/release/1.6.4, commit 262a901e09 |
6 | 4 |
|
7 |
| -namespace Microsoft.UI.Xaml.Controls |
| 5 | +namespace Microsoft.UI.Xaml.Controls; |
| 6 | + |
| 7 | +partial class AppBarSeparator |
8 | 8 | {
|
9 |
| - partial class AppBarSeparator |
| 9 | + /// <summary> |
| 10 | + /// Gets or sets the order in which this item is moved to the CommandBar overflow menu. |
| 11 | + /// </summary> |
| 12 | + public int DynamicOverflowOrder |
10 | 13 | {
|
11 |
| - #region IsCompat |
12 |
| - |
13 |
| - public bool IsCompact |
14 |
| - { |
15 |
| - get => (bool)this.GetValue(IsCompactProperty); |
16 |
| - set => this.SetValue(IsCompactProperty, value); |
17 |
| - } |
| 14 | + get => (int)GetValue(DynamicOverflowOrderProperty); |
| 15 | + set => SetValue(DynamicOverflowOrderProperty, value); |
| 16 | + } |
18 | 17 |
|
19 |
| - public static DependencyProperty IsCompactProperty { get; } = |
| 18 | + /// <summary> |
| 19 | + /// Identifies the DynamicOverflowOrder dependency property. |
| 20 | + /// </summary> |
| 21 | + public static DependencyProperty DynamicOverflowOrderProperty { get; } = |
20 | 22 | DependencyProperty.Register(
|
21 |
| - "IsCompact", |
22 |
| - typeof(bool), |
| 23 | + nameof(DynamicOverflowOrder), |
| 24 | + typeof(int), |
23 | 25 | typeof(AppBarSeparator),
|
24 |
| - new FrameworkPropertyMetadata(default(bool)) |
25 |
| - ); |
26 |
| - |
27 |
| - #endregion |
28 |
| - |
29 |
| - #region DynamicOverflowOrder |
30 |
| - |
31 |
| - public int DynamicOverflowOrder |
32 |
| - { |
33 |
| - get => (int)this.GetValue(DynamicOverflowOrderProperty); |
34 |
| - set => this.SetValue(DynamicOverflowOrderProperty, value); |
35 |
| - } |
| 26 | + new FrameworkPropertyMetadata(default(int))); |
36 | 27 |
|
37 |
| - public static DependencyProperty DynamicOverflowOrderProperty { get; } = |
38 |
| - DependencyProperty.Register( |
39 |
| - "DynamicOverflowOrder", |
40 |
| - typeof(int), |
41 |
| - typeof(AppBarSeparator), |
42 |
| - new FrameworkPropertyMetadata(default(int)) |
43 |
| - ); |
44 |
| - |
45 |
| - #endregion |
46 |
| - |
47 |
| - #region IsInOverflow |
48 |
| - |
49 |
| - public bool IsInOverflow |
50 |
| - { |
51 |
| - get => CommandBar.IsCommandBarElementInOverflow(this); |
52 |
| - internal set => this.SetValue(IsInOverflowProperty, value); |
53 |
| - } |
54 |
| - |
55 |
| - bool ICommandBarElement3.IsInOverflow |
56 |
| - { |
57 |
| - get => IsInOverflow; |
58 |
| - set => IsInOverflow = value; |
59 |
| - } |
60 |
| - |
61 |
| - public static DependencyProperty IsInOverflowProperty { get; } = |
62 |
| - DependencyProperty.Register( |
63 |
| - "IsInOverflow", |
64 |
| - typeof(bool), |
65 |
| - typeof(AppBarSeparator), |
66 |
| - new FrameworkPropertyMetadata(default(bool)) |
67 |
| - ); |
68 |
| - |
69 |
| - #endregion |
| 28 | + /// <summary> |
| 29 | + /// Gets or sets a value that indicates whether the separator is shown with reduced padding. |
| 30 | + /// </summary> |
| 31 | + public bool IsCompact |
| 32 | + { |
| 33 | + get => (bool)GetValue(IsCompactProperty); |
| 34 | + set => SetValue(IsCompactProperty, value); |
| 35 | + } |
70 | 36 |
|
71 |
| - #region UseOverflowStyle |
| 37 | + /// <summary> |
| 38 | + /// Identifies the IsCompact dependency property. |
| 39 | + /// </summary> |
| 40 | + public static DependencyProperty IsCompactProperty { get; } = |
| 41 | + DependencyProperty.Register( |
| 42 | + nameof(IsCompact), |
| 43 | + typeof(bool), |
| 44 | + typeof(AppBarSeparator), |
| 45 | + new FrameworkPropertyMetadata(default(bool)) |
| 46 | + ); |
| 47 | + |
| 48 | + /// <summary> |
| 49 | + /// Gets a value that indicates whether this item is in the overflow menu. |
| 50 | + /// </summary> |
| 51 | + public bool IsInOverflow |
| 52 | + { |
| 53 | + get => CommandBar.IsCommandBarElementInOverflow(this); |
| 54 | + private set => SetValue(IsInOverflowProperty, value); |
| 55 | + } |
72 | 56 |
|
73 |
| - internal bool UseOverflowStyle |
74 |
| - { |
75 |
| - get => (bool)this.GetValue(UseOverflowStyleProperty); |
76 |
| - set => this.SetValue(UseOverflowStyleProperty, value); |
77 |
| - } |
| 57 | + /// <summary> |
| 58 | + /// Identifies the IsInOverflow dependency property. |
| 59 | + /// </summary> |
| 60 | + public static DependencyProperty IsInOverflowProperty { get; } = |
| 61 | + DependencyProperty.Register( |
| 62 | + nameof(IsInOverflow), |
| 63 | + typeof(bool), |
| 64 | + typeof(AppBarSeparator), |
| 65 | + new FrameworkPropertyMetadata(default(bool))); |
78 | 66 |
|
79 |
| - bool ICommandBarOverflowElement.UseOverflowStyle |
80 |
| - { |
81 |
| - get => UseOverflowStyle; |
82 |
| - set => UseOverflowStyle = value; |
83 |
| - } |
| 67 | + bool ICommandBarElement3.IsInOverflow |
| 68 | + { |
| 69 | + get => IsInOverflow; |
| 70 | + set => IsInOverflow = value; |
| 71 | + } |
84 | 72 |
|
85 |
| - internal static DependencyProperty UseOverflowStyleProperty { get; } = |
86 |
| - DependencyProperty.Register( |
87 |
| - nameof(UseOverflowStyle), |
88 |
| - typeof(bool), |
89 |
| - typeof(AppBarSeparator), |
90 |
| - new FrameworkPropertyMetadata(default(bool)) |
91 |
| - ); |
| 73 | + internal bool UseOverflowStyle |
| 74 | + { |
| 75 | + get => (bool)GetValue(UseOverflowStyleProperty); |
| 76 | + set => SetValue(UseOverflowStyleProperty, value); |
| 77 | + } |
92 | 78 |
|
93 |
| - #endregion |
| 79 | + bool ICommandBarOverflowElement.UseOverflowStyle |
| 80 | + { |
| 81 | + get => UseOverflowStyle; |
| 82 | + set => UseOverflowStyle = value; |
94 | 83 | }
|
| 84 | + |
| 85 | + internal static DependencyProperty UseOverflowStyleProperty { get; } = |
| 86 | + DependencyProperty.Register( |
| 87 | + nameof(UseOverflowStyle), |
| 88 | + typeof(bool), |
| 89 | + typeof(AppBarSeparator), |
| 90 | + new FrameworkPropertyMetadata(default(bool)) |
| 91 | + ); |
95 | 92 | }
|
0 commit comments