/ src / settings-ui / Settings.UI / ViewModels / DashboardListItem.cs
DashboardListItem.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.Collections.ObjectModel;
 7  using System.ComponentModel;
 8  using System.Runtime.CompilerServices;
 9  
10  using ManagedCommon;
11  using Microsoft.PowerToys.Settings.UI.Controls;
12  using Microsoft.UI;
13  using Windows.UI;
14  
15  namespace Microsoft.PowerToys.Settings.UI.ViewModels
16  {
17      public partial class DashboardListItem : ModuleListItem
18      {
19          private bool _visible;
20  
21          public string ToolTip { get; set; }
22  
23          public new ModuleType Tag
24          {
25              get => (ModuleType)base.Tag!;
26              set => base.Tag = value;
27          }
28  
29          public bool Visible
30          {
31              get => _visible;
32              set
33              {
34                  if (_visible != value)
35                  {
36                      _visible = value;
37                      OnPropertyChanged();
38                  }
39              }
40          }
41  
42          public ObservableCollection<DashboardModuleItem> DashboardModuleItems { get; set; } = new ObservableCollection<DashboardModuleItem>();
43      }
44  }