mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 11:39:16 +08:00
fix #665
This commit is contained in:
parent
95cdc89795
commit
e480cdbf9b
@ -41,22 +41,21 @@
|
||||
<RowDefinition Height="Auto" x:Name="SubTitleRowDefinition" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Style="{DynamicResource ItemTitleStyle}" DockPanel.Dock="Left"
|
||||
VerticalAlignment="Center" ToolTip="{Binding Title}" x:Name="tbTitle"
|
||||
VerticalAlignment="Center" ToolTip="{Binding Title}" x:Name="Title"
|
||||
Text="{Binding Title}" />
|
||||
<TextBlock Style="{DynamicResource ItemSubTitleStyle}" ToolTip="{Binding SubTitle}"
|
||||
Grid.Row="1" x:Name="tbSubTitle" Text="{Binding SubTitle}" />
|
||||
Grid.Row="1" x:Name="SubTitle" Text="{Binding SubTitle}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Button.Content>
|
||||
</Button>
|
||||
<!-- a result item height is 50 including margin -->
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=IsSelected}" Value="True">
|
||||
<Setter TargetName="tbTitle" Property="Style" Value="{DynamicResource ItemTitleSelectedStyle}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Path=IsSelected}" Value="True">
|
||||
<Setter TargetName="tbSubTitle" Property="Style"
|
||||
Value="{DynamicResource ItemSubTitleSelectedStyle}" />
|
||||
<DataTrigger
|
||||
Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBoxItem}}, Path=IsSelected}"
|
||||
Value="True">
|
||||
<Setter TargetName="Title" Property="Style" Value="{DynamicResource ItemTitleSelectedStyle}" />
|
||||
<Setter TargetName="SubTitle" Property="Style" Value="{DynamicResource ItemSubTitleSelectedStyle}" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
@ -64,7 +63,7 @@
|
||||
<!--http://stackoverflow.com/questions/16819577/setting-background-color-or-wpf-4-0-listbox-windows-8/#16820062-->
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type ListBoxItem}">
|
||||
<EventSetter Event="MouseEnter" Handler="OnMouseEnter"></EventSetter>
|
||||
<EventSetter Event="MouseEnter" Handler="OnMouseEnter" />
|
||||
<Setter Property="Height" Value="50" />
|
||||
<Setter Property="Margin" Value="0" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
|
@ -63,16 +63,6 @@ namespace Wox.ViewModel
|
||||
set { RawResult.Action = value; }
|
||||
}
|
||||
|
||||
public bool IsSelected
|
||||
{
|
||||
get { return _isSelected; }
|
||||
set
|
||||
{
|
||||
_isSelected = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
Loading…
Reference in New Issue
Block a user