We have following Raddocking declared:
<telerik:RadDocking
x:Name="RadDocking"
RetainPaneSizeMode="DockingAndFloating"
Close="RadDocking_OnClose"
CloseButtonPosition="InPaneAndGroup"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
Loaded="RadDocking_OnLoaded"
Visibility="{Binding IsMenuLoaded, Converter={StaticResource BooleanToVisibilityConverter}}">
<telerik:RadDocking.DocumentHost>
<telerik:RadSplitContainer>
<telerik:RadPaneGroup prism:RegionManager.RegionName="MainRegion" DropDownDisplayMode="WhenNeeded">
</telerik:RadPaneGroup>
</telerik:RadSplitContainer>
</telerik:RadDocking.DocumentHost>
</telerik:RadDocking>
As you can see we use the CloseButtonPosition InPaneAndGroup. And we implement our own logic on the Close event. But I want to check if we clicked on the close button in the pane, or on the close button of the group. Is there a way to know this? I've checked the Sender & StateChangedeventArgs, but they seem always only to hold 1 pane (the one that is active). But I would really need to know if it is the groupbutton or panebutton which is pressed, because we will handle other logic. Anyone any thoughts?
After some more looking around in the Telerik forum I found a solution that comes very close to what I need. Only a pity there is no build in solution for something like this. I can't imagine there is no need to a close all functionality and close tab functionality on the same time.
That said here is the source I based my solution on: Determine Source of Close
Here is the solution I made up:
Hope this will help others in their quest for a similar problem.