fixed issue with margin

This commit is contained in:
Daniel Clark
2021-02-27 11:57:23 +00:00
parent 737dbe9b32
commit 240609270e
3 changed files with 7 additions and 6 deletions
@@ -2,16 +2,15 @@
x:Class="NotificationFlyoutSample.SampleFlyout"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:TheXamlGuy.NotificationFlyout.Uwp.UI.Controls"
CornerRadius="6">
xmlns:controls="using:TheXamlGuy.NotificationFlyout.Uwp.UI.Controls">
<controls:NotificationFlyout.ContextFlyout>
<MenuFlyout>
<MenuFlyoutItem Text="Close" Click="OnCloseMenuFlyoutItemClick" />
<MenuFlyoutItem Click="OnCloseMenuFlyoutItemClick" Text="Close" />
</MenuFlyout>
</controls:NotificationFlyout.ContextFlyout>
<Grid Width="500" Height="500">
<Grid Width="500" Height="400">
<Button
HorizontalAlignment="Right"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Content="Hello World!" />
</Grid>
@@ -36,7 +36,7 @@
<Setter.Value>
<ControlTemplate TargetType="controls:NotificationFlyout">
<Border x:Name="Container">
<Grid x:Name="LayoutRoot">
<Grid x:Name="LayoutRoot" Margin="{TemplateBinding Margin}">
<Border
x:Name="BackgroundElement"
Padding="{TemplateBinding Padding}"
@@ -107,6 +107,7 @@ namespace TheXamlGuy.NotificationFlyout.Wpf.UI.Controls
UpdateIcons();
}
private void PrepareFlyoutHost()
{
_notificationFlyoutXamlHost = new TransparentXamlHost<ContentControl>();
@@ -126,6 +127,7 @@ namespace TheXamlGuy.NotificationFlyout.Wpf.UI.Controls
_notificationFlyoutXamlHost.Activate();
Flyout.Show();
}
private void UpdateFlyoutPlacement()
{
var taskbarState = _taskbarHelper.GetCurrentState();