mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
_targets #38573_ At first I just wanted to add support for nested context menus. But then I also had to add a search box, so the focus wouldn't get weird. End result:  This gets rid of the need to have the search box and the command bar both track item keybindings - now it's just in the command bar. Closes #38299 Closes #38442
70 lines
1.4 KiB
C#
70 lines
1.4 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.
|
|
|
|
namespace Microsoft.CommandPalette.Extensions.Toolkit;
|
|
|
|
public partial class ListItem : CommandItem, IListItem
|
|
{
|
|
private ITag[] _tags = [];
|
|
private IDetails? _details;
|
|
|
|
private string _section = string.Empty;
|
|
private string _textToSuggest = string.Empty;
|
|
|
|
public virtual ITag[] Tags
|
|
{
|
|
get => _tags;
|
|
set
|
|
{
|
|
_tags = value;
|
|
OnPropertyChanged(nameof(Tags));
|
|
}
|
|
}
|
|
|
|
public virtual IDetails? Details
|
|
{
|
|
get => _details;
|
|
set
|
|
{
|
|
_details = value;
|
|
OnPropertyChanged(nameof(Details));
|
|
}
|
|
}
|
|
|
|
public virtual string Section
|
|
{
|
|
get => _section;
|
|
set
|
|
{
|
|
_section = value;
|
|
OnPropertyChanged(nameof(Section));
|
|
}
|
|
}
|
|
|
|
public virtual string TextToSuggest
|
|
{
|
|
get => _textToSuggest;
|
|
set
|
|
{
|
|
_textToSuggest = value;
|
|
OnPropertyChanged(nameof(TextToSuggest));
|
|
}
|
|
}
|
|
|
|
public ListItem(ICommand command)
|
|
: base(command)
|
|
{
|
|
}
|
|
|
|
public ListItem(ICommandItem command)
|
|
: base(command)
|
|
{
|
|
}
|
|
|
|
public ListItem()
|
|
: base()
|
|
{
|
|
}
|
|
}
|