fixed button size and position

This commit is contained in:
Ismael 2021-02-23 17:11:26 +01:00 коммит произвёл michael-hawker
Родитель 3c394d92c7
Коммит e752eb3768
2 изменённых файлов: 29 добавлений и 29 удалений

Просмотреть файл

@ -40,19 +40,13 @@
<VisualState x:Name="Normal" />
<VisualState x:Name="PointerOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlMSEdgeNotificationPointerOverForegroundBrush}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlMSEdgeNotificationPointerOverChromeBrush}" />
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonPointerOverBackgroundThemeBrush}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlMSEdgeNotificationPointerOverForegroundBrush}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlMSEdgeNotificationPointerOverChromeBrush}" />
</ObjectAnimationUsingKeyFrames>
@ -236,20 +230,20 @@
<Button x:Name="OkButton"
Margin="0"
FontSize="16"
FontSize="14"
Content="Ok"
Height="40"
Width="120"
Height="30"
Width="100"
Command="{StaticResource DismissCommand}"
CommandParameter="{Binding ElementName=ExampleInAppNotification}"
AutomationProperties.Name="Ok" />
<Button x:Name="CancelButton"
Margin="4,0,0,0"
FontSize="16"
FontSize="14"
Content="Cancel"
Height="40"
Width="120"
Height="30"
Width="100"
Command="{StaticResource DismissCommand}"
CommandParameter="{Binding ElementName=ExampleInAppNotification}"
AutomationProperties.Name="Cancel"/>
@ -257,18 +251,21 @@
</StackPanel>
<Button x:Name="DismissButton"
CornerRadius="2"
Grid.Column="2"
Margin="4,0,0,0"
FontSize="16"
Margin="0 0 2 0"
FontSize="12"
Height="43" Width="48"
Style="{StaticResource DismissTextBlockButtonStyle}"
Content="&#xE894;"
FontFamily="Segoe MDL2 Assets"
AutomationProperties.Name="Dismiss"
Command="{StaticResource DismissCommand}"
CommandParameter="{Binding ElementName=ExampleInAppNotification}"
VerticalAlignment="Center"
Visibility="{Binding ShowDismissButton, ElementName=ExampleCustomInAppNotification}">
<Button.RenderTransform>
<TranslateTransform x:Name="DismissButtonTransform" X="18" />
<TranslateTransform x:Name="DismissButtonTransform" X="25" Y="-5"/>
</Button.RenderTransform>
</Button>
</Grid>
@ -342,13 +339,19 @@
TextWrapping="WrapWholeWords" />
<Button x:Name="PART_DismissButton"
Grid.Column="1"
CornerRadius="20" Height="43" Width="48"
Grid.Column="1"
VerticalAlignment="Top"
Visibility="{Binding ShowDismissButton, RelativeSource={RelativeSource Mode=TemplatedParent}, Converter={StaticResource BoolToVisibilityConverter}}"
FontSize="16"
FontSize="12"
Style="{StaticResource DismissTextBlockButtonStyle}"
Content="&#xE894;"
FontFamily="Segoe MDL2 Assets"
AutomationProperties.Name="Dismiss" />
Content="&#xE894;"
FontFamily="Segoe MDL2 Assets"
AutomationProperties.Name="Dismiss">
<Button.RenderTransform>
<TranslateTransform x:Name="DismissButtonTransform" X="25" Y="-7"/>
</Button.RenderTransform>
</Button>
</Grid>
</controls:DropShadowPanel>
</Grid>

Просмотреть файл

@ -75,11 +75,6 @@
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text"
Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0"
Value="{ThemeResource SystemControlMSEdgeNotificationPointerPressedForegroundBrush}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid"
Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0"
@ -133,10 +128,11 @@
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="40" />
</Grid.ColumnDefinitions>
<ContentPresenter x:Name="PART_Presenter"
Grid.Column="0"
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="Stretch"
@ -146,16 +142,17 @@
TextWrapping="WrapWholeWords" />
<Button x:Name="PART_DismissButton"
CornerRadius="2"
Grid.Column="1"
Margin="0"
AutomationProperties.Name="Dismiss"
Content="&#xE894;"
FontFamily="Segoe MDL2 Assets"
FontSize="12"
VerticalAlignment="{StaticResource SystemControlMSEdgeNotificationDismissButtonVerticalAlignment}"
VerticalAlignment="Top"
Style="{StaticResource DismissTextBlockButtonStyle}">
<Button.RenderTransform>
<TranslateTransform x:Name="DismissButtonTransform" X="18" Y="-8"/>
<TranslateTransform x:Name="DismissButtonTransform" X="25" Y="-5"/>
</Button.RenderTransform>
</Button>
</Grid>