返回提交历史
Modified
XFEWorkflow/XFEWorkflow/Views/AppShellPage.xaml
+3
-3
Modified
XFEWorkflow/XFEWorkflow/Views/AppShellPage.xaml.cs
+2
-0
XFEstudio/XFEWorkflow
修复用户菜单 Account_Click 事件引用
4fa3637
代码差异
2 个文件
+5
-3
@@ -17,12 +17,12 @@
17
17
</TitleBar.IconSource>
18
18
<TitleBar.RightHeader>
19
19
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Right" Orientation="Horizontal" Spacing="20">
20
<Button x:Name="HeaderAccountButton" AutomationProperties.AutomationId="HeaderAccountButton" Background="{ThemeResource SubtleFillColorSecondaryBrush}" BorderThickness="0" Padding="10,3" CornerRadius="8" ToolTipService.ToolTip="用户菜单">
21
<Button.Flyout>
20
<Button x:Name="HeaderAccountButton" AutomationProperties.AutomationId="HeaderAccountButton" Background="{ThemeResource SubtleFillColorSecondaryBrush}" BorderThickness="0" Padding="10,3" CornerRadius="8" ToolTipService.ToolTip="用户菜单" Click="Account_Click">
21
<FlyoutBase.AttachedFlyout>
22
22
<Flyout x:Name="HeaderAccountFlyout" Placement="BottomEdgeAlignedRight" FlyoutPresenterStyle="{StaticResource AccountFlyoutPresenterStyle}" Opened="AccountFlyout_Opened" Closed="AccountFlyout_Closed">
23
23
<controls:AccountMenu x:Name="UserAccountMenu"/>
24
24
</Flyout>
25
</Button.Flyout>
25
</FlyoutBase.AttachedFlyout>
26
26
<StackPanel Orientation="Horizontal" Spacing="10">
27
27
<PersonPicture x:Name="HeaderAvatar" Width="32" Height="32" DisplayName="{x:Bind ViewModel.UserName, Mode=OneWay}" ProfilePicture="{x:Bind ViewModel.Avatar, Mode=OneWay}"/>
28
28
<TextBlock Text="{x:Bind ViewModel.UserName, Mode=OneWay}" MaxWidth="150" TextTrimming="CharacterEllipsis" VerticalAlignment="Center"/>
@@ -45,6 +45,8 @@ namespace XFEWorkflow.Views
45
45
}
46
46
private bool accountMenuOpen, accountActionBusy;
47
47
private TaskCompletionSource? accountMenuClosed;
48
private void Account_Click(object sender, RoutedEventArgs e)
49
=> Microsoft.UI.Xaml.Controls.Primitives.FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender);
48
50
private void AccountFlyout_Opened(object sender, object e) { accountMenuOpen = true; UpdateAccountMenuTheme(); }
49
51
private void UpdateAccountMenuTheme()
50
52
{