108 lines
3.9 KiB
XML
108 lines
3.9 KiB
XML
<UserControl
|
|
x:Class="Ursa.Demo.Dialogs.CustomDemoDialog"
|
|
xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:dialogs="clr-namespace:Ursa.Demo.Dialogs"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:u="https://irihi.tech/ursa"
|
|
d:DesignHeight="450"
|
|
d:DesignWidth="800"
|
|
x:DataType="dialogs:CustomDemoDialogViewModel"
|
|
mc:Ignorable="d">
|
|
<UserControl.Background>
|
|
<LinearGradientBrush StartPoint="5%, 5%" EndPoint="80%, 80%">
|
|
<GradientStop Offset="0.0" Color="{DynamicResource SemiLightBlue0Color}" />
|
|
<GradientStop Offset="0.4" Color="{DynamicResource SemiLightBlue2Color}" />
|
|
<GradientStop Offset="0.9" Color="{DynamicResource SemiLightBlue1Color}" />
|
|
</LinearGradientBrush>
|
|
</UserControl.Background>
|
|
<Grid
|
|
MinWidth="400"
|
|
Margin="24"
|
|
RowDefinitions="Auto, *, Auto">
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Margin="8"
|
|
FontSize="16"
|
|
FontWeight="600"
|
|
Text="Add New" />
|
|
<u:Form
|
|
Grid.Row="1"
|
|
Margin="24"
|
|
HorizontalAlignment="Stretch"
|
|
LabelPosition="Top">
|
|
<u:Form.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<Grid ColumnDefinitions="Auto, *" RowDefinitions="Auto, *" />
|
|
</ItemsPanelTemplate>
|
|
</u:Form.ItemsPanel>
|
|
<u:FormItem Label="Country/Region">
|
|
<ComboBox
|
|
Width="120"
|
|
ItemsSource="{Binding Cities}"
|
|
SelectedItem="{Binding City}" />
|
|
</u:FormItem>
|
|
<u:FormItem
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
Margin="32,8,0,8"
|
|
Label="Owner">
|
|
<TextBox
|
|
u:FocusHelper.DialogFocusHint="True"
|
|
u:FormItem.Label="Owner"
|
|
Text="{Binding Owner}" />
|
|
</u:FormItem>
|
|
<u:FormItem
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Label="Target">
|
|
<ComboBox
|
|
Width="120"
|
|
ItemsSource="{Binding Cities}"
|
|
SelectedItem="{Binding Target}" />
|
|
</u:FormItem>
|
|
<u:FormItem
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Margin="32,8,0,8"
|
|
Label="Department">
|
|
<TextBox Text="{Binding Department}" />
|
|
</u:FormItem>
|
|
</u:Form>
|
|
<StackPanel
|
|
Grid.Row="2"
|
|
HorizontalAlignment="Right"
|
|
Orientation="Horizontal"
|
|
Spacing="8">
|
|
<Button
|
|
Command="{Binding ShowNotificationCommand}"
|
|
Content="Notification"
|
|
Theme="{DynamicResource SolidButton}" />
|
|
<Button
|
|
Command="{Binding ShowToastCommand}"
|
|
Content="Toast"
|
|
Theme="{DynamicResource SolidButton}" />
|
|
<Button
|
|
Command="{Binding DialogCommand}"
|
|
Content="Dialog"
|
|
Theme="{DynamicResource SolidButton}" />
|
|
<Button
|
|
Classes="Tertiary"
|
|
Command="{Binding OKCommand}"
|
|
Content="OK"
|
|
Theme="{DynamicResource SolidButton}" />
|
|
<Button
|
|
Classes="Tertiary"
|
|
Command="{Binding CancelCommand}"
|
|
Content="Cancel"
|
|
Theme="{DynamicResource SolidButton}" />
|
|
<ComboBox>
|
|
<ComboBoxItem>A</ComboBoxItem>
|
|
<ComboBoxItem>B</ComboBoxItem>
|
|
<ComboBoxItem>C</ComboBoxItem>
|
|
</ComboBox>
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
</UserControl> |