Use SlideIn/AutoHide to keep a pane expanded

1 Answer 15 Views
Docking
Zack
Top achievements
Rank 1
Zack asked on 20 Dec 2024, 03:10 AM

Our ultimate goal is to have a pane - the "Zone Editor" be collapsed by default but fly out once a variable is set - we have achieved part of this behavior using the code segment below. However, when we lose focus on the pane, it flies away again, even if the IsActive variable is set to true. Is there a way to prevent this?

 

<telerik:RadSplitContainer InitialPosition="DockedRight" Orientation="Horizontal" >
    <telerik:RadPaneGroup Name="ZoneEditorPane">
        <zoneEditor:ZoneEditor IsActive="{Binding DataContext.IsZoneEditorVisible, ElementName=DockingControl, Mode=TwoWay}" AutoHideWidth="1075" />
    </telerik:RadPaneGroup>
</telerik:RadSplitContainer>

1 Answer, 1 is accepted

Sort by
0
Stenly
Telerik team
answered on 24 Dec 2024, 10:22 AM

Hello Zack,

To achieve this behavior, you can create a custom flyout behavior, which will allow you to control how the unpinned pane behaves when the pane is activated/deactivated, the mouse enters/leaves, and when the mouse's left button is clicked. Additionally, you can also specify a timeout, by which the flyout will automatically close.

To do so, create a custom class, implement the IFlyoutBehavior interface, and introduce your custom logic to achieve the desired behavior. Then, set a new instance of the new custom flyout behavior to the FlyoutBehavior property of RadDocking

More information on the flyout behavior functionality, as well as how to create a custom one, can be found at the following link:

WPF Docking - FlyoutBehavior - Telerik UI for WPF

With this being said, I hope the provided information will be of help to you.

Regards,
Stenly
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Docking
Asked by
Zack
Top achievements
Rank 1
Answers by
Stenly
Telerik team
Share this question
or