Hi there,
I have a quick request - I'd like to bind a custom Command to a HeaderCloseButton on a pane docked on the left, top, bottom or top (ie: not as document). Any ideas how to do this?
I have achieved the same for tabbed documents by overriding the Pane HeaderTemplate as follows:
However modifying the TitleTemplate only changes the title area, not buttons on the pane.
Any ideas?
thanks!
I have a quick request - I'd like to bind a custom Command to a HeaderCloseButton on a pane docked on the left, top, bottom or top (ie: not as document). Any ideas how to do this?
I have achieved the same for tabbed documents by overriding the Pane HeaderTemplate as follows:
<!-- Define the style for component item headers --> <DataTemplate x:Key="PaneHeaderTemplate"> <StackPanel Orientation="Horizontal" VerticalAlignment="Center"> <TextBlock Text="{Binding ComponentDisplayName}"/> <Button Command="{Binding CloseComponentCommand}" Style="{StaticResource ReportButtonStyle}" Margin="10,0,0,0" ToolTipService.ToolTip="Remove Component"> <Button.Content> <Path Data="M0,0 L6,6 M6, 0 L0,6" Stroke="Black" StrokeThickness="1" SnapsToDevicePixels="True" /> </Button.Content> </Button> </StackPanel> </DataTemplate>However modifying the TitleTemplate only changes the title area, not buttons on the pane.
Any ideas?
thanks!