This project is read-only.

How can I change the default style of a fluent control?

Feb 4, 2011 at 10:46 PM

Hello, When I apply my own style to a control, the control is not displayed??, please help me

 

<Style TargetType="Fluent:InRibbonGallery" x:Key="myStyle">
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="BorderBrush" Value="Green"/>
                    <Setter Property="BorderThickness" Value="4"/>
                </Trigger>
            </Style.Triggers>
 </Style>
<Fluent:InRibbonGallery x:Name="gallery" ItemWidth="70" ItemHeight="70" ResizeMode="Both" Style="{DynamicResource myStyle}"   
                                  MinItemsInRow="2" MaxItemsInRow="4" ItemsSource="{Binding Templates}" Grid.Column="1" Grid.Row="0"
                                  SelectionChanged="gallery_SelectionChanged">    
</Fluent:InRibbonGallery>
Feb 19, 2011 at 8:16 PM

Try setting a value for BasedOn in the style definition. Like this:

<Style TargetType="Fluent:InRibbonGallery" BasedOn="{StaticResource {x:Type f:InRibbonGallery}}"