diff options
Diffstat (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2951.xaml')
-rw-r--r-- | Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2951.xaml | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2951.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2951.xaml new file mode 100644 index 00000000..a4942512 --- /dev/null +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2951.xaml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?> +<controls:TestContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:controls="clr-namespace:Xamarin.Forms.Controls;assembly=Xamarin.Forms.Controls" x:Name="ThePageIssue2951" x:Class="Xamarin.Forms.Controls.Issue2951"> + <controls:TestContentPage.Resources> + <ResourceDictionary> + <Style x:Key="ButtonStyle" TargetType="Button"> + <Setter Property="BackgroundColor" Value="Silver" /> + <Setter Property="TextColor" Value="Black" /> + <Style.Triggers> + <Trigger Property="controls:ButtonExtensions.IsPrimary" Value="True" TargetType="Button"> + <Setter Property="BackgroundColor" Value="#FAC54A" /> + </Trigger> + </Style.Triggers> + </Style> + <Style x:Key="ChangeStatusButton" TargetType="Button" BasedOn="{StaticResource ButtonStyle}"> + <Setter Property="controls:ButtonExtensions.IsPrimary" Value="False" /> + <Setter Property="Text" Value="A" /> + <Setter Property="Command" Value="{Binding Source={x:Reference ThePageIssue2951},Path=BindingContext.ButtonTapped}" /> + <Setter Property="CommandParameter" Value="{Binding .}" /> + <Style.Triggers> + <DataTrigger Binding="{Binding IsStarted}" Value="True" TargetType="Button"> + <Setter Property="controls:ButtonExtensions.IsPrimary" Value="True" /> + <Setter Property="Text" Value="B" /> + </DataTrigger> + </Style.Triggers> + </Style> + <DataTemplate x:Key="TheItemTemplate"> + <ViewCell> + <ViewCell.View> + <Grid Padding="12,5" RowSpacing="4"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="*" /> + <ColumnDefinition Width="75" /> + </Grid.ColumnDefinitions> + <Grid.RowDefinitions> + <RowDefinition Height="*" /> + </Grid.RowDefinitions> + <Label Grid.Column="0" Text="{Binding Name}" TextColor="Yellow" /> + <Button AutomationId="btnChangeStatus" Grid.Column="1" Style="{StaticResource ChangeStatusButton}" /> + </Grid> + </ViewCell.View> + </ViewCell> + </DataTemplate> + </ResourceDictionary> + </controls:TestContentPage.Resources> + <controls:TestContentPage.Content> + <ListView ItemTemplate="{StaticResource TheItemTemplate}" ItemsSource="{Binding Items}" RowHeight="74" /> + </controls:TestContentPage.Content> +</controls:TestContentPage>
\ No newline at end of file |