Files
PowerToys/src/settings-ui/Settings.UI/ViewModels/DashboardListItem.cs
Clint Rutkas 2fa4a489a1 Fixing accent brush and corner radius on dashboard (#31031)
* Removing background accent.  It causes eye to target ones differently due to shading differences

* forcing radius

* Update DashboardPage.xaml

* Remove unused accent color from modules listing

---------

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
2024-01-22 11:24:34 -08:00

69 lines
1.8 KiB
C#

// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using ManagedCommon;
using Microsoft.UI;
using Windows.UI;
namespace Microsoft.PowerToys.Settings.UI.ViewModels
{
public class DashboardListItem : INotifyPropertyChanged
{
private bool _visible;
private bool _isEnabled;
public string Label { get; set; }
public string Icon { get; set; }
public string ToolTip { get; set; }
public ModuleType Tag { get; set; }
public bool IsLocked { get; set; }
public bool IsEnabled
{
get => _isEnabled;
set
{
if (_isEnabled != value)
{
_isEnabled = value;
OnPropertyChanged();
EnabledChangedCallback?.Invoke(this);
}
}
}
public Action<DashboardListItem> EnabledChangedCallback { get; set; }
public bool Visible
{
get => _visible;
set
{
if (_visible != value)
{
_visible = value;
OnPropertyChanged();
}
}
}
public event PropertyChangedEventHandler PropertyChanged;
private void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
public ObservableCollection<DashboardModuleItem> DashboardModuleItems { get; set; } = new ObservableCollection<DashboardModuleItem>();
}
}