IO-1154 IO-996 resolve bindings to main window.

This commit is contained in:
Patrick Fic
2021-05-26 09:56:22 -07:00
parent f9d8b18481
commit 0ab4cc38d0
5 changed files with 9 additions and 8 deletions

View File

@@ -58,7 +58,7 @@
<tb:TaskbarIcon DockPanel.Dock="Top"
IconSource="../favicon.ico"
DoubleClickCommand="{Binding OpenMainWindowCommand}"
DoubleClickCommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}"
DoubleClickCommandParameter="{Binding ElementName=MainWindow}"
PopupActivation="LeftClick"
MenuActivation="RightClick">
<!--<tb:TaskbarIcon.TrayPopup>
@@ -101,7 +101,7 @@
<ContextMenu>
<MenuItem Header="{x:Static p:Resources.Label_Show}"
Command="{Binding OpenMainWindowCommand}"
CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}" />
CommandParameter="{Binding ElementName=MainWindow}" />
<MenuItem Header="{x:Static p:Resources.Label_Restart}"
Command="{Binding StartFolderMonitorsCommand}" />
<MenuItem Header="{x:Static p:Resources.Label_StopAllMonitors}"
@@ -211,7 +211,7 @@
Margin="4"
Content="{x:Static p:Resources.Label_Remove}" />
<Button Command="{Binding DataContext.RestartMonitoringPathCommand,
RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"
ElementName=MainWindow }"
CommandParameter="{Binding .}"
Style="{StaticResource MaterialDesignOutlinedButton}"
Margin="4"