private void UpdateUI(bool isDeployed, bool ForceUpdate) { if (isUIDeployed != isDeployed || ForceUpdate) { isUIDeployed = isDeployed; if (isDeployed) { SheetViewSeparatorLine.Width = 8; switch (GlobalVariables.CurrentDevice) { case CurrentDevice.Desktop: if (AppSettings.Values.ContainsKey("ui_extendedview")) { if (!(bool)AppSettings.Values["ui_extendedview"]) { DeployUIIconDeploying.Begin(); } } else { DeployUIIconDeploying.Begin(); } PrincipalUI.Visibility = Visibility.Visible; break; case CurrentDevice.WindowsMobile: DeployUIIconDeploying.Begin(); break; } if (!SheetViewerPinned) { SheetViewSplit.DisplayMode = SplitViewDisplayMode.Inline; SheetViewSplit.IsPaneOpen = true; SheetsManager.Visibility = Visibility.Visible; Messenger.Default.Send(SheetViewMode.Deployed); } } else { switch (GlobalVariables.CurrentDevice) { case CurrentDevice.Desktop: if (AppSettings.Values.ContainsKey("ui_extendedview")) { if (!(bool)AppSettings.Values["ui_extendedview"]) { PrincipalUI.Visibility = Visibility.Visible; DeployUIIconCollapsing.Begin(); } else { PrincipalUI.Visibility = Visibility.Collapsed; } } else { PrincipalUI.Visibility = Visibility.Visible; DeployUIIconCollapsing.Begin(); } if (!SheetViewerPinned) { SheetViewSplit.DisplayMode = SplitViewDisplayMode.CompactOverlay; } break; case CurrentDevice.WindowsMobile: SheetViewSplit.DisplayMode = SplitViewDisplayMode.Inline; DeployUIIconCollapsing.Begin(); break; } if (!SheetViewerPinned) { SheetViewSeparatorLine.Width = 0; SheetsManager.Visibility = Visibility.Collapsed; SheetViewSplit.IsPaneOpen = false; SheetsManager.SelectTabsListSheet(); Messenger.Default.Send(SheetViewMode.Minimized); } } } }
private void UpdateUI(bool isDeployed) { isUIDeployed = isDeployed; if (isDeployed) { SheetViewSeparatorLine.Width = 8; switch (GlobalVariables.CurrentDevice) { case CurrentDevice.Desktop: if (AppSettings.Values.ContainsKey("ui_extendedview")) { if (!(bool)AppSettings.Values["ui_extendedview"]) { PrincipalUI.Margin = new Thickness(0); DeployUIDetector.Visibility = Visibility.Collapsed; } } else { PrincipalUI.Margin = new Thickness(0); DeployUIDetector.Visibility = Visibility.Collapsed; } PrincipalUI.Visibility = Visibility.Visible; break; } SheetViewSplit.DisplayMode = SplitViewDisplayMode.Inline; SheetViewSplit.IsPaneOpen = true; SheetsManager.Visibility = Visibility.Visible; Messenger.Default.Send(SheetViewMode.Deployed); } else { SheetViewSeparatorLine.Width = 0; switch (GlobalVariables.CurrentDevice) { case CurrentDevice.Desktop: //PrincipalUI.Visibility = Visibility.Collapsed; //PrincipalUI.Margin = new Thickness(60, 0, 0, 0); if (AppSettings.Values.ContainsKey("ui_extendedview")) { if (!(bool)AppSettings.Values["ui_extendedview"]) { DeployUIDetector.Visibility = Visibility.Visible; PrincipalUI.Visibility = Visibility.Visible; } else { PrincipalUI.Visibility = Visibility.Collapsed; } } else { DeployUIDetector.Visibility = Visibility.Visible; PrincipalUI.Visibility = Visibility.Visible; } SheetViewSplit.DisplayMode = SplitViewDisplayMode.CompactOverlay; break; case CurrentDevice.WindowsMobile: SheetViewSplit.DisplayMode = SplitViewDisplayMode.Inline; break; } SheetsManager.Visibility = Visibility.Collapsed; SheetViewSplit.IsPaneOpen = false; SheetsManager.SelectTabsListSheet(); Messenger.Default.Send(SheetViewMode.Minimized); } }