Minimizing Item Size in WPF Tile View
The size of the minimized TileViewItem can be set by using the MinimizedItemsPercentage property. The size of the minimized items is set in percentage. The percentage set is calculated relative to the total size of the control.
Adding Minimizing Item size to an Application
The minimizing item size can be added to an application by using either XAML or C# code.
Adding through XAML
The following code example illustrates how to add the minimizing item size to an application through XAML.
<syncfusion:TileViewControl x:Name="TileView1" Background="White"
MinimizedItemsPercentage="60">
<syncfusion:TileViewItem BorderThickness="2" Header="TileViewItem 1"
Content="TileViewContent" Margin="2"
HeaderBackground="Gray" CornerRadius="3"/>
<syncfusion:TileViewItem BorderThickness="2" Header="TileViewItem 2"
Content="TileViewContent" Margin="2"
HeaderBackground="Gray" CornerRadius="3"/>
<syncfusion:TileViewItem BorderThickness="2" Header="TileViewItem 3"
Content="TileViewContent" Margin="2"
HeaderBackground="Gray" CornerRadius="3"/>
<syncfusion:TileViewItem BorderThickness="2" Header="TileViewItem 4"
Content="TileViewContent" Margin="2"
HeaderBackground="Gray" CornerRadius="3"/>
</syncfusion:TileViewControl>
Adding through C#
The following code example illustrates how to add the minimizing item size to an application through C#.
TileViewControl Tile = new TileViewControl();
Tile.MinimizedItemsPercentage = 60;
Tile.Background = new SolidColorBrush(Colors.White);
for (int i = 1; i <= 4; i++)
{
TileViewItem item1 = new TileViewItem();
item1.HeaderBackground = new SolidColorBrush(Colors.Gray);
item1.Margin = new Thickness(2d);
item1.Content = "TileViewContent";
item1.Header = "TileViewItem - " + i;
Tile.Items.Add(item1);
}
this.LayoutRoot.Children.Add(Tile);
Events
Sample Link
To view samples:
- Select Start -> Programs -> Syncfusion -> Essential Studio x.x.xx -> Dashboard.
- Select Run Locally Installed Samples in WPF Button.
- Now expand the DragAndDropManagerDemo tree-view item in the Sample Browser.
- Choose any one of the samples listed under it to launch.
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page