1234567891011121314151617181920212223242526272829303132333435363738 |
- <UserControl xmlns="https://github.com/avaloniaui"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:components="using:InABox.Avalonia.Components"
- mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
- x:Class="InABox.Avalonia.Components.OptionSelectorView"
- x:DataType="components:OptionSelectorViewModel">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
- <Label Grid.Row="0"
- FontSize="{StaticResource PrsFontSizeLarge}"
- Content="{Binding Title}"/>
- <ItemsControl Grid.Row="1" ItemsSource="{Binding Options}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Button Classes="Transparent"
- Content="{Binding}"
- CommandParameter="{Binding}"
- Padding="10"
- Command="{Binding $parent[components:OptionSelectorView].((components:OptionSelectorViewModel)DataContext).SelectCommand}"
- HorizontalContentAlignment="Left"/>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- <DockPanel Grid.Row="2" LastChildFill="False">
- <Button Content="Cancel" DockPanel.Dock="Right" Command="{Binding CancelCommand}"
- Classes="Standard"/>
- </DockPanel>
- </Grid>
- </UserControl>
|