Change "Drag column..." text

4 posts, 0 answers
  1. Gilbert van Veen
    Gilbert van Veen avatar
    68 posts
    Member since:
    Oct 2009

    Posted 09 Aug 2010 Link to this post

    <ControlTemplate x:Key="GridViewGroupPanelTemplate" TargetType="Telerik_Windows_Controls_GridView:GridViewGroupPanel">
                <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                    <VisualStateManager.VisualStateGroups>
                        <VisualStateGroup x:Name="Grouping">
                            <VisualState x:Name="NoGroups"/>
                            <VisualState x:Name="HasGroups">
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="panelText" Storyboard.TargetProperty="Visibility">
                                        <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Collapsed"/>
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="panelTextGrouped" Storyboard.TargetProperty="Visibility">
                                        <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Visible"/>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                        </VisualStateGroup>
                    </VisualStateManager.VisualStateGroups>
                    <Border Background="{TemplateBinding Background}" BorderBrush="{StaticResource GridView_GroupPanelInnerBorder}" BorderThickness="1">
                        <StackPanel Orientation="Horizontal">
                            <TextBlock x:Name="panelText" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" IsHitTestVisible="False" FontSize="9.5" telerik:LocalizationManager.ResourceKey="GridViewGroupPanelText" Text="Drag a column header and drop it here to group by that column 123"/>
                            <TextBlock x:Name="panelTextGrouped" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" IsHitTestVisible="False" Visibility="Collapsed" telerik:LocalizationManager.ResourceKey="GridViewGroupPanelTopTextGrouped"/>
                            <ItemsPresenter VerticalAlignment="Center"/>
                        </StackPanel>
                    </Border>
                </Border>
            </ControlTemplate>
            <ItemsPanelTemplate x:Key="GridViewGroupPanelItemsPanelTemplate">
                <StackPanel VerticalAlignment="Stretch" Orientation="Horizontal"/>
            </ItemsPanelTemplate>
            <LinearGradientBrush x:Key="GridView_GroupPanelBackground" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFDFDFDF" Offset="1"/>
                <GradientStop Color="#FFBABABA"/>
            </LinearGradientBrush>
            <SolidColorBrush x:Key="GridView_GroupPanelOuterBorder" Color="#FF848484"/>
            <Style x:Key="GridViewGroupPanelStyle1" TargetType="Telerik_Windows_Controls_GridView:GridViewGroupPanel">
                <Setter Property="Template" Value="{StaticResource GridViewGroupPanelTemplate}"/>
                <Setter Property="ItemsPanel" Value="{StaticResource GridViewGroupPanelItemsPanelTemplate}"/>
                <Setter Property="MinHeight" Value="32"/>
                <Setter Property="Margin" Value="0"/>
                <Setter Property="Padding" Value="10,0,3,0"/>
                <Setter Property="Background" Value="{StaticResource GridView_GroupPanelBackground}"/>
                <Setter Property="BorderBrush" Value="{StaticResource GridView_GroupPanelOuterBorder}"/>
                <Setter Property="BorderThickness" Value="0,0,0,1"/>
                <Setter Property="VerticalContentAlignment" Value="Center"/>
                <Setter Property="HorizontalContentAlignment" Value="Left"/>
            </Style>               
        </navigation:Page.Resources>

    I would like to do something like: this.panelText = "bla bla" is this possible?

    Someone has any idea?

    When I type in this.paneltext in my cs file then it doesn't recognize it?
  2. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 09 Aug 2010 Link to this post

    Hello Gilbert van Veen,

    I am sending you an example how to do this and you can see in the attached picture how to modifiy panel text using Expression Blend.
    Please let me know if you need any additional information.
    Sincerely yours,
    Vanya Pavlova
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Gilbert van Veen
    Gilbert van Veen avatar
    68 posts
    Member since:
    Oct 2009

    Posted 09 Aug 2010 Link to this post

    Thanks Vanya,

    But it is not clear to me how to change the paneltext by code behind?

    Gilbert
  5. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 10 Aug 2010 Link to this post

    Hello Gilbert van Veen,

    In order to change the GroupPanel text in code I would suggest you to take a look at this forum thread.

    Best wishes,
    Vanya Pavlova
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
Back to Top