blob: 5f5f1887de2277c35960ae77d9cf89fdd57005ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:AvalonEdit="clr-namespace:ICSharpCode.AvalonEdit"
xmlns:cc="clr-namespace:ICSharpCode.AvalonEdit.CodeCompletion"
>
<!--<Style TargetType="{x:Type ListBoxItem}" x:Key="CompletionListBoxItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border Name="Bd"
Background="#202020"
BorderBrush="#222222"
BorderThickness="0 0 0 1"
Padding="{TemplateBinding Padding}"
SnapsToDevicePixels="true">
<ContentPresenter
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Border>
--><!-- Simplified triggers:
we don't want a gray selection background when the ListBox doesn't have focus
--><!--
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="true">
<Setter Property="Background"
Value="#242424"/>
<Setter Property="Foreground"
Value="#242424"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>-->
<Style TargetType="{x:Type cc:CompletionList}">
<Style.Resources>
<Style TargetType="ListBoxItem">
<Setter Property="Background" Value="#202020"></Setter>
<Setter Property="Foreground" Value="Gainsboro"></Setter>
<Setter Property="Padding" Value="2"></Setter>
<Setter Property="BorderThickness" Value="0"></Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Foreground" Value="#202020"></Setter>
</Trigger>
</Style.Triggers>
</Style>
</Style.Resources>
<Setter Property="Background" Value="#202020"></Setter>
<Setter Property="BorderThickness" Value="0"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type cc:CompletionList}">
<cc:CompletionListBox x:Name="PART_ListBox">
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Image Source="{Binding Image}" Width="16" Height="16" Margin="0,0,4,0"/>
<ContentControl Content="{Binding Content}" />
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</cc:CompletionListBox>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
|