Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
735
which property is used to distinguish flyout and flyin status
posted

My code:


IsPinned="False" Margin="5,0,5,5" AllowFloatingOnly ="False">


When click PaneTabItem, Contentpane will flyout, and XamDockManager.GetPaneLocation(paneItem) is PaneLocation.Unpinned. When I flyin Contentpane, XamDockManager.GetPaneLocation(paneItem) is still  PaneLocation.Unpinned.

I want to know which property is used to distinguish flyout and flyin status.

My task is left click PaneTabItem, flyout the pane, left click agian,  flyin the pane.

My code:

EventManager.RegisterClassHandler(
typeof(PaneTabItem),
Control.MouseLeftButtonDownEvent,
new MouseButtonEventHandler(OnPaneTabItemMouseLeftButtonDown));

private void OnPaneTabItemMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
PaneTabItem paneItem = sender as PaneTabItem;
ContentPane pane = paneItem.Pane;

if (pane != null)
{
if (pane.IsPinned == false)
{

//I can not distinguish flyout and flyin status, if in flyout status, just fly in 
if (XamDockManager.GetPaneLocation(paneItem) == PaneLocation.Unpinned)
{
pane.ExecuteCommand(ContentPaneCommands.FlyIn);
}

//if in flyin status, just flyout
else
{
pane.ExecuteCommand(ContentPaneCommands.Flyout);
}
}
}

}

But it does not work, because I can not distinguish flyout and flyin status.

Parents
  • 17475
    Offline posted

    Hello Brandon, 

    Thank you for posting! 

    The default behavior of the XamDockManager will cause the pane to flyout on hover or when active when UnpinnedTabHoverAction is set to “Flyout”. Currently there is not an exposed property for the content pane that returns its flyin/flyout status.  I have put together a small sample application that could be helpful if you would like to change that status on mouse event. It illustrates how the ContentPaneCommands.Flyout and ContentPaneCommands.FlyIn commands could be executed in the PreviewMouseDown event handler. Please note that in this scenario the XamDockManager UnpinnedTabHoverAction property is "None" so the panes do not flyout on mouse hover.

    Please feel free to let me know if you have any questions.

    XamDockManagerFlyIn.zip
Reply Children