Issue -- Tiles maximizing when they shouldn't

4 posts, 0 answers
  1. Tracy
    Tracy avatar
    29 posts
    Member since:
    Sep 2010

    Posted 04 May 2012 Link to this post

    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>

     

  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 09 May 2012 Link to this post

    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 >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Tracy
    Tracy avatar
    29 posts
    Member since:
    Sep 2010

    Posted 21 May 2012 Link to this post

    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
  5. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 23 May 2012 Link to this post

    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 >>

Back to Top