Hello,
Below is a part of the template of CollectionEditor. I've added a new button named "ButtonClose" in to the footer of the collection editor. What should I do in code behind to make the collection editor close? Simply change the visibility?
<Border x:Name="FooterPanel_Background" Grid.Row="3" BorderBrush="{StaticResource ControlOuterBorder}" BorderThickness="0,1,0,0" Grid.ColumnSpan="2" Background="{StaticResource CollectionEditor_FooterPanel_Background}">
<Grid>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<telerik:RadButton IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}"
MinWidth="48" MinHeight="21" Margin="4,6,4,7"
telerik:StyleManager.Theme="{StaticResource Theme}"
telerik:LocalizationManager.ResourceKey="CollectionEditorAdd"
Command="{x:Static propertyGrid:CollectionEditorCommands.AddNew}"/>
<telerik:RadButton IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}"
MinWidth="48" MinHeight="21" Margin="0,6,4,7"
telerik:StyleManager.Theme="{StaticResource Theme}"
telerik:LocalizationManager.ResourceKey="CollectionEditorRemove"
Command="{x:Static propertyGrid:CollectionEditorCommands.Delete}"/>
<telerik:RadButton MinWidth="48" MinHeight="21" Margin="0,6,4,7" Name="ButtonClose"
telerik:StyleManager.Theme="{StaticResource Theme}"
Content="Close"
Click="ButtonClose_Click"/>
</StackPanel>
<Thumb x:Name="PART_ResizeThumb" Style="{StaticResource CollectionEditorGripperStyle}" Visibility="{TemplateBinding ResizeGripperVisibility}"/>
</Grid>
</Border>
Below is a part of the template of CollectionEditor. I've added a new button named "ButtonClose" in to the footer of the collection editor. What should I do in code behind to make the collection editor close? Simply change the visibility?
<Border x:Name="FooterPanel_Background" Grid.Row="3" BorderBrush="{StaticResource ControlOuterBorder}" BorderThickness="0,1,0,0" Grid.ColumnSpan="2" Background="{StaticResource CollectionEditor_FooterPanel_Background}">
<Grid>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<telerik:RadButton IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}"
MinWidth="48" MinHeight="21" Margin="4,6,4,7"
telerik:StyleManager.Theme="{StaticResource Theme}"
telerik:LocalizationManager.ResourceKey="CollectionEditorAdd"
Command="{x:Static propertyGrid:CollectionEditorCommands.AddNew}"/>
<telerik:RadButton IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}"
MinWidth="48" MinHeight="21" Margin="0,6,4,7"
telerik:StyleManager.Theme="{StaticResource Theme}"
telerik:LocalizationManager.ResourceKey="CollectionEditorRemove"
Command="{x:Static propertyGrid:CollectionEditorCommands.Delete}"/>
<telerik:RadButton MinWidth="48" MinHeight="21" Margin="0,6,4,7" Name="ButtonClose"
telerik:StyleManager.Theme="{StaticResource Theme}"
Content="Close"
Click="ButtonClose_Click"/>
</StackPanel>
<Thumb x:Name="PART_ResizeThumb" Style="{StaticResource CollectionEditorGripperStyle}" Visibility="{TemplateBinding ResizeGripperVisibility}"/>
</Grid>
</Border>