/ src / settings-ui / QuickAccess.UI / ViewModels / FlyoutMenuItem.cs
FlyoutMenuItem.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 System;
 6  using System.ComponentModel;
 7  using System.Runtime.CompilerServices;
 8  using ManagedCommon;
 9  using Microsoft.PowerToys.Settings.UI.Controls;
10  
11  namespace Microsoft.PowerToys.QuickAccess.ViewModels;
12  
13  public sealed class FlyoutMenuItem : ModuleListItem
14  {
15      private bool _visible;
16  
17      public string ToolTip { get; set; } = string.Empty;
18  
19      public new ModuleType Tag
20      {
21          get => (ModuleType)(base.Tag ?? ModuleType.PowerLauncher);
22          set => base.Tag = value;
23      }
24  
25      public bool Visible
26      {
27          get => _visible;
28          set
29          {
30              if (_visible != value)
31              {
32                  _visible = value;
33                  OnPropertyChanged();
34              }
35          }
36      }
37  }