142 lines
7.4 KiB
Plaintext
142 lines
7.4 KiB
Plaintext
|
|
<Page
|
||
|
|
x:Class="WPFluent.Gallery.Views.Pages.DialogsAndFlyoutsPage"
|
||
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
|
xmlns:controls="clr-namespace:WPFluent.Gallery.Controls"
|
||
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
|
|
xmlns:models="clr-namespace:WPFluent.Gallery.Models"
|
||
|
|
xmlns:pages="clr-namespace:WPFluent.Gallery.Views.Pages"
|
||
|
|
xmlns:ui="https://github.com/ShrlAlgo/WPFluent"
|
||
|
|
xmlns:vm="clr-namespace:WPFluent.Gallery.ViewModels.Pages"
|
||
|
|
mc:Ignorable="d"
|
||
|
|
controls:PageControlDocumentation.Show="False"
|
||
|
|
d:DataContext="{d:DesignInstance vm:DialogsAndFlyoutsViewModel,
|
||
|
|
IsDesignTimeCreatable=False}"
|
||
|
|
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||
|
|
Title="DialogsAndFlyoutsPage"
|
||
|
|
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
|
||
|
|
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}">
|
||
|
|
<Page.Resources>
|
||
|
|
<ResourceDictionary>
|
||
|
|
<StackPanel x:Key="DialogContent">
|
||
|
|
<TextBlock Text="Lorem ipsum dolor sit amet, adipisicing elit." TextWrapping="Wrap" />
|
||
|
|
<CheckBox Content="Upload your content to the cloud." />
|
||
|
|
</StackPanel>
|
||
|
|
</ResourceDictionary>
|
||
|
|
</Page.Resources>
|
||
|
|
<ui:StackPanel Spacing="5">
|
||
|
|
<GroupBox Header="WPF UI Flyout control.">
|
||
|
|
<Grid>
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
<ui:Flyout
|
||
|
|
Grid.Row="0"
|
||
|
|
IsOpen="{Binding ViewModel.IsFlyoutOpen, Mode=TwoWay, RelativeSource={RelativeSource AncestorType={x:Type pages:DialogsAndFlyoutsPage}, Mode=FindAncestor}}"
|
||
|
|
Placement="Top">
|
||
|
|
<StackPanel>
|
||
|
|
<TextBlock
|
||
|
|
Width="280"
|
||
|
|
HorizontalAlignment="Left"
|
||
|
|
Text="Replicants like any other machine are either a benefit or a hazard. If they're a benefit it's not my problem."
|
||
|
|
TextWrapping="WrapWithOverflow" />
|
||
|
|
<Button Margin="0,8,0,0" Content="The cake is a lie!" />
|
||
|
|
</StackPanel>
|
||
|
|
</ui:Flyout>
|
||
|
|
<Button
|
||
|
|
Grid.Row="1"
|
||
|
|
Command="{Binding ViewModel.ButtonClickCommand, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:DialogsAndFlyoutsPage}, Mode=FindAncestor}}"
|
||
|
|
CommandParameter="{Binding Mode=OneWay, RelativeSource={RelativeSource Mode=Self}}"
|
||
|
|
Content="Open flyout" />
|
||
|
|
</Grid>
|
||
|
|
</GroupBox>
|
||
|
|
<GroupBox Header="ContentDialog">
|
||
|
|
<StackPanel Orientation="Horizontal">
|
||
|
|
<Button
|
||
|
|
Command="{Binding ShowDialogCommand}"
|
||
|
|
CommandParameter="{StaticResource DialogContent}"
|
||
|
|
Content="Show" />
|
||
|
|
|
||
|
|
<TextBlock
|
||
|
|
Margin="15,0,0,0"
|
||
|
|
VerticalAlignment="Center"
|
||
|
|
FontSize="14"
|
||
|
|
Text="{Binding DialogResultText}" />
|
||
|
|
</StackPanel>
|
||
|
|
</GroupBox>
|
||
|
|
|
||
|
|
<GroupBox Header="Terms of Use ContentDialog example">
|
||
|
|
<Button Command="{Binding ShowSignInContentDialogCommand}" Content="Show" />
|
||
|
|
</GroupBox>
|
||
|
|
<GroupBox Header="Standard MessageBox.">
|
||
|
|
<Button
|
||
|
|
Command="{Binding ViewModel.OpenStandardMessageBoxCommand, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:DialogsAndFlyoutsPage}, Mode=FindAncestor}}"
|
||
|
|
CommandParameter="{Binding Mode=OneWay, RelativeSource={RelativeSource Mode=Self}}"
|
||
|
|
Content="Open standard MessageBox" />
|
||
|
|
</GroupBox>
|
||
|
|
|
||
|
|
<GroupBox Header="WPF UI MessageBox.">
|
||
|
|
<Button
|
||
|
|
Command="{Binding ViewModel.OpenCustomMessageBoxCommand, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:DialogsAndFlyoutsPage}, Mode=FindAncestor}}"
|
||
|
|
CommandParameter="{Binding Mode=OneWay, RelativeSource={RelativeSource Mode=Self}}"
|
||
|
|
Content="Open custom MessageBox" />
|
||
|
|
</GroupBox>
|
||
|
|
<GroupBox Header="Global WPF UI Snackbar inside NavigationView content.">
|
||
|
|
<Grid>
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="*" />
|
||
|
|
<ColumnDefinition Width="Auto" />
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
<Button
|
||
|
|
Grid.Column="0"
|
||
|
|
VerticalAlignment="Center"
|
||
|
|
Command="{Binding ViewModel.OpenSnackbarCommand, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:DialogsAndFlyoutsPage}, Mode=FindAncestor}}"
|
||
|
|
CommandParameter="{Binding Mode=OneWay, RelativeSource={RelativeSource Mode=Self}}"
|
||
|
|
Content="Show snackbar" />
|
||
|
|
<Grid Grid.Column="1" VerticalAlignment="Center">
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
<ComboBox
|
||
|
|
Grid.Row="0"
|
||
|
|
MinWidth="140"
|
||
|
|
Margin="0,8,0,0"
|
||
|
|
VerticalAlignment="Center"
|
||
|
|
SelectedIndex="{Binding ViewModel.SnackbarAppearanceComboBoxSelectedIndex, Mode=TwoWay, RelativeSource={RelativeSource AncestorType={x:Type pages:DialogsAndFlyoutsPage}, Mode=FindAncestor}}">
|
||
|
|
<ComboBoxItem Content="Primary" />
|
||
|
|
<ComboBoxItem Content="Secondary" />
|
||
|
|
<ComboBoxItem Content="Info" />
|
||
|
|
<ComboBoxItem Content="Success" />
|
||
|
|
<ComboBoxItem Content="Caution" />
|
||
|
|
<ComboBoxItem Content="Danger" />
|
||
|
|
<ComboBoxItem Content="Light" />
|
||
|
|
<ComboBoxItem Content="Dark" />
|
||
|
|
<ComboBoxItem Content="Transparent" />
|
||
|
|
</ComboBox>
|
||
|
|
<Label
|
||
|
|
Grid.Row="1"
|
||
|
|
Margin="0,6,0,0"
|
||
|
|
Content="Timeout:" />
|
||
|
|
<Slider
|
||
|
|
Grid.Row="2"
|
||
|
|
Value="{Binding ViewModel.SnackbarTimeout, Mode=TwoWay, RelativeSource={RelativeSource AncestorType={x:Type pages:DialogsAndFlyoutsPage}, Mode=FindAncestor}}"
|
||
|
|
AutoToolTipPlacement="BottomRight"
|
||
|
|
AutoToolTipPrecision="0"
|
||
|
|
IsSnapToTickEnabled="True"
|
||
|
|
Maximum="5"
|
||
|
|
Minimum="1"
|
||
|
|
TickFrequency="1"
|
||
|
|
TickPlacement="BottomRight" />
|
||
|
|
</Grid>
|
||
|
|
</Grid>
|
||
|
|
</GroupBox>
|
||
|
|
<!--<controls:GalleryNavigationPresenter
|
||
|
|
Grid.Row="1"
|
||
|
|
Margin="0, 10"
|
||
|
|
ItemsSource="{Binding ViewModel.NavigationCards, Mode=OneWay}" />-->
|
||
|
|
</ui:StackPanel>
|
||
|
|
</Page>
|