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 Reply Children
No Data