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.
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
Vlad,
I'm a bit confused about how to change the TilePaneFillKey into a style that I can apply to the TilePane. Can you please post an example of what the style should look like.
Or at least if you can let me know what property the gradient should be applied to for the header background.
Thanks & RegardsCornelius Kruger