This question is locked. New answers and comments are not allowed.
I write a GroupPanelStyle of GrieView and modify the GridViewGroupPanelTemplate But when I drag a column to the group panel,the message , "Drag a column header and ......",is still there.So how to fix it?
My plan is this:
1.Do not display any message by default
2.If user drag colum to the group panel,it still can work as normal.
Here is the Code
My plan is this:
1.Do not display any message by default
2.If user drag colum to the group panel,it still can work as normal.
Here is the Code
<SolidColorBrush x:Key="GridView_GroupPanelInnerBorder" Color="#FFEFF6FF"/> <ControlTemplate x:Key="GridViewGroupPanelTemplate" TargetType="telerik:GridViewGroupPanel"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="Grouping"> <VisualState x:Name="NoGroups"/> <VisualState x:Name="HasGroups"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="panelText"> <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Collapsed"/> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="panelTextGrouped"> <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Visible"/> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Border BorderBrush="{StaticResource GridView_GroupPanelInnerBorder}" BorderThickness="1" Background="{TemplateBinding Background}"> <StackPanel Orientation="Horizontal"> <TextBlock x:Name="panelText" FontSize="9.5" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="False" Margin="{TemplateBinding Padding}" telerik:LocalizationManager.ResourceKey="GridViewGroupPanelText" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> <TextBlock x:Name="panelTextGrouped" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="False" Margin="{TemplateBinding Padding}" telerik:LocalizationManager.ResourceKey="GridViewGroupPanelTopTextGrouped" Visibility="Collapsed" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> <ItemsPresenter VerticalAlignment="Center"/> </StackPanel> </Border> </Border> <my:IscMenu Grid.Row="1" HorizontalAlignment="Right"> <telerik:RadMenuItem Header="Add"></telerik:RadMenuItem> <telerik:RadMenuItem Header="Delete"></telerik:RadMenuItem> <telerik:RadMenuItem Header="Modify"></telerik:RadMenuItem> <telerik:RadMenuItem Header="Group Add"></telerik:RadMenuItem> </my:IscMenu> </Grid> </ControlTemplate> <ItemsPanelTemplate x:Key="GridViewGroupPanelItemsPanelTemplate"> <StackPanel Orientation="Horizontal" VerticalAlignment="Stretch"/> </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:GridViewGroupPanel"> <Setter Property="Template" Value="{StaticResource GridViewGroupPanelTemplate}"/> <Setter Property="MinHeight" Value="20"/> <Setter Property="ItemsPanel" Value="{StaticResource GridViewGroupPanelItemsPanelTemplate}"/> <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>