Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

New Post: DropDownButton, My Style kills my DropDown-Ability

$
0
0
I`m using the Dropdownbutton
<toolkit:DropDownButton/>

My Problem is, that i defined the template in my style. By doing this my button lost his "dropdown ability" so he acts like a simple normal button..
<Style x:Key="StandardDropDownButton" TargetType="{x:Type toolkit:DropDownButton}">
        <Setter Property="Background" Value="{StaticResource NormalBackground}" />
        <Setter Property="Foreground" Value="#000000" />
        <Setter Property="FontSize" Value="11" />
        <Setter Property="FontFamily" Value="Microsoft Sans Serif" />
        <Setter Property="TextOptions.TextRenderingMode" Value="Aliased" />
        <Setter Property="TextOptions.TextFormattingMode" Value="Display" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type toolkit:DropDownButton}" >
                    <Grid >
                        <Border x:Name="OuterBd" CornerRadius="3" BorderBrush="{StaticResource BorderNormal}" BorderThickness="1" Background="{StaticResource NormalBackground}">
                            <Border x:Name="InnerBd" Padding="5,0,5,0" CornerRadius="3" BorderBrush="{StaticResource BorderNormal}" BorderThickness="0">
                                <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" RecognizesAccessKey="True" VerticalAlignment="Center" />
                            </Border>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="OuterBd" Property="BorderBrush" Value="{StaticResource BorderOver}" />
                        </Trigger>
                        <Trigger Property="IsKeyboardFocused" Value="true">
                            <Setter TargetName="InnerBd" Property="BorderBrush" Value="{StaticResource BorderOver}" />
                        </Trigger>
                      
                    </ControlTemplate.Triggers>
                    
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
what can i do against this?

Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>