62
62
<StackPanel
63
63
x : Name =" HotkeyArea"
64
64
Grid.Column=" 2"
65
- Margin =" 0,0,10, 0"
65
+ Margin =" 0 0 10 0"
66
66
VerticalAlignment =" Center"
67
67
Visibility =" {Binding ShowOpenResultHotkey}" >
68
68
<TextBlock
69
69
x : Name =" Hotkey"
70
- Margin =" 12,0,12, 0"
71
- Padding =" 0,0,0, 0"
70
+ Margin =" 12 0 12 0"
71
+ Padding =" 0 0 0 0"
72
72
HorizontalAlignment =" Right"
73
73
VerticalAlignment =" Center"
74
74
Style =" {DynamicResource ItemHotkeyStyle}" >
97
97
98
98
<Border
99
99
Grid.Column=" 1"
100
- Margin =" 9,0,0, 0"
100
+ Margin =" 9 0 0 0"
101
101
BorderBrush =" Transparent"
102
102
BorderThickness =" 1" >
103
103
<Image
104
104
x : Name =" ImageIcon"
105
- Margin =" 0,0,0, 0"
105
+ Margin =" 0 0 0 0"
106
106
HorizontalAlignment =" Center"
107
107
IsHitTestVisible =" False"
108
108
RenderOptions.BitmapScalingMode=" Fant"
131
131
</Border >
132
132
<Border
133
133
Grid.Column=" 1"
134
- Margin =" 9,0,0, 0"
134
+ Margin =" 9 0 0 0"
135
135
BorderBrush =" Transparent"
136
136
BorderThickness =" 0" >
137
137
<TextBlock
147
147
148
148
<Grid
149
149
Grid.Column=" 1"
150
- Margin =" 6,0,10, 0"
150
+ Margin =" 6 0 10 0"
151
151
HorizontalAlignment =" Stretch"
152
152
VerticalAlignment =" Center" >
153
153
<Grid .RowDefinitions>
173
173
<TextBlock
174
174
x : Name =" Title"
175
175
Grid.Row=" 0"
176
- Margin =" 0,0,0, 1"
176
+ Margin =" 0 0 0 1"
177
177
VerticalAlignment =" Bottom"
178
178
DockPanel.Dock=" Left"
179
179
FontSize =" {Binding Settings.ResultItemFontSize, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
193
193
<TextBlock
194
194
x : Name =" SubTitle"
195
195
Grid.Row=" 1"
196
- Margin =" 0,1,0, 0"
196
+ Margin =" 0 1 0 0"
197
197
VerticalAlignment =" Top"
198
198
FontSize =" {Binding Settings.ResultSubItemFontSize, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
199
199
IsEnabled =" False"
222
222
<!-- http://stackoverflow.com/questions/16819577/setting-background-color-or-wpf-4-0-listbox-windows-8/#16820062 -->
223
223
<ListBox .ItemContainerStyle>
224
224
<Style TargetType =" {x:Type ListBoxItem}" >
225
+ <Style .Triggers>
226
+ <!-- Condition for Type being 'Small' -->
227
+ <MultiDataTrigger >
228
+ <MultiDataTrigger .Conditions>
229
+ <Condition Binding =" {Binding Result.ItemType}" Value =" Small" />
230
+ </MultiDataTrigger .Conditions>
231
+ <MultiDataTrigger .Setters>
232
+ <Setter Property =" Height" Value =" {Binding SmallSize}" />
233
+ </MultiDataTrigger .Setters>
234
+ </MultiDataTrigger >
235
+ <!-- Default condition for Type being other values or not set -->
236
+ <DataTrigger Binding =" {Binding Result.ItemType}" Value =" {x:Null}" >
237
+ <Setter Property =" Height" Value =" {Binding Settings.ItemHeightSize, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
238
+ </DataTrigger >
239
+ <DataTrigger Binding =" {Binding Result.ItemType}" Value =" " >
240
+ <Setter Property =" Height" Value =" {Binding Settings.ItemHeightSize, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
241
+ </DataTrigger >
242
+ <DataTrigger Binding =" {Binding Result.ItemType}" Value =" author" >
243
+ <Setter Property =" Height" Value =" {Binding Settings.ItemHeightSize, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
244
+ </DataTrigger >
245
+ </Style .Triggers>
246
+ <Setter Property =" Visibility" Value =" Visible" />
225
247
<EventSetter Event =" MouseEnter" Handler =" OnMouseEnter" />
226
248
<EventSetter Event =" MouseMove" Handler =" OnMouseMove" />
227
- <Setter Property =" Height" Value =" {Binding Settings.ItemHeightSize, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
228
249
<Setter Property =" Margin" Value =" 0" />
229
250
<Setter Property =" Padding" Value =" 0" />
230
251
<Setter Property =" BorderThickness" Value =" 0" />
256
277
</Setter .Value>
257
278
</Setter >
258
279
</Style >
280
+
259
281
</ListBox .ItemContainerStyle>
260
282
</ListBox >
0 commit comments