Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
115
TilePane Header background style
posted

I am interested to give a gradient background color in the TilePane Header section.

Can someone give me a brief sample on how to implement it? I am using TilePaneContainerStyle property but I have no luck. Greatly appreciated for any feedbacks! Thanks.

Parents
No Data
Reply
  • 9836
    Suggested Answer
    posted

    Hello,

    In order to do this you will have to focus on the TilePaneFillKey brush which is the default brush for the header and can be located in DefaultStyle\XamWebTileView.xaml

    <!--TilePane Background-->
    <LinearGradientBrush x:Key="TilePaneFillKey" StartPoint="0.5,0" EndPoint="0.5,1">
                <LinearGradientBrush.GradientStops>
                    <GradientStopCollection>
                        <GradientStop Offset="0" Color="Red"/>
                        <GradientStop Offset="1" Color="White"/>
                    </GradientStopCollection>
                </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>

    You can create a style for the TilePane as a resource and then set it for all the panes using the code below:

    <ig:XamWebTileView.DefaultItemsContainer>
                    <DataTemplate>
                           <ig:TilePane Style="{StaticResource TilePaneCustomStyle1}" />
                    </DataTemplate>
     </ig:XamWebTileView.DefaultItemsContainer>

    or set it to particular TilePane:

    <igTileView:TilePane Style="{StaticResource TilePaneCustomStyle1}"/>

    Let me know if you have any questions with this matter.

    Vlad

Children