55 строки
2.9 KiB
XML
55 строки
2.9 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
x:Class="Xamarin.Forms.Controls.Issues.Issue6282">
|
|
<ContentPage.Resources>
|
|
<ResourceDictionary>
|
|
<Style x:Key="StandardButtonStyle" TargetType="Button">
|
|
<Setter Property="BorderColor" Value="#CCC" />
|
|
<Setter Property="FontSize" Value="Medium" />
|
|
</Style>
|
|
<Style x:Key="DisabledButtonStyle" TargetType="Button">
|
|
<Setter Property="BorderColor" Value="#AAA" />
|
|
<Setter Property="FontSize" Value="Medium" />
|
|
</Style>
|
|
</ResourceDictionary>
|
|
</ContentPage.Resources>
|
|
<ContentPage.Content>
|
|
<StackLayout>
|
|
<Label Text="The button below should have text aligned in the center. Should be used flag 'UseLegacyRenderer'" />
|
|
<Button x:Name="button" Style="{StaticResource StandardButtonStyle}" IsEnabled="False" Text="Issue Button">
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal">
|
|
<VisualState.Setters>
|
|
<Setter Property="Style" Value="{StaticResource StandardButtonStyle}" />
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="Disabled">
|
|
<VisualState.Setters>
|
|
<Setter Property="Style" Value="{StaticResource DisabledButtonStyle}" />
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
</Button>
|
|
<Button x:Name="buttonMaterial" Style="{StaticResource StandardButtonStyle}" IsEnabled="False" Text="Issue Button" Visual="Material">
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal">
|
|
<VisualState.Setters>
|
|
<Setter Property="Style" Value="{StaticResource StandardButtonStyle}" />
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="Disabled">
|
|
<VisualState.Setters>
|
|
<Setter Property="Style" Value="{StaticResource DisabledButtonStyle}" />
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
</Button>
|
|
</StackLayout>
|
|
</ContentPage.Content>
|
|
</ContentPage>
|