Skip to content

Commit 9e4ebf2

Browse files
authored
feat: add exit to main tray window (#95)
Closes: #94
1 parent 9b8408d commit 9e4ebf2

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

App/ViewModels/TrayWindowViewModel.cs

+6
Original file line numberDiff line numberDiff line change
@@ -301,4 +301,10 @@ public void SignOut()
301301
return;
302302
_credentialManager.ClearCredentials();
303303
}
304+
305+
[RelayCommand]
306+
public void Exit()
307+
{
308+
_ = ((App)Application.Current).ExitApplication();
309+
}
304310
}

App/Views/Pages/TrayWindowMainPage.xaml

+9
Original file line numberDiff line numberDiff line change
@@ -249,5 +249,14 @@
249249

250250
<TextBlock Text="Sign out" Foreground="{ThemeResource DefaultTextForegroundThemeBrush}" />
251251
</HyperlinkButton>
252+
253+
<HyperlinkButton
254+
Command="{x:Bind ViewModel.ExitCommand, Mode=OneWay}"
255+
Margin="-12,-8,-12,-5"
256+
HorizontalAlignment="Stretch"
257+
HorizontalContentAlignment="Left">
258+
259+
<TextBlock Text="Exit" Foreground="{ThemeResource DefaultTextForegroundThemeBrush}" />
260+
</HyperlinkButton>
252261
</StackPanel>
253262
</Page>

0 commit comments

Comments
 (0)