This is a migrated thread and some comments may be shown as answers.

RadTileView orientation and margin

0 Answers 44 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Svyatoslav
Top achievements
Rank 1
Svyatoslav asked on 03 Mar 2019, 09:10 PM

Hey. I use RadTileView and this is a great solution. Could you tell me how I can adjust the vertical Tiles distribution instead of the horizontal one? And how can I set margin=0 for Tiles?

01.<telerik:RadTileView x:Name="tile" RowHeight="*" ColumnWidth="*"  ItemsSource="{Binding Path=PictureCollection}" SelectedItem="{Binding Path=SelectedPicture}"  Grid.Column="2" Grid.RowSpan="3" IsAutoScrollingEnabled="True" >
02. 
03.           <telerik:RadTileView.Style>
04.               <Style TargetType="{x:Type telerik:RadTileView}">
05.                   <Setter Property="Margin"
06.                    Value="0"/>
07.               </Style>
08.           </telerik:RadTileView.Style>
09. 
10.           <telerik:RadTileView.ItemContainerStyle>
11.               <Style TargetType="{x:Type telerik:RadTileViewItem}">
12.                   <Setter Property="Margin"
13.                    Value="0"/>
14.               </Style>
15.           </telerik:RadTileView.ItemContainerStyle>
16. 
17. 
18.           <telerik:RadTileView.ItemTemplate>
19.               <DataTemplate>
20.                   <TextBlock Text="{Binding Path=Name}" FontSize="14" FontWeight="Bold"/>
21.               </DataTemplate>
22.           </telerik:RadTileView.ItemTemplate>
23. 
24.           <telerik:RadTileView.ContentTemplate>
25.               <DataTemplate>
26.                   <Grid Margin="0">
27.                           <Grid.RowDefinitions>
28.                               <RowDefinition Height="4*" x:Name="Row1"/>
29.                               <RowDefinition Height="*" x:Name="Row2"/>
30.                           </Grid.RowDefinitions>
31. 
32.                           <Border Background="Black" Margin="0" Grid.Row="0" >
33.                               <Grid>
34.                               <local2:ZoomBorder  ClipToBounds="True"  x:Name="BorderName">
35.                                       <Grid>
36.                                           <Image  x:Name="ImageTop" Source="{Binding Path=Image}"  />
37.                                       <Button Command="{Binding RelativeSource={RelativeSource AncestorType=Controls:MetroWindow, Mode=FindAncestor}, Path=DataContext.FullScreenCommand}" CommandParameter="{Binding Path=Name}" HorizontalAlignment="Right" VerticalAlignment="Top" Width="50" Height="50" Style="{DynamicResource MetroCircleButtonStyle}" Background="{DynamicResource AccentColorBrush}" ToolTip="{x:Static res:Resources.FullScreen}" Opacity="0.7" Margin="0,20,20,0">
38.                                               <Rectangle Fill="{DynamicResource BlackColorBrush}" Width="20" Height="20">
39.                                                   <Rectangle.OpacityMask>
40.                                                       <VisualBrush Visual="{StaticResource appbar_vector_group}" Stretch="Fill"/>
41.                                                   </Rectangle.OpacityMask>
42.                                               </Rectangle>
43.                                           </Button>
44.                                       </Grid>
45.                                   </local2:ZoomBorder>
46.                               </Grid>
47.                           </Border>
48.                       <Controls:Tile  Margin="0"  Content="{x:Static res:Resources.Capture_Image}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Command="{Binding RelativeSource={RelativeSource AncestorType=Controls:MetroWindow, Mode=FindAncestor}, Path=DataContext.WebCamCaptureCommand}" CommandParameter="{Binding  Path=Name}" Grid.Row="1"  Height="{Binding ElementName=Row1, Path=Height}"   Width="{Binding ElementName=BorderName, Path=Width}" FontWeight="Bold" FontSize="14"/>
49.                       </Grid>
50. 
51.               </DataTemplate>
52.           </telerik:RadTileView.ContentTemplate>
53.       </telerik:RadTileView>


No answers yet. Maybe you can help?

Tags
TileView
Asked by
Svyatoslav
Top achievements
Rank 1
Share this question
or