| | | 1 | | // ----------------------------------------------------------------------- |
| | | 2 | | // <copyright file="ShellDrawerServiceExtensions.cs" company="Stéphane ANDRE"> |
| | | 3 | | // Copyright (c) Stéphane ANDRE. All rights reserved. |
| | | 4 | | // </copyright> |
| | | 5 | | // ----------------------------------------------------------------------- |
| | | 6 | | |
| | | 7 | | #pragma warning disable IDE0130 |
| | | 8 | | namespace MyNet.UI.ViewModels.Shell; |
| | | 9 | | #pragma warning restore IDE0130 |
| | | 10 | | |
| | | 11 | | /// <summary> |
| | | 12 | | /// Convenience helpers for <see cref="IShellDrawerService"/>. |
| | | 13 | | /// </summary> |
| | | 14 | | public static class ShellDrawerServiceExtensions |
| | | 15 | | { |
| | | 16 | | extension(IShellDrawerService shellDrawerService) |
| | | 17 | | { |
| | | 18 | | /// <summary> |
| | | 19 | | /// Shows the notifications drawer. |
| | | 20 | | /// </summary> |
| | | 21 | | public void ShowNotificationsDrawer() => |
| | 3 | 22 | | shellDrawerService.SetNotificationsDrawer(ShellDrawerAction.Show); |
| | | 23 | | |
| | | 24 | | /// <summary> |
| | | 25 | | /// Hides the notifications drawer. |
| | | 26 | | /// </summary> |
| | | 27 | | public void HideNotificationsDrawer() => |
| | 0 | 28 | | shellDrawerService.SetNotificationsDrawer(ShellDrawerAction.Hide); |
| | | 29 | | |
| | | 30 | | /// <summary> |
| | | 31 | | /// Toggles the notifications drawer. |
| | | 32 | | /// </summary> |
| | | 33 | | public void ToggleNotificationsDrawer() => |
| | 0 | 34 | | shellDrawerService.SetNotificationsDrawer(ShellDrawerAction.Toggle); |
| | | 35 | | |
| | | 36 | | /// <summary> |
| | | 37 | | /// Shows the file menu drawer when supported by the host. |
| | | 38 | | /// </summary> |
| | | 39 | | public void ShowFileMenuDrawer() => |
| | 0 | 40 | | shellDrawerService.SetFileMenuDrawer(ShellDrawerAction.Show); |
| | | 41 | | |
| | | 42 | | /// <summary> |
| | | 43 | | /// Hides the file menu drawer when supported by the host. |
| | | 44 | | /// </summary> |
| | | 45 | | public void HideFileMenuDrawer() => |
| | 0 | 46 | | shellDrawerService.SetFileMenuDrawer(ShellDrawerAction.Hide); |
| | | 47 | | |
| | | 48 | | /// <summary> |
| | | 49 | | /// Toggles the file menu drawer when supported by the host. |
| | | 50 | | /// </summary> |
| | | 51 | | public void ToggleFileMenuDrawer() => |
| | 3 | 52 | | shellDrawerService.SetFileMenuDrawer(ShellDrawerAction.Toggle); |
| | | 53 | | } |
| | | 54 | | } |
| | | 55 | | |