Articles in this section

How to set margin between each TileViewItem in TileViewControl?

You can set the margin between each TileViewItems by setting the Margin property in ItemContainerStyle in WPF TileView control. Refer the following code for your reference.

 

XAML

 

<!-- Set Margin  -->
<Window.Resources>
   <Style x:Key="tileViewItemStyle" TargetType="{x:Type syncfusion:TileViewItem}">
            <Setter Property="Margin" Value="5,5,5,5" />
   </Style>
</Window.Resources>
 
<!-- TileView  -->
<Grid>
  <syncfusion:TileViewControl x:Name="tileViewControl" HorizontalAlignment="Stretch" Height="300" Width="300" VerticalAlignment="Stretch" ItemContainerStyle="{StaticResource tileViewItemStyle}">
    <syncfusion:TileViewItem Header="Item 1"/>
    <syncfusion:TileViewItem Header="Item 2"/>
    <syncfusion:TileViewItem Header="Item 3"/>
    <syncfusion:TileViewItem Header="Item 4"/>
  </syncfusion:TileViewControl>
</Grid>

Screenshot

Set margin between tileview items in WPF TileView control.

 

C#: View sample in GitHub.

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied