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

Issue -- Tiles maximizing when they shouldn't

3 Answers 47 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Tracy
Top achievements
Rank 1
Tracy asked on 04 May 2012, 10:39 PM
Hi,

I have a problem with tiles maximizing as a result from the following steps:
  1. Start in restored state.
  2. User drags a tile from one position to another.
  3. User clicks on the white space within the tile that was dragged.
  4. Tile maximizes.

Is there a way to force the tiles to ONLY maximize when the tile header is clicked?

Thanks
Tracy

Here is my xaml for reference:

<telerik:RadTileView x:Name="ChartTiles"
                                Background="Transparent"
                                TileStateChangeTrigger="SingleClick"
                                telerik:StyleManager.Theme="Office_Blue"
                                ColumnWidth="Auto"
                                RowHeight="Auto"
                                MinimizedColumnWidth="300"
                                MinimizedRowHeight="300"
                                PreservePositionWhenMaximized="true"
                                IsItemsSizeInPercentages="True"
                                ItemsSource="{Binding Charts}"
                                telerik:TileViewPanel.IsColumnsShrinkEnabled="True"
                                telerik:TileViewPanel.IsRowsShrinkEnabled="True"
                                telerik:TileViewPanel.IsSizeBoundToPosition="True"
                                >
 
    <telerik:RadTileView.ItemTemplate>
        <DataTemplate>
            <TextBlock Text="{Binding Name}" Style="{StaticResource tileItemStyle}"/>
        </DataTemplate>
    </telerik:RadTileView.ItemTemplate>
 
    <telerik:RadTileView.ItemContainerStyle>
        <Style TargetType="telerik:RadTileViewItem">
            <Setter Property="RestoredHeight" Value="{Binding TileRestoredHeight, Mode=TwoWay}" />
            <Setter Property="RestoredWidth" Value="{Binding TileRestoredWidth, Mode=TwoWay}" />
            <Setter Property="MinimizedHeight" Value="{Binding TileMinimizedHeight, Mode=TwoWay}" />
            <Setter Property="Position" Value="{Binding TilePosition, Mode=TwoWay}" />
            <Setter Property="TileState" Value="{Binding TileState, Mode=TwoWay}" />
            <Setter Property="Background" Value="Transparent" />
        </Style>
    </telerik:RadTileView.ItemContainerStyle>
 
    <telerik:RadTileView.ContentTemplate>
        <DataTemplate>
            <Grid x:Name="ChartTileGrid" Background="Transparent"
                  Height="{Binding Path=ActualHeight, RelativeSource={RelativeSource TemplatedParent}}" >
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition />
                </Grid.RowDefinitions>
 
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
 
                <StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Top"
                            Orientation="Horizontal" Height="30"
                            Visibility="{Binding PieBarChartSwitchVisibility}">
                    <RadioButton Content="Pie Chart" IsChecked="{Binding Path=IsPieChartActive}" Margin="0,5,0,5"/>
                    <RadioButton Content="Bar Chart" IsChecked="{Binding Path=IsBarChartActive}" Margin="5"/>
                </StackPanel>
 
                <ecaCharting:PieChartControl Grid.Row="1" Grid.ColumnSpan="2"
                                             Height="{Binding ElementName=ChartTileGrid, Path=ActualHeight}"
                                             Width="{Binding ElementName=ChartTileGrid, Path=ActualWidth}"
                                             Visibility="{Binding Path=PieChartVisibility, TargetNullValue=Collapsed, FallbackValue=Collapsed}"                                                
                                             />
 
                <ecaCharting:BarChartControl Grid.Row="1" Grid.ColumnSpan="2"
                                        Visibility="{Binding Path=BarChartVisibility, TargetNullValue=Collapsed, FallbackValue=Collapsed}"
                                        />
 
            </Grid>
 
        </DataTemplate>
    </telerik:RadTileView.ContentTemplate>
 
</telerik:RadTileView>

 

3 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 09 May 2012, 04:06 PM
Hello Tracy,

This is actually a bug and therefore I logged it in our PITS where you can track its progress. I also updated your Telerik account for bringing this issue to our attention.

As a workaround until the issue is addressed, you can handle the ChartTileGrid PreviewMouseLeftButtonUp event:
private void ChartTileGrid_PreviewMouseLeftButtonUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
    e.Handled = true;
}
Let us know if that helps.

Regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Tracy
Top achievements
Rank 1
answered on 21 May 2012, 11:45 PM
Thanks for your help, but we had to switch to double-click mode. Our tiles contain instances of your RadPieChart and are interactive, so the handling of the preview mouse event interferred with that.

Tracy
0
Tina Stancheva
Telerik team
answered on 23 May 2012, 09:34 AM
Hi Tracy,

As a follow up, I wanted to let you know that we fixed the issue and the fix will be available with the upcoming Q2 2012 release.

Regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
TileView
Asked by
Tracy
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Tracy
Top achievements
Rank 1
Share this question
or