mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-13 11:09:28 +08:00
Bug Fixing - IsSelected is not implemented in ResultItemViewModel
If this property is not implemented, the Theme of selected search result won't take effect.
This commit is contained in:
parent
1b6a43ae15
commit
68ee35d03b
@ -14,6 +14,7 @@ namespace Wox.ViewModel
|
||||
#region Private Fields
|
||||
|
||||
private Result _result;
|
||||
private bool _isSelected;
|
||||
|
||||
#endregion
|
||||
|
||||
@ -77,6 +78,16 @@ namespace Wox.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsSelected
|
||||
{
|
||||
get { return _isSelected; }
|
||||
set
|
||||
{
|
||||
_isSelected = value;
|
||||
OnPropertyChanged("IsSelected");
|
||||
}
|
||||
}
|
||||
|
||||
public RelayCommand OpenResultCommand
|
||||
{
|
||||
get;
|
||||
|
@ -79,8 +79,22 @@ namespace Wox.ViewModel
|
||||
}
|
||||
set
|
||||
{
|
||||
this._selectedResult = value;
|
||||
OnPropertyChanged("SelectedResult");
|
||||
if (value != _selectedResult)
|
||||
{
|
||||
if (null != _selectedResult)
|
||||
{
|
||||
_selectedResult.IsSelected = false;
|
||||
}
|
||||
|
||||
_selectedResult = value;
|
||||
|
||||
if (null != _selectedResult)
|
||||
{
|
||||
_selectedResult.IsSelected = true;
|
||||
}
|
||||
|
||||
OnPropertyChanged("SelectedResult");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user