1- <Styles xmlns =" https://github.com/avaloniaui"
2- xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml"
3- xmlns : cc =" clr-namespace:AvaloniaEdit.CodeCompletion;assembly=AvaloniaEdit" >
1+ <ResourceDictionary xmlns =" https://github.com/avaloniaui"
2+ xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml"
3+ xmlns : cc =" clr-namespace:AvaloniaEdit.CodeCompletion" >
4+ <ControlTheme x : Key =" {x:Type cc:OverloadViewer}" TargetType =" cc:OverloadViewer" >
5+ <Setter Property =" BorderThickness" Value =" 1" />
6+ <Setter Property =" BorderBrush" Value =" Black" />
7+ <Setter Property =" Background" Value =" #eeeeee" />
8+ <Setter Property =" Padding" Value =" 2" />
9+ <Setter Property =" Template" >
10+ <ControlTemplate >
11+ <Border BorderThickness =" {TemplateBinding BorderThickness}"
12+ BorderBrush =" {TemplateBinding BorderBrush}"
13+ Background =" {TemplateBinding Background}"
14+ Padding =" {TemplateBinding Padding}" >
15+ <Grid ColumnDefinitions =" Auto,*"
16+ RowDefinitions =" Auto,*" >
417
5- <Style Selector =" cc|OverloadViewer" >
6- <Setter Property =" BorderThickness"
7- Value =" 1" />
8- <Setter Property =" BorderBrush"
9- Value =" Black" />
10- <Setter Property =" Background"
11- Value =" #eeeeee" />
12- <Setter Property =" Padding"
13- Value =" 2" />
14- <Setter Property =" Template" >
15- <ControlTemplate >
16- <Border BorderThickness =" {TemplateBinding BorderThickness}"
17- BorderBrush =" {TemplateBinding BorderBrush}"
18- Background =" {TemplateBinding Background}"
19- Padding =" {TemplateBinding Padding}" >
20- <Grid ColumnDefinitions =" Auto,*"
21- RowDefinitions =" Auto,*" >
18+ <StackPanel Grid.Row=" 0"
19+ Grid.Column=" 0"
20+ Margin =" 0,0,4,0"
21+ Orientation =" Horizontal"
22+ IsVisible =" {Binding Provider.Count, RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static cc:CollapseIfSingleOverloadConverter.Instance}}" >
23+ <Button Name =" PART_UP" >
24+ <Path Stroke =" Black"
25+ Fill =" Black"
26+ Data =" M 0,0.866 L 1,0.866 L 0.5,0 Z"
27+ Stretch =" UniformToFill" />
28+ </Button >
29+ <TextBlock Margin =" 2,0,2,0"
30+ Text =" {Binding Provider.CurrentIndexText, RelativeSource={RelativeSource TemplatedParent}}" />
31+ <Button Name =" PART_DOWN" >
32+ <Path Stroke =" Black"
33+ Fill =" Black"
34+ Data =" M 0,0 L 1,0 L 0.5,0.866 Z"
35+ Stretch =" UniformToFill" />
36+ </Button >
37+ </StackPanel >
38+ <ContentPresenter Grid.Row=" 0"
39+ Grid.Column=" 1"
40+ Content =" {Binding Provider.CurrentHeader, RelativeSource={RelativeSource TemplatedParent}}" />
41+ <ContentPresenter Grid.Row=" 1"
42+ Grid.Column=" 0"
43+ Grid.ColumnSpan=" 2"
44+ Content =" {Binding Provider.CurrentContent, RelativeSource={RelativeSource TemplatedParent}}" />
45+ </Grid >
46+ </Border >
47+ </ControlTemplate >
48+ </Setter >
2249
23- <StackPanel Grid.Row=" 0"
24- Grid.Column=" 0"
25- Margin =" 0,0,4,0"
26- Orientation =" Horizontal"
27- IsVisible =" {Binding Provider.Count, RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static cc:CollapseIfSingleOverloadConverter.Instance}}" >
28- <Button Name =" PART_UP" >
29- <Path Stroke =" Black"
30- Fill =" Black"
31- Data =" M 0,0.866 L 1,0.866 L 0.5,0 Z"
32- Stretch =" UniformToFill" />
33- </Button >
34- <TextBlock Margin =" 2,0,2,0"
35- Text =" {Binding Provider.CurrentIndexText, RelativeSource={RelativeSource TemplatedParent}}" />
36- <Button Name =" PART_DOWN" >
37- <Path Stroke =" Black"
38- Fill =" Black"
39- Data =" M 0,0 L 1,0 L 0.5,0.866 Z"
40- Stretch =" UniformToFill" />
41- </Button >
42- </StackPanel >
43- <ContentPresenter Grid.Row=" 0"
44- Grid.Column=" 1"
45- Content =" {Binding Provider.CurrentHeader, RelativeSource={RelativeSource TemplatedParent}}" />
46- <ContentPresenter Grid.Row=" 1"
47- Grid.Column=" 0"
48- Grid.ColumnSpan=" 2"
49- Content =" {Binding Provider.CurrentContent, RelativeSource={RelativeSource TemplatedParent}}" />
50- </Grid >
51- </Border >
52- </ControlTemplate >
53- </Setter >
50+ <Style Selector =" ^/template/ Button" >
51+ <Setter Property =" Background" Value =" LightGray" />
52+ <Setter Property =" Padding" Value =" 2,2,2,2" />
53+ <Setter Property =" Width" Value =" 9" />
54+ <Setter Property =" Height" Value =" 9" />
55+ <Setter Property =" Template" >
56+ <ControlTemplate >
57+ <Border Name =" bd"
58+ Background =" {TemplateBinding Background}"
59+ CornerRadius =" 2" >
60+ <ContentPresenter Margin =" {TemplateBinding Padding}"
61+ Content =" {TemplateBinding Content}" />
62+ </Border >
63+ </ControlTemplate >
64+ </Setter >
5465 </Style >
55-
56- <Style Selector =" cc|OverloadViewer /template/ Button" >
57- <Setter Property =" Background"
58- Value =" LightGray" />
59- <Setter Property =" Padding"
60- Value =" 2,2,2,2" />
61- <Setter Property =" Width"
62- Value =" 9" />
63- <Setter Property =" Height"
64- Value =" 9" />
65- <Setter Property =" Template" >
66- <ControlTemplate >
67- <Border Name =" bd"
68- Background =" {TemplateBinding Background}"
69- CornerRadius =" 2" >
70- <ContentPresenter Margin =" {TemplateBinding Padding}"
71- Content =" {TemplateBinding Content}" />
72- </Border >
73- </ControlTemplate >
74- </Setter >
75- </Style >
76- </Styles >
66+
67+ </ControlTheme >
68+ </ResourceDictionary >
0 commit comments