/ src / settings-ui / Settings.UI.Controls / Primitives / FlyoutMenuButton.cs
FlyoutMenuButton.cs
 1  // Copyright (c) Microsoft Corporation
 2  // The Microsoft Corporation licenses this file to you under the MIT license.
 3  // See the LICENSE file in the project root for more information.
 4  
 5  using Microsoft.UI.Xaml;
 6  using Microsoft.UI.Xaml.Controls;
 7  
 8  namespace Microsoft.PowerToys.Settings.UI.Controls
 9  {
10      public partial class FlyoutMenuButton : Button
11      {
12          /// <summary>
13          /// The backing <see cref="DependencyProperty"/> for the <see cref="Icon"/> property.
14          /// </summary>
15          public static readonly DependencyProperty IconProperty = DependencyProperty.Register(
16              nameof(Icon),
17              typeof(object),
18              typeof(FlyoutMenuButton),
19              new PropertyMetadata(defaultValue: null));
20  
21          /// <summary>
22          /// Gets or sets the icon.
23          /// </summary>
24          public object Icon
25          {
26              get => (object)GetValue(IconProperty);
27              set => SetValue(IconProperty, value);
28          }
29  
30          public FlyoutMenuButton()
31          {
32              this.DefaultStyleKey = typeof(FlyoutMenuButton);
33          }
34  
35          protected override void OnApplyTemplate()
36          {
37              base.OnApplyTemplate();
38          }
39      }
40  }