86 строки
2.8 KiB
XML
86 строки
2.8 KiB
XML
<UserControl
|
|
x:Class="Xamarin.Forms.Platform.UWP.FormsFlyout"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="using:Xamarin.Forms.Platform.UAP"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="300"
|
|
d:DesignWidth="400">
|
|
|
|
<UserControl.Resources>
|
|
<ResourceDictionary>
|
|
<Style x:Key="ActionTitle" TargetType="TextBlock" BasedOn="{StaticResource SubtitleTextBlockStyle}">
|
|
<Setter Property="FontSize" Value="18"/>
|
|
<Setter Property="MaxLines" Value="2"/>
|
|
</Style>
|
|
|
|
<Style x:Key="ActionButton" TargetType="Button">
|
|
<Setter Property="Height" Value="32" />
|
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
|
<Setter Property="Margin" Value="5,0,0,0" />
|
|
</Style>
|
|
|
|
<Style x:Key="LeftActionButton" TargetType="Button" BasedOn="{StaticResource ActionButton}">
|
|
<Setter Property="Margin" Value="0,0,5,0"/>
|
|
</Style>
|
|
|
|
<Style x:Key="ActionSheetList" TargetType="ListView">
|
|
<Setter Property="Margin" Value="0,10,0,10"/>
|
|
<Setter Property="IsItemClickEnabled" Value="true"/>
|
|
<Setter Property="SelectionMode" Value="None" />
|
|
<Setter Property="ItemContainerStyle">
|
|
<Setter.Value>
|
|
<Style TargetType="ListViewItem">
|
|
<Setter Property="Margin" Value="0" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
</Style>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="ItemTemplate">
|
|
<Setter.Value>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding}" HorizontalAlignment="Stretch" VerticalAlignment="Center" FontSize="16" />
|
|
</DataTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ResourceDictionary>
|
|
</UserControl.Resources>
|
|
|
|
<Grid Padding="10">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock x:Name="TitleBlock" Style="{StaticResource ActionTitle}"/>
|
|
<ListView x:Name="OptionsList" Grid.Row="1"
|
|
Style="{StaticResource ActionSheetList}"
|
|
ItemClick="ListItemSelected" />
|
|
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="1" VerticalAlignment="Bottom">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Button x:Name="LeftBtn" Grid.Column="0"
|
|
Style="{StaticResource LeftActionButton}"
|
|
Click="ActionButtonClicked"/>
|
|
<Button x:Name="RightBtn" Grid.Column="1"
|
|
Style="{StaticResource ActionButton}"
|
|
Click="ActionButtonClicked"/>
|
|
</Grid>
|
|
</Grid>
|
|
</UserControl>
|