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

TileView with problem

1 Answer 108 Views
TileView
This is a migrated thread and some comments may be shown as answers.
ITA
Top achievements
Rank 1
ITA asked on 19 Jun 2015, 01:43 PM

Hi,

i tried your wpf exmaple of the tileview control:

       </Grid.RowDefinitions>
  
        <Border Grid.Row="0" Grid.Column="0" Background="#5ab765" Margin="0,0,5,0">
            <StackPanel Orientation="Horizontal" Margin="10,5,10,5" HorizontalAlignment="Left">
                <Image  Stretch="Uniform" Margin="5" Source="Style/Images/lupe.png" />
                <TextBox BorderThickness="0" Padding="3" MinWidth="230" Background="white" x:Name="SuchenInput"
                                            HorizontalContentAlignment="Left" VerticalContentAlignment="Center" TabIndex="1"
                                            HorizontalAlignment="Center"/>
            </StackPanel>
        </Border>
          
        <Border Grid.Row="0" Grid.Column="1" Background="#5ab765" Margin="5,0,0,0">
            <Label Content="{Binding Value}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" FontSize="18" x:Name="AufgabeNrlbl"/>
        </Border>
          
        <telerik:RadGridView x:Name="RadGridView1" GroupRenderMode="Flat" telerik:StyleManager.Theme="Windows8Touch"
                             ItemsSource="{Binding Adressen}" GroupPanelBackground="#4582bb"
                             ColumnWidth="*" CanUserFreezeColumns="False" Margin="5,10,5,10" Grid.Row="1" Grid.Column="0"
                             RowIndicatorVisibility="Collapsed" ShowGroupPanel="False" AutoGenerateColumns="False"
                             flexCrmAdressen:CustomFilterBehavior.TextBox="{Binding ElementName=SuchenInput}">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding FirstName}" Width="*" Header="Name" x:Name="Namelbl" IsVisible="True" />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
  
        <telerik:RadTileView x:Name="DetailView" Grid.Row="1" Grid.Column="1" Margin="0" ColumnWidth="Auto"
                             DragMode="{Binding ElementName=dragMode, Path=SelectedItem}" IsItemsSizeInPercentages="True"
                             MinimizedColumnWidth="250" PreservePositionWhenMaximized="true" MinimizedRowHeight="Auto"
                             telerik:TileViewPanel.IsRowsShrinkEnabled="True" telerik:TileViewPanel.IsSizeBoundToPosition="True"
                             RowHeight="Auto" telerik:TileViewPanel.IsColumnsShrinkEnabled="True"
                             telerik:StyleManager.Theme="Windows8Touch">
            <telerik:RadTileViewItem Header="Generell" RestoredHeight="38" MinimizedHeight="200" RestoredWidth="200"
                                     PreviewPositionChanged="RadTileViewItem_PreviewPositionChanged">
                <StackPanel Margin="5 5 0 0" >
                    <Label Content="Teeeeeeeeeeeeeeeeest" Background="Aqua" Width="200"></Label>
                </StackPanel>
            </telerik:RadTileViewItem>
            <telerik:RadTileViewItem Header="My Settings" RestoredHeight="38" MinimizedHeight="160" RestoredWidth="50">
                <StackPanel Margin="5 5 0 0">
                    <Label Content="Teeeeeeeeeeeeeeeeest" Background="Aqua"></Label>
                </StackPanel>
            </telerik:RadTileViewItem>
            <telerik:RadTileViewItem Header="My Calendar" RestoredHeight="38" MinimizedHeight="200" RestoredWidth="50">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition MinWidth="218" />
                    </Grid.ColumnDefinitions>
                    <telerik:RadCalendar x:Name="myCalandar" Margin="7" />
                </Grid>
            </telerik:RadTileViewItem>
            <telerik:RadTileViewItem Header="Item4">
                <TextBlock Text="Item4 Content" />
            </telerik:RadTileViewItem>
            <telerik:RadTileViewItem Header="Item5">
                <TextBlock Text="Item5 Content" />
            </telerik:RadTileViewItem>
            <telerik:RadTileViewItem Header="Item6">
                <TextBlock Text="Item6 Content" />
            </telerik:RadTileViewItem>
            <telerik:RadTileViewItem Header="Item7">
                <TextBlock Text="Item6 Content" />
            </telerik:RadTileViewItem>
  
        </telerik:RadTileView>
    </Grid>
</UserControl>

 i attached a image as it look like now. Why dow not stop the tileview with on the yellow line? I your example the TileViewItems are in the window.

Thanks a lot

best regards

rene

1 Answer, 1 is accepted

Sort by
0
Milena
Telerik team
answered on 22 Jun 2015, 10:30 AM
Hi Rene,

Thank you for the code-snippet provided.

I'm not quite sure what do you mean by "Why dow not stop the tileview with on the yellow line?" , but I suppose that you are asking about the first TileViewItem width? I saw that you set IsItemsSizeInPercentages property of the TileView to True. Please have in mind that in this case the control defines items' size according to the value of RestoredWidth in percentages, e.g. if you set the RestoredWidth of the first item to 50 and to the next 2 in the row to 25, this mean that the first tileviewItem will take the half of the row and the rest two items 1/2 from the another half (see the attached picture). If you want the TileViewItem to have 200 width in pixel measurements, then you should set the IsItemsSizeInPercentages property to false.

I hope this helps. If you need any further assistance or if I didn't understand you right, please give us more information about your scenario and the expected behavior. Thank you in advance.

Regards,
Milena
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
TileView
Asked by
ITA
Top achievements
Rank 1
Answers by
Milena
Telerik team
Share this question
or