fixed issue where the WPF host went into the next monitor went opening flying from top taskbar position
This commit is contained in:
+4
-4
@@ -18,25 +18,25 @@
|
|||||||
x:Key="TopFlyoutPresenterStyle"
|
x:Key="TopFlyoutPresenterStyle"
|
||||||
BasedOn="{StaticResource DefaultFlyoutPresenterStyle}"
|
BasedOn="{StaticResource DefaultFlyoutPresenterStyle}"
|
||||||
TargetType="FlyoutPresenter">
|
TargetType="FlyoutPresenter">
|
||||||
<Setter Property="Margin" Value="0,-5,0,0" />
|
<Setter Property="Margin" Value="0,-7,0,0" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style
|
<Style
|
||||||
x:Key="BottomFlyoutPresenterStyle"
|
x:Key="BottomFlyoutPresenterStyle"
|
||||||
BasedOn="{StaticResource DefaultFlyoutPresenterStyle}"
|
BasedOn="{StaticResource DefaultFlyoutPresenterStyle}"
|
||||||
TargetType="FlyoutPresenter">
|
TargetType="FlyoutPresenter">
|
||||||
<Setter Property="Margin" Value="0,5,0,0" />
|
<Setter Property="Margin" Value="0,7,0,0" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style
|
<Style
|
||||||
x:Key="LeftFlyoutPresenterStyle"
|
x:Key="LeftFlyoutPresenterStyle"
|
||||||
BasedOn="{StaticResource DefaultFlyoutPresenterStyle}"
|
BasedOn="{StaticResource DefaultFlyoutPresenterStyle}"
|
||||||
TargetType="FlyoutPresenter">
|
TargetType="FlyoutPresenter">
|
||||||
<Setter Property="Margin" Value="-5,0,0,0" />
|
<Setter Property="Margin" Value="-7,0,0,0" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style
|
<Style
|
||||||
x:Key="RightFlyoutPresenterStyle"
|
x:Key="RightFlyoutPresenterStyle"
|
||||||
BasedOn="{StaticResource DefaultFlyoutPresenterStyle}"
|
BasedOn="{StaticResource DefaultFlyoutPresenterStyle}"
|
||||||
TargetType="FlyoutPresenter">
|
TargetType="FlyoutPresenter">
|
||||||
<Setter Property="Margin" Value="5,0,0,0" />
|
<Setter Property="Margin" Value="7,0,0,0" />
|
||||||
</Style>
|
</Style>
|
||||||
</Grid.Resources>
|
</Grid.Resources>
|
||||||
<FlyoutBase.AttachedFlyout>
|
<FlyoutBase.AttachedFlyout>
|
||||||
|
|||||||
@@ -98,9 +98,9 @@ namespace NotificationFlyout.Wpf.UI.Controls
|
|||||||
WindowStyle = WindowStyle.None;
|
WindowStyle = WindowStyle.None;
|
||||||
ResizeMode = ResizeMode.NoResize;
|
ResizeMode = ResizeMode.NoResize;
|
||||||
AllowsTransparency = true;
|
AllowsTransparency = true;
|
||||||
Background = new SolidColorBrush(Colors.Red);
|
Background = new SolidColorBrush(Colors.Transparent);
|
||||||
Height = 0;
|
Height = 5;
|
||||||
Width = 0;
|
Width = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PrepareNotificationIcon()
|
private void PrepareNotificationIcon()
|
||||||
@@ -138,8 +138,8 @@ namespace NotificationFlyout.Wpf.UI.Controls
|
|||||||
Left = taskbarState.Screen.WorkingArea.Left;
|
Left = taskbarState.Screen.WorkingArea.Left;
|
||||||
Top = taskbarState.Screen.WorkingArea.Top;
|
Top = taskbarState.Screen.WorkingArea.Top;
|
||||||
|
|
||||||
var windowWidth = 0 * this.DpiX();
|
var windowWidth = 5 * this.DpiX();
|
||||||
var windowHeight = 0 * this.DpiY();
|
var windowHeight = 5 * this.DpiY();
|
||||||
|
|
||||||
double top, left, height, width;
|
double top, left, height, width;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user