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
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:material="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:local="clr-namespace:Tango.FSE.Common.Controls">
<Style TargetType="{x:Type local:FSERoundedCornersComboBox}">
<Setter Property="Background" Value="{StaticResource FSE_PrimaryBackgroundDarkBrush}"></Setter>
<Setter Property="BorderBrush" Value="{StaticResource FSE_BorderBrush}"></Setter>
<Setter Property="BorderThickness" Value="1"></Setter>
<Setter Property="Foreground" Value="{StaticResource FSE_PrimaryForegroundBrush}"></Setter>
<Setter Property="CornerRadius" Value="5"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Grid>
<Border
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}"
CornerRadius="{Binding RelativeSource={RelativeSource AncestorType=local:FSERoundedCornersComboBox},Path=CornerRadius}"
SnapsToDevicePixels="True"
Padding="5 2 5 2">
<ComboBox BorderThickness="0"
VerticalAlignment="Center"
Padding="0"
material:ComboBoxAssist.ClassicMode="True"
material:TextFieldAssist.UnderlineBrush="Transparent"
Background="Transparent"
ItemsSource="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=ItemsSource,Mode=TwoWay}"
SelectedItem="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=SelectedItem,Mode=TwoWay}"
SelectedIndex="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=SelectedIndex,Mode=TwoWay}"
SelectedValue="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=SelectedValue,Mode=TwoWay}"
SelectedValuePath="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=SelectedValuePath,Mode=TwoWay}"
DisplayMemberPath="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=DisplayMemberPath,Mode=TwoWay}"/>
</Border>
<Path x:Name="arrow"
Width="8" Height="8"
Margin="0 0 5 0"
Stretch="Uniform"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Data="M7,10L12,15L17,10H7Z"
Fill="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=Foreground}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
|