How to change combobox arrow color in a download application in Windows 8

I have this combobox in a windows store app project

<ComboBox  Grid.Row="2" x:Name="ContactoSelect" Width="200" Height="50" Margin="114,10,27,510" SelectedIndex="0" Background="White" SelectionChanged="ContactoSelect_SelectionChanged">
    <x:String>Item 1</x:String>
    <x:String>Item 2</x:String>
    <x:String>Item 3</x:String>
</ComboBox>

I would like to change the color of the arrow, which is black by default. How can i do this?

+3
source share
2 answers

Right-click the control in Design view

Choose Edit Style> Edit Copy.

A style will be created for the control in xaml inside Page.Resources as ComboBoxStyle1 (the name depends on your x: name)

You will find

<TextBlock x:Name="DropDownGlyph" Grid.Column="1" Foreground="{StaticResource ComboBoxArrowForegroundThemeBrush}" FontWeight="Bold" FontSize="{StaticResource ComboBoxArrowThemeFontSize}" FontFamily="{StaticResource SymbolThemeFontFamily}" HorizontalAlignment="Right" IsHitTestVisible="False" Margin="0,0,6,4" Text="&#xE011;" VerticalAlignment="Center"/>

Change the foreground to the color you want. for example: Foreground = "Red" or any other resource binding.

App.xaml, - ,

    <ComboBox HorizontalAlignment="Left" Margin="187,130,0,0" VerticalAlignment="Top" Width="120" Style="{StaticResource ComboBoxStyle1}"/>
+5

ComboBox , App.xaml "# FF000000" .

<SolidColorBrush x:Key="ComboBoxArrowForegroundThemeBrush" Color="#FF000000" />

/, .

ComboBox

0

All Articles