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

Lines changed: 6 additions & 0 deletions
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

Lines changed: 9 additions & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy