Skip to content

Commit 68e6ace

Browse files
committedMar 10, 2025
Feat | 完善右键菜单逻辑
1 parent cf2cbdc commit 68e6ace

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed
 

‎ShadowViewer/Pages/NavigationPage.xaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Page
1+
<controls1:ShadowPage
22
x:Class="ShadowViewer.Pages.NavigationPage"
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@@ -11,6 +11,7 @@
1111
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
1212
xmlns:models="using:ShadowViewer.Core.Models"
1313
xmlns:shadow="using:ShadowViewer.Controls"
14+
xmlns:controls1="using:ShadowViewer.Core.Controls"
1415
NavigationCacheMode="Required"
1516
mc:Ignorable="d">
1617
<Grid>
@@ -151,4 +152,4 @@
151152
ShowDirection="RightToLeft"
152153
Visibility="Collapsed" />
153154
</Grid>
154-
</Page>
155+
</controls1:ShadowPage>

‎ShadowViewer/Pages/NavigationPage.xaml.cs

+3-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414
using ShadowViewer.Core.Services;
1515
using ShadowViewer.ViewModels;
1616
using ShadowViewer.Services;
17+
using ShadowViewer.Core.Controls;
1718

1819
namespace ShadowViewer.Pages
1920
{
20-
public sealed partial class NavigationPage : Page
21+
public sealed partial class NavigationPage : ShadowPage
2122
{
2223
public static ILogger Logger { get; } = Log.ForContext<NavigationPage>();
2324
private static CancellationTokenSource _cancelTokenSource = new();
@@ -73,9 +74,7 @@ private async void Caller_TopGridEvent(object sender, TopGridEventArg e)
7374
{
7475
case TopGridMode.ContentDialog:
7576
if (e.Element is ContentDialog dialog)
76-
{
77-
dialog.XamlRoot = XamlRoot;
78-
77+
{
7978
await dialog.ShowAsync();
8079
}
8180

‎ShadowViewer/Pages/SettingsPage.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
NotEmptyValue="True" />
3232
<shadowConverters:ThemeComboConverter x:Key="ThemeComboConverter" />
3333
</Page.Resources>
34-
<Grid Loaded="FrameworkElement_OnLoaded"
34+
<Grid
3535
Background="{ThemeResource LayerFillColorDefaultBrush}"
3636
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
3737
BorderThickness="1"

‎ShadowViewer/ViewModels/TitleBarViewModel.cs

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
using ShadowViewer.Core.Models.Interfaces;
1414
using ShadowViewer.Core.Responders;
1515
using ShadowViewer.Core.Services;
16+
using ShadowViewer.Core.Utils;
1617
using ShadowViewer.I18n;
1718
using ShadowViewer.Models;
1819

0 commit comments

Comments
 (0)
Please sign in to comment.