fixed issue where the WPF host went into the next monitor went opening flying from top taskbar position

This commit is contained in:
Daniel Clark
2021-02-07 12:41:16 +00:00
parent 637fd78190
commit fbf7713705
2 changed files with 9 additions and 9 deletions
@@ -18,25 +18,25 @@
x:Key="TopFlyoutPresenterStyle"
BasedOn="{StaticResource DefaultFlyoutPresenterStyle}"
TargetType="FlyoutPresenter">
<Setter Property="Margin" Value="0,-5,0,0" />
<Setter Property="Margin" Value="0,-7,0,0" />
</Style>
<Style
x:Key="BottomFlyoutPresenterStyle"
BasedOn="{StaticResource DefaultFlyoutPresenterStyle}"
TargetType="FlyoutPresenter">
<Setter Property="Margin" Value="0,5,0,0" />
<Setter Property="Margin" Value="0,7,0,0" />
</Style>
<Style
x:Key="LeftFlyoutPresenterStyle"
BasedOn="{StaticResource DefaultFlyoutPresenterStyle}"
TargetType="FlyoutPresenter">
<Setter Property="Margin" Value="-5,0,0,0" />
<Setter Property="Margin" Value="-7,0,0,0" />
</Style>
<Style
x:Key="RightFlyoutPresenterStyle"
BasedOn="{StaticResource DefaultFlyoutPresenterStyle}"
TargetType="FlyoutPresenter">
<Setter Property="Margin" Value="5,0,0,0" />
<Setter Property="Margin" Value="7,0,0,0" />
</Style>
</Grid.Resources>
<FlyoutBase.AttachedFlyout>
@@ -98,9 +98,9 @@ namespace NotificationFlyout.Wpf.UI.Controls
WindowStyle = WindowStyle.None;
ResizeMode = ResizeMode.NoResize;
AllowsTransparency = true;
Background = new SolidColorBrush(Colors.Red);
Height = 0;
Width = 0;
Background = new SolidColorBrush(Colors.Transparent);
Height = 5;
Width = 5;
}
private void PrepareNotificationIcon()
@@ -138,8 +138,8 @@ namespace NotificationFlyout.Wpf.UI.Controls
Left = taskbarState.Screen.WorkingArea.Left;
Top = taskbarState.Screen.WorkingArea.Top;
var windowWidth = 0 * this.DpiX();
var windowHeight = 0 * this.DpiY();
var windowWidth = 5 * this.DpiX();
var windowHeight = 5 * this.DpiY();
double top, left, height, width;