Custom TileView Template

2 posts, 0 answers
  1. Kathleen
    Kathleen avatar
    55 posts
    Member since:
    Jun 2009

    Posted 28 Mar 2011 Link to this post

    I recently got the latest version and am trying to make it work with our existing product and am hitting several issues.

    The current issue is that we have a template for the tile view item that adds a Close button, based on the Windows7 theme.

    In the current release, the min/max toggle button doesn't work at all.  I went looking for the most current template for Windows7 from the source control and find that its not there anymore.  I'm looking in:

    C:\RadControls_for_Silverlight4_2011_1_0315_Source\Themes\Windows7\Themes

    My current template looks like this:

    <telerikNavigation:RadTileViewItem.Resources>
          <presentationC:TypeVisibilityConverter x:Key="typeVisibilityConverter"/>
          <DataTemplate x:Key="DashletViewTemplate">
              <Grid>
                  <local:SmallContentView Loaded="SmallContentView_Loaded"
                                          Visibility="Collapsed"/>
                  <Grid Style="{StaticResource ContentContainerGridStyle}"                      
                                Loaded="LargeContent_Loaded"                                            
                                />
              </Grid>     
          </DataTemplate>
          <LinearGradientBrush x:Key="TileView_Background" EndPoint="0.5,1" StartPoint="0.5,0">
              <GradientStop Color="White" />
              <GradientStop Color="#FF4A6AA7" Offset="2" />
          </LinearGradientBrush>
          <LinearGradientBrush x:Key="TileView_HeaderBackground" EndPoint="0.5,1" StartPoint="0.5,0">
              <GradientStop Color="White" />
              <GradientStop Color="#FF4A6AA7" Offset="1.5" />
          </LinearGradientBrush>
          <LinearGradientBrush x:Key="TileView_HeaderBackground_Focused" EndPoint="0.5,1" StartPoint="0.5,0">
              <GradientStop Color="White" />
              <GradientStop Color="#FF4A6AA7" Offset="2" />
          </LinearGradientBrush>
          <SolidColorBrush x:Key="TileView_HeaderBorder" Color="#FFFFFFFF"/>
          <Thickness x:Key="TileView_HeaderBorder_Thickness">0 0 0 1</Thickness>
          <!-- brushes which we used in the style of the button -->
          <LinearGradientBrush x:Key="TileView_ButtonBackground" EndPoint="0.5,1" StartPoint="0.5,0">
              <GradientStop Color="#FF1E395B" Offset="0.004" />
              <GradientStop Color="#FF8CA0B9" Offset="1" />
          </LinearGradientBrush>
          <SolidColorBrush x:Key="TileView_ButtonOuterBorder" Color="#FFFFFFFF"/>
          <LinearGradientBrush x:Key="TileView_ButtonBackground_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
              <GradientStop Color="#FFFEEDB7" Offset="0"/>
              <GradientStop Color="#FFFACA6A" Offset="1"/>
              <GradientStop Color="#FFFFC94A" Offset="0.526"/>
              <GradientStop Color="#FFFEEDB7" Offset="0.509"/>
          </LinearGradientBrush>
          <LinearGradientBrush x:Key="TileView_ButtonBackground_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
              <GradientStop Color="#FFFECE95" Offset="0"/>
              <GradientStop Color="#FFFEB407" Offset="1"/>
              <GradientStop Color="#FFFEBB6E" Offset="0.517"/>
              <GradientStop Color="#FFE78318" Offset="0.539"/>
          </LinearGradientBrush>
          <Thickness x:Key="TileView_InneBorder_Thickness">2</Thickness>
          <CornerRadius x:Key="TileView_HeaderBorder_CornerRadius">1</CornerRadius>
          <LinearGradientBrush x:Key="TileView_HeaderBorder_HorizontalSplitterOpacityMask" EndPoint="0.5,1" StartPoint="0.5,0">
              <GradientStop Color="Black" Offset="0"/>
              <GradientStop Offset="1"/>
          </LinearGradientBrush>
          <SolidColorBrush x:Key="TileView_HeaderBorder_HorizontalSplitterBackground" Color="#FFBFBFBF"/>
          <SolidColorBrush x:Key="DisabledBrush" Color="#99FFFFFF"/>
          <SolidColorBrush x:Key="TileView_OuterBorder" Color="#FF91C3FF" />
          <CornerRadius x:Key="TileView_OuterBorder_CornerRadius">3</CornerRadius>
          <SolidColorBrush x:Key="TileView_InneBorder" Color="#FFFFFFFF" />
          <CornerRadius x:Key="TileView_InneBorder_CornerRadius">2</CornerRadius>
          <SolidColorBrush x:Key="TileView_Background_Focused" Color="#FFFFFFFF" />
          <SolidColorBrush x:Key="TileView_OuterBorder_Focused" Color="#FF83A5D2" />
          <CornerRadius x:Key="TileView_OuterBorder_CornerRadius_Focused">2</CornerRadius>
          <SolidColorBrush x:Key="TileView_InneBorder_Focused" Color="#FFFFFFFF" />
          <CornerRadius x:Key="TileView_InneBorder_CornerRadius_Focused">1</CornerRadius>
          <Thickness x:Key="TileView_InneBorder_Thickness_Focused">2</Thickness>
          <CornerRadius x:Key="TileView_HeaderBorder_CornerRadius_Focused">1</CornerRadius>
          <SolidColorBrush x:Key="TileView_HeaderBorder_Focused" Color="#FFFFFFFF" />
          <Thickness x:Key="TileView_HeaderBorder_Thickness_Focused">0 0 0 1</Thickness>
          <LinearGradientBrush x:Key="TileView_ButtonBackground_MouseOver_Focused" EndPoint="0.5,1"
              StartPoint="0.5,0">
              <GradientStop Color="#FFFEEDB7" Offset="0" />
              <GradientStop Color="#FFFACA6A" Offset="1" />
              <GradientStop Color="#FFFFC94A" Offset="0.526" />
              <GradientStop Color="#FFFEEDB7" Offset="0.509" />
          </LinearGradientBrush>
          <LinearGradientBrush x:Key="TileView_ButtonBackground_Pressed_Focused" EndPoint="0.5,1"
              StartPoint="0.5,0">
              <GradientStop Color="#FFFECE95" Offset="0" />
              <GradientStop Color="#FFFEB407" Offset="1" />
              <GradientStop Color="#FFFEBB6E" Offset="0.517" />
              <GradientStop Color="#FFE78318" Offset="0.539" />
          </LinearGradientBrush>
          <LinearGradientBrush x:Key="TileView_ButtonBackground_Focused" EndPoint="0.5,1" StartPoint="0.5,0">
              <GradientStop Color="#FF3C6AA3" Offset="0" />
              <GradientStop Color="#FF83A5D2" Offset="1" />
          </LinearGradientBrush>
          <SolidColorBrush x:Key="TileView_ButtonOuterBorder_Focused" Color="#FFFFFFFF" />
          <LinearGradientBrush x:Key="TileView_HeaderBorder_HorizontalSplitterOpacityMask_Focused"
              EndPoint="0.5,1" StartPoint="0.5,0">
              <GradientStop Color="Black" Offset="0" />
              <GradientStop Offset="1" />
          </LinearGradientBrush>
          <SolidColorBrush x:Key="TileView_HeaderBorder_HorizontalSplitterBackground_Focused" Color="#FF9BB4D4" />
          <!-- Button style -->
          <Style x:Key="Refresh_ButtonStyle" TargetType="Button">
              <Setter Property="Background" Value="Transparent"/>
              <Setter Property="Foreground" Value="#FF000000"/>
              <Setter Property="Padding" Value="3"/>
              <Setter Property="BorderThickness" Value="11"/>
              <Setter Property="BorderBrush" Value="Transparent" />
              <Setter Property="Template">
                  <Setter.Value>
                      <ControlTemplate TargetType="Button">
                          <Grid>
                              <VisualStateManager.VisualStateGroups>
                                  <VisualStateGroup x:Name="CommonStates">
                                      <VisualState x:Name="Normal"/>
                                      <VisualState x:Name="MouseOver">
                                          <Storyboard>
                                              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Path" Storyboard.TargetProperty="Fill">
                                                  <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TileView_ButtonBackground_MouseOver}"/>
                                              </ObjectAnimationUsingKeyFrames>
                                              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Path2" Storyboard.TargetProperty="Fill">
                                                  <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TileView_ButtonBackground_MouseOver}"/>
                                              </ObjectAnimationUsingKeyFrames>
                                          </Storyboard>
                                      </VisualState>
                                      <VisualState x:Name="Pressed">
                                          <Storyboard>
                                              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Path" Storyboard.TargetProperty="Fill">
                                                  <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TileView_ButtonBackground_Pressed}"/>
                                              </ObjectAnimationUsingKeyFrames>
                                              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Path2" Storyboard.TargetProperty="Fill">
                                                  <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TileView_ButtonBackground_Pressed}"/>
                                              </ObjectAnimationUsingKeyFrames>
                                          </Storyboard>
                                      </VisualState>
                                      <VisualState x:Name="Disabled">
                                          <Storyboard>
                                              <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity">
                                                  <SplineDoubleKeyFrame KeyTime="0" Value=".55"/>
                                              </DoubleAnimationUsingKeyFrames>
                                          </Storyboard>
                                      </VisualState>
                                  </VisualStateGroup>
                                  <VisualStateGroup x:Name="FocusStates">
                                      <VisualState x:Name="Focused">
                                          <Storyboard>
                                              <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity">
                                                  <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                              </DoubleAnimationUsingKeyFrames>
                                          </Storyboard>
                                      </VisualState>
                                      <VisualState x:Name="Unfocused"/>
                                  </VisualStateGroup>
                              </VisualStateManager.VisualStateGroups>
                              <Border x:Name="Background" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" />
                              <Path x:Name="Path"
                                      
                                    ToolTipService.ToolTip="Refresh" Fill="{StaticResource TileView_ButtonBackground}"                                  
                                    Stretch="Fill" Stroke="{StaticResource TileView_ButtonOuterBorder}" Margin="0.5" 
                                    RenderTransformOrigin="0.500002264976501,0.5" UseLayoutRounding="False" 
                                    Data="M6.2500362,0.25 L9.7500362,0.25 L9.7500362,6.2500501 L15.75,6.2500501 L15.75,9.7500496 L9.7500362,9.7500496 L9.7500362,15.75 L6.2500362,15.75 L6.2500362,9.7500496 L0.25,9.7500496 L0.25,6.2500501 L6.2500362,6.2500501 z">
                                  <Path.RenderTransform>
                                      <TransformGroup>
                                          <ScaleTransform/>
                                          <SkewTransform/>
                                          <RotateTransform Angle="90"/>
                                          <TranslateTransform/>
                                      </TransformGroup>
                                  </Path.RenderTransform>
                              </Path>
                              <Path x:Name="Path2" ToolTipService.ToolTip="Refresh" Fill="{StaticResource TileView_ButtonBackground}"                                  
                                    Opacity=".5"
                                    Stretch="Fill" Stroke="{StaticResource TileView_ButtonOuterBorder}" Margin="0.5" 
                                    RenderTransformOrigin="0.500002264976501,0.5" UseLayoutRounding="False" 
                                    Data="M6.2500362,0.25 L9.7500362,0.25 L9.7500362,6.2500501 L15.75,6.2500501 L15.75,9.7500496 L9.7500362,9.7500496 L9.7500362,15.75 L6.2500362,15.75 L6.2500362,9.7500496 L0.25,9.7500496 L0.25,6.2500501 L6.2500362,6.2500501 z">
                                  <Path.RenderTransform>
                                      <TransformGroup>
                                          <ScaleTransform/>
                                          <SkewTransform/>
                                          <RotateTransform Angle="45"/>
                                          <TranslateTransform/>
                                      </TransformGroup>
                                  </Path.RenderTransform>
                              </Path>
                              <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                              <Rectangle x:Name="DisabledVisualElement" Fill="#FFFFFFFF" RadiusX="3" RadiusY="3" IsHitTestVisible="false" Opacity="0"/>
                              <Rectangle x:Name="FocusVisualElement" Stroke="#00FFFFFF" StrokeThickness="1" RadiusX="2" RadiusY="2" Margin="1" IsHitTestVisible="false" Opacity="0"/>
                          </Grid>
                      </ControlTemplate>
                  </Setter.Value>
              </Setter>
          </Style>
          <Style x:Key="Close_ButtonStyle" TargetType="Button">
              <Setter Property="Background" Value="Transparent"/>
              <Setter Property="Foreground" Value="#FF000000"/>
              <Setter Property="Padding" Value="3"/>
              <Setter Property="BorderThickness" Value="11"/>
              <Setter Property="BorderBrush" Value="Transparent" />
              <Setter Property="Template">
                  <Setter.Value>
                      <ControlTemplate TargetType="Button">
                          <Grid>
                              <VisualStateManager.VisualStateGroups>
                                  <VisualStateGroup x:Name="CommonStates">
                                      <VisualState x:Name="Normal"/>
                                      <VisualState x:Name="MouseOver">
                                          <Storyboard>
                                              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Path" Storyboard.TargetProperty="Fill">
                                                  <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TileView_ButtonBackground_MouseOver}"/>
                                              </ObjectAnimationUsingKeyFrames>
                                          </Storyboard>
                                      </VisualState>
                                      <VisualState x:Name="Pressed">
                                          <Storyboard>
                                              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Path" Storyboard.TargetProperty="Fill">
                                                  <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TileView_ButtonBackground_Pressed}"/>
                                              </ObjectAnimationUsingKeyFrames>
                                          </Storyboard>
                                      </VisualState>
                                      <VisualState x:Name="Disabled">
                                          <Storyboard>
                                              <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity">
                                                  <SplineDoubleKeyFrame KeyTime="0" Value=".55"/>
                                              </DoubleAnimationUsingKeyFrames>
                                          </Storyboard>
                                      </VisualState>
                                  </VisualStateGroup>
                                  <VisualStateGroup x:Name="FocusStates">
                                      <VisualState x:Name="Focused">
                                          <Storyboard>
                                              <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity">
                                                  <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                              </DoubleAnimationUsingKeyFrames>
                                          </Storyboard>
                                      </VisualState>
                                      <VisualState x:Name="Unfocused"/>
                                  </VisualStateGroup>
                              </VisualStateManager.VisualStateGroups>
                              <Border x:Name="Background" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" />
                              <Path x:Name="Path" ToolTipService.ToolTip="Close" Fill="{StaticResource TileView_ButtonBackground}" Stretch="Fill" Stroke="{StaticResource TileView_ButtonOuterBorder}" Margin="0.5" RenderTransformOrigin="0.500002264976501,0.5" UseLayoutRounding="False" Data="M6.2500362,0.25 L9.7500362,0.25 L9.7500362,6.2500501 L15.75,6.2500501 L15.75,9.7500496 L9.7500362,9.7500496 L9.7500362,15.75 L6.2500362,15.75 L6.2500362,9.7500496 L0.25,9.7500496 L0.25,6.2500501 L6.2500362,6.2500501 z">
                                  <Path.RenderTransform>
                                      <TransformGroup>
                                          <ScaleTransform/>
                                          <SkewTransform/>
                                          <RotateTransform Angle="45"/>
                                          <TranslateTransform/>
                                      </TransformGroup>
                                  </Path.RenderTransform>
                              </Path>
                              <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                              <Rectangle x:Name="DisabledVisualElement" Fill="#FFFFFFFF" RadiusX="3" RadiusY="3" IsHitTestVisible="false" Opacity="0"/>
                              <Rectangle x:Name="FocusVisualElement" Stroke="#00FFFFFF" StrokeThickness="1" RadiusX="2" RadiusY="2" Margin="1" IsHitTestVisible="false" Opacity="0"/>
                          </Grid>
                      </ControlTemplate>
                  </Setter.Value>
              </Setter>
          </Style>
          <!-- End Button style -->
          <Style x:Key="DashletControlTemplate" TargetType="telerikNavigation:RadTileViewItem">
              <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
              <Setter Property="VerticalContentAlignment" Value="Stretch"/>
              <Setter Property="Background" Value="{StaticResource TileView_Background}"/>
              <Setter Property="BorderBrush" Value="{StaticResource TileView_OuterBorder}"/>
              <Setter Property="BorderThickness" Value="2"/>
              <Setter Property="Padding" Value="2"/>
              <Setter Property="Template">
                  <Setter.Value>
                      <ControlTemplate x:Name="ct" TargetType="telerikNavigation:RadTileViewItem">
                          <Grid>
                              <VisualStateManager.VisualStateGroups>
                                  <VisualStateGroup x:Name="CommonStates">
                                      <VisualState x:Name="Normal"/>
                                      <VisualState x:Name="Disabled">
                                          <Storyboard>
                                              <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Visibility">
                                                  <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                              </ObjectAnimationUsingKeyFrames>
                                          </Storyboard>
                                      </VisualState>
                                      <VisualState x:Name="MouseOver"/>
                                  </VisualStateGroup>
                              </VisualStateManager.VisualStateGroups>
                              <Border Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource TileView_OuterBorder_CornerRadius}">
                                  <Border BorderBrush="{StaticResource TileView_InneBorder}" BorderThickness="{StaticResource TileView_InneBorder_Thickness}" CornerRadius="{StaticResource TileView_InneBorder_CornerRadius}">
                                      <Grid>
                                          <Grid.RowDefinitions>
                                              <RowDefinition Height="Auto"/>
                                              <RowDefinition Height="*"/>
                                          </Grid.RowDefinitions>
                                          <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Row="1" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                                          <StackPanel>
                                              <Border  x:Name="HeaderBar" Background="{StaticResource TileView_HeaderBackground}" BorderBrush="{StaticResource TileView_HeaderBorder}" BorderThickness="{StaticResource TileView_HeaderBorder_Thickness}" CornerRadius="{StaticResource TileView_HeaderBorder_CornerRadius}" Padding="10 0 7 0">
                                                  <Grid MinHeight="25">
                                                      <Border x:Name="GripBarElement" Background="Transparent">
                                                          <ContentPresenter x:Name="HeaderElement" HorizontalAlignment="Left" Margin="0,0,5,0" VerticalAlignment="Center" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}"/>
                                                      </Border>
                                                      <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
                                                          <!-- button close -->
                                                          <Button 
                                                              Margin="0,0,5,0"
                                                              HorizontalAlignment="Right" Height="17" Width="17"  
                                                                  Click="RefreshButton_Click"
                                                                  x:Name="RefreshButton" 
                                                                  ToolTipService.ToolTip="Refresh"
                                                                  Style="{StaticResource Refresh_ButtonStyle}"
                                                                  Visibility="{Binding Path=., Converter={StaticResource typeVisibilityConverter},
                                                              ConverterParameter=Harmony.Ria.Presentation.ViewModels.IDashboardPanelViewModel}" />
                                                          <ToggleButton x:Name="MaximizeToggleButton" HorizontalAlignment="Right" Height="17" VerticalAlignment="Center" Width="17">
                                                              <ToggleButton.Template>
                                                                  <ControlTemplate TargetType="ToggleButton">
                                                                      <Grid>
                                                                          <VisualStateManager.VisualStateGroups>
                                                                              <VisualStateGroup x:Name="FocusStates">
                                                                                  <VisualState x:Name="Focused"/>
                                                                                  <VisualState x:Name="Unfocused"/>
                                                                              </VisualStateGroup>
                                                                              <VisualStateGroup x:Name="CommonStates">
                                                                                  <VisualState x:Name="Disabled"/>
                                                                                  <VisualState x:Name="Normal"/>
                                                                                  <VisualState x:Name="MouseOver">
                                                                                      <Storyboard>
                                                                                          <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="RestoreIcon">
                                                                                              <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TileView_ButtonBackground_MouseOver}"/>
                                                                                          </ObjectAnimationUsingKeyFrames>
                                                                                          <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="CollapseIcon">
                                                                                              <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TileView_ButtonBackground_MouseOver}"/>
                                                                                          </ObjectAnimationUsingKeyFrames>
                                                                                      </Storyboard>
                                                                                  </VisualState>
                                                                                  <VisualState x:Name="Pressed">
                                                                                      <Storyboard>
                                                                                          <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="RestoreIcon">
                                                                                              <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TileView_ButtonBackground_Pressed}"/>
                                                                                          </ObjectAnimationUsingKeyFrames>
                                                                                          <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="CollapseIcon">
                                                                                              <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TileView_ButtonBackground_Pressed}"/>
                                                                                          </ObjectAnimationUsingKeyFrames>
                                                                                      </Storyboard>
                                                                                  </VisualState>
                                                                              </VisualStateGroup>
                                                                              <VisualStateGroup x:Name="CheckStates">
                                                                                  <VisualState x:Name="Checked">
                                                                                      <Storyboard>
                                                                                          <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Restore">
                                                                                              <DiscreteObjectKeyFrame KeyTime="0">
                                                                                                  <DiscreteObjectKeyFrame.Value>
                                                                                                      <Visibility>Collapsed</Visibility>
                                                                                                  </DiscreteObjectKeyFrame.Value>
                                                                                              </DiscreteObjectKeyFrame>
                                                                                          </ObjectAnimationUsingKeyFrames>
                                                                                          <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Collapse">
                                                                                              <DiscreteObjectKeyFrame KeyTime="0">
                                                                                                  <DiscreteObjectKeyFrame.Value>
                                                                                                      <Visibility>Visible</Visibility>
                                                                                                  </DiscreteObjectKeyFrame.Value>
                                                                                              </DiscreteObjectKeyFrame>
                                                                                          </ObjectAnimationUsingKeyFrames>
                                                                                      </Storyboard>
                                                                                  </VisualState>
                                                                                  <VisualState x:Name="Unchecked">
                                                                                      <Storyboard>
                                                                                          <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Restore">
                                                                                              <DiscreteObjectKeyFrame KeyTime="0">
                                                                                                  <DiscreteObjectKeyFrame.Value>
                                                                                                      <Visibility>Visible</Visibility>
                                                                                                  </DiscreteObjectKeyFrame.Value>
                                                                                              </DiscreteObjectKeyFrame>
                                                                                          </ObjectAnimationUsingKeyFrames>
                                                                                          <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Collapse">
                                                                                              <DiscreteObjectKeyFrame KeyTime="0">
                                                                                                  <DiscreteObjectKeyFrame.Value>
                                                                                                      <Visibility>Collapsed</Visibility>
                                                                                                  </DiscreteObjectKeyFrame.Value>
                                                                                              </DiscreteObjectKeyFrame>
                                                                                          </ObjectAnimationUsingKeyFrames>
                                                                                      </Storyboard>
                                                                                  </VisualState>
                                                                                  <VisualState x:Name="Indeterminate"/>
                                                                              </VisualStateGroup>
                                                                          </VisualStateManager.VisualStateGroups>
                                                                          <Grid x:Name="Restore" Background="Transparent" Height="13" Width="13">
                                                                              <ToolTipService.ToolTip>
                                                                                  <ToolTip telerik:LocalizationManager.ResourceKey="TileViewItemMaximizeText"/>
                                                                              </ToolTipService.ToolTip>
                                                                              <Path x:Name="RestoreIcon" Data="M2,5 L2,8.9999999 6,8.9999999 6,5 z M0,3 L8,3 8,5 8,8.9999999 8,11 0,11 0,8.9999999 0,5 z M3,0 L11,0 11,2 11,8.9999999 9,8.9999999 9,2 3,2 z" Fill="{StaticResource TileView_ButtonBackground}" Margin="1" Stretch="Fill" Stroke="{x:Null}" StrokeThickness="0.5"/>
                                                                              <Path Data="M1,12 L9,12 9,13 1,13 z M3.9999999,7 L3.9999999,9 6,9 6,7 z M3,6 L7,6 7,7 7,9 7,10 3,10 3,9 3,7 z M0,4 L1,4 1,12 0,12 z M12,1 L13,1 13,10 12,10 z M3,1 L3.9999999,1 3.9999999,3 10,3 10,4 10,10 12,10 12,11 10,11 10,12 9,12 9,4 1,4 1,3 3,3 z M3.9999999,0 L12,0 12,1 3.9999999,1 z" Fill="{StaticResource TileView_ButtonOuterBorder}" Stretch="Fill" Stroke="{x:Null}" StrokeThickness="0.5"/>
                                                                          </Grid>
                                                                          <Grid x:Name="Collapse" Background="Transparent" Height="5" Visibility="Collapsed" Width="12">
                                                                              <ToolTipService.ToolTip>
                                                                                  <ToolTip telerik:LocalizationManager.ResourceKey="TileViewItemMinimizeText"/>
                                                                              </ToolTipService.ToolTip>
                                                                              <Rectangle Fill="{StaticResource TileView_ButtonOuterBorder}" Stroke="{x:Null}" StrokeThickness="0.5"/>
                                                                              <Rectangle x:Name="CollapseIcon" Fill="{StaticResource TileView_ButtonBackground}" Margin="1" Stroke="{x:Null}" StrokeThickness="0.5"/>
                                                                          </Grid>
                                                                      </Grid>
                                                                  </ControlTemplate>
                                                              </ToggleButton.Template>
                                                          </ToggleButton>
                                                          <!-- button close -->
                                                          <Button HorizontalAlignment="Right" Height="17" Width="17"  
                                                                  Click="CloseButton_Click"
                                                                  x:Name="CloseButton" 
                                                                  ToolTipService.ToolTip="Close"
                                                                  Style="{StaticResource Close_ButtonStyle}"
                                                                  Visibility="{Binding Path=., Converter={StaticResource typeVisibilityConverter}, ConverterParameter=Harmony.Ria.ApplicationModel.Presentation.ICloseable}" />
                                                      </StackPanel>
                                                  </Grid>
                                              </Border>
                                              <Border x:Name="Splitter" Height="2" OpacityMask="{StaticResource TileView_HeaderBorder_HorizontalSplitterOpacityMask}" Background="{StaticResource TileView_HeaderBorder_HorizontalSplitterBackground}" BorderThickness="0"/>
                                          </StackPanel>
                                          <Rectangle x:Name="DisabledVisual" Fill="{StaticResource DisabledBrush}" RadiusX="4" RadiusY="4" Visibility="Collapsed" Grid.RowSpan="2"/>
                                      </Grid>
                                  </Border>
                              </Border>
                          </Grid>
                      </ControlTemplate>
                  </Setter.Value>
              </Setter>
          </Style>
      </telerikNavigation:RadTileViewItem.Resources>


    The other problem I'm encountering is that these properties don't seem to be obeyed anymore:

     

     

    MinimizedHeight

     

     

    ="50" MinimizedWidth="150"

     

     


    And the changes to the MinimizedColumnWidth property are resulting in the minimized tiles not appearing properly to the right.  Is there more documentation regarding these changes?

     

     

     

     

     

     

     

  2. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 29 Mar 2011 Link to this post

    Hello Kathleen,

     The problem is that we have edited the template of the RadTileViewItem and that's why your tileview doesn't behave as expected. I've updated your code with the new template, attached a sample project with it and everything seems to works fine.
    As for the styles for Windows7 - in C:\RadControls_for_Silverlight4_2011_1_0315_Source\Themes\ you should have a solution named Themes.Sources.sln could you please try to open it and rebuild the Windows7 project. After that in the Windows7\Themes\Windows7 folder you should have the styles for all our controls.
    If you have further questions feel free to ask.

    All the best,
    Zarko
    the Telerik team
  3. DevCraft banner
Back to Top