private void HandleSlidingContentControlStateChanged(SlidingContentControlState newState) { if (newState == SlidingContentControlState.Normal) { IsDocked = false; } else { IsDocked = true; } }
private void HandleIsDockedChanged(bool isDocked) { GoToDockedState(isDocked); if (isDocked) { DockControl(); AnimateMetroAppView(true, GetOpposingSide(DockingSide)); OnDocked(); } else { AnimateMetroAppView(false, GetOpposingSide(DockingSide)); SlidingContentControlState = SlidingContentControlState.Normal; OnUndocked(); } }
private void DockControl() { if (DockingSide == Dock.Right) { SlidingContentControlState = SlidingContentControlState.DockedRight; } else if (DockingSide == Dock.Left) { SlidingContentControlState = SlidingContentControlState.DockedLeft; } else if (DockingSide == Dock.Top) { SlidingContentControlState = SlidingContentControlState.DockedTop; } else if (DockingSide == Dock.Bottom) { SlidingContentControlState = SlidingContentControlState.DockedBottom; } }