/// <summary> /// Closes the blinds to hide the content /// </summary> public void Close() { if (ElementRoot != null) { ElementTop.Visibility = Visibility.Visible; if (OpenType == RollerOpenType.Scroll) { if (ElementBottom != null) { ElementBottom.Visibility = Visibility.Visible; } ElementClose.Begin(); ElementOpen.Stop(); } else { PlaneProjection p = (PlaneProjection)ElementTopProjection; if (OpenType == RollerOpenType.RotateX) { p.RotationX = 270; } else { p.RotationY = 270; } ElementRotateClose.Begin(); ElementRotateOpen.Stop(); } _isOpen = false; } }
/// <summary> /// Opens the blinds to reveal the content /// </summary> public void Open() { if (ElementRoot != null) { ((FrameworkElement)Content).Visibility = Visibility.Visible; if (OpenType == RollerOpenType.Scroll) { ElementOpen.Begin(); ElementClose.Stop(); } else { PlaneProjection p = (PlaneProjection)ElementContentProjection; if (OpenType == RollerOpenType.RotateX) { p.RotationX = 270; } else { p.RotationY = 270; } ElementRotateOpen.Begin(); ElementRotateClose.Stop(); } _isOpen = true; } }