550 lines
28 KiB
XML
550 lines
28 KiB
XML
<Page
|
|
x:Class="WPFluent.Gallery.Views.Pages.BasicInputPage"
|
|
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:BasicInputViewModel,
|
|
IsDesignTimeCreatable=False}"
|
|
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
|
Title="BasicInputPage"
|
|
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
|
|
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}">
|
|
|
|
<ui:StackPanel Spacing="10">
|
|
<GroupBox
|
|
Grid.Row="0"
|
|
Margin="0"
|
|
Header="WPF UI anchor.">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<ui:Anchor
|
|
Grid.Column="0"
|
|
Content="WPF UI anchor"
|
|
Icon="{ui:SymbolIcon Link24}"
|
|
IsEnabled="{Binding ViewModel.IsAnchorEnabled, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}"
|
|
NavigateUri="https://lepo.co/" />
|
|
<CheckBox
|
|
Grid.Column="1"
|
|
Command="{Binding ViewModel.AnchorCheckboxCheckedCommand, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}"
|
|
CommandParameter="{Binding Mode=OneWay, RelativeSource={RelativeSource Mode=Self}}"
|
|
Content="Disable anchor" />
|
|
</Grid>
|
|
</GroupBox>
|
|
<GroupBox Header="Standard Button">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Button
|
|
Grid.Column="0"
|
|
Content="Standard WPF button"
|
|
IsEnabled="{Binding ViewModel.IsSimpleButtonEnabled, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}" />
|
|
<CheckBox
|
|
Grid.Column="1"
|
|
Command="{Binding ViewModel.SimpleButtonCheckboxCheckedCommand, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}"
|
|
CommandParameter="{Binding Mode=OneWay, RelativeSource={RelativeSource Mode=Self}}"
|
|
Content="Disable button" />
|
|
</Grid>
|
|
</GroupBox>
|
|
|
|
<GroupBox Header="Standard IconButton">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<ui:Button
|
|
Grid.Column="0"
|
|
Content="WPF UI button"
|
|
Icon="{ui:SymbolIcon Fluent24}"
|
|
IsEnabled="{Binding ViewModel.IsUiButtonEnabled, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}" />
|
|
<CheckBox
|
|
Grid.Column="1"
|
|
Command="{Binding ViewModel.UiButtonCheckboxCheckedCommand, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}"
|
|
CommandParameter="{Binding Mode=OneWay, RelativeSource={RelativeSource Mode=Self}}"
|
|
Content="Disable button" />
|
|
</Grid>
|
|
</GroupBox>
|
|
|
|
<GroupBox Header="Accent IconButton">
|
|
<UniformGrid Rows="1">
|
|
<ui:Button
|
|
HorizontalAlignment="Center"
|
|
Appearance="Primary"
|
|
Content="WPF UI button"
|
|
Icon="{ui:SymbolIcon Fluent24}" />
|
|
<ui:Button
|
|
Appearance="Primary"
|
|
Content="WPF UI button with font icon"
|
|
Icon="{ui:FontIcon 🌈}" />
|
|
<ui:Button
|
|
Appearance="Primary"
|
|
Content="WPF UI button with image icon"
|
|
Icon="{ui:ImageIcon pack://application:\,\,\,/WPFluent.Gallery;component/wpfui.png}" />
|
|
</UniformGrid>
|
|
</GroupBox>
|
|
<GroupBox Header="ToggleSwitch">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<ui:ToggleSwitch
|
|
Grid.Column="0"
|
|
IsEnabled="{Binding ViewModel.IsToggleSwitchEnabled, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}"
|
|
OffContent="Off"
|
|
OnContent="On" />
|
|
<CheckBox
|
|
Grid.Column="1"
|
|
Command="{Binding ViewModel.ToggleSwitchCheckboxCheckedCommand, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}"
|
|
CommandParameter="{Binding Mode=OneWay, RelativeSource={RelativeSource Mode=Self}}"
|
|
Content="Disable switch" />
|
|
</Grid>
|
|
</GroupBox>
|
|
<GroupBox Header="ToggleButton">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<ToggleButton
|
|
Grid.Column="0"
|
|
Content="Standard ToggleButton"
|
|
IsEnabled="{Binding ViewModel.IsToggleButtonEnabled, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}" />
|
|
<CheckBox
|
|
Grid.Column="1"
|
|
Command="{Binding ViewModel.ToggleButtonCheckboxCheckedCommand, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}"
|
|
CommandParameter="{Binding Mode=OneWay, RelativeSource={RelativeSource Mode=Self}}"
|
|
Content="Disable toggle button" />
|
|
</Grid>
|
|
</GroupBox>
|
|
<ui:Card Margin="5">
|
|
<UniformGrid Rows="1">
|
|
<CheckBox Content="Two-state CheckBox" />
|
|
<CheckBox
|
|
Content="Three-state CheckBox"
|
|
IsChecked="{x:Null}"
|
|
IsThreeState="True" />
|
|
</UniformGrid>
|
|
</ui:Card>
|
|
<ui:Card Margin="5">
|
|
<StackPanel>
|
|
<CheckBox
|
|
Command="{Binding ViewModel.SelectAllCheckedCommand, Mode=OneWay}"
|
|
CommandParameter="{Binding Mode=OneWay, RelativeSource={RelativeSource Mode=Self}}"
|
|
Content="Select all"
|
|
IsChecked="{Binding ViewModel.SelectAllCheckBoxChecked, Mode=TwoWay}"
|
|
IsThreeState="True" />
|
|
<CheckBox
|
|
Margin="24,0,0,0"
|
|
Command="{Binding ViewModel.SingleCheckedCommand, Mode=OneWay}"
|
|
CommandParameter="1"
|
|
Content="Option 1"
|
|
IsChecked="{Binding ViewModel.OptionOneCheckBoxChecked, Mode=TwoWay}" />
|
|
<CheckBox
|
|
Margin="24,0,0,0"
|
|
Command="{Binding ViewModel.SingleCheckedCommand, Mode=OneWay}"
|
|
CommandParameter="2"
|
|
Content="Option 2"
|
|
IsChecked="{Binding ViewModel.OptionTwoCheckBoxChecked, Mode=TwoWay}" />
|
|
<CheckBox
|
|
Margin="24,0,0,0"
|
|
Command="{Binding ViewModel.SingleCheckedCommand, Mode=OneWay}"
|
|
CommandParameter="3"
|
|
Content="Option 3"
|
|
IsChecked="{Binding ViewModel.OptionThreeCheckBoxChecked, Mode=TwoWay}" />
|
|
</StackPanel>
|
|
</ui:Card>
|
|
<GroupBox Header="ComboBox">
|
|
<UniformGrid Rows="1">
|
|
<ComboBox
|
|
MinWidth="200"
|
|
HorizontalAlignment="Left"
|
|
SelectedIndex="0">
|
|
<ComboBoxItem Content="Blue" />
|
|
<ComboBoxItem Content="Green" />
|
|
<ComboBoxItem Content="Red" />
|
|
<ComboBoxItem Content="Yellow" />
|
|
</ComboBox>
|
|
<ComboBox
|
|
MinWidth="200"
|
|
HorizontalAlignment="Left"
|
|
ItemsSource="{Binding ViewModel.ComboBoxFontFamilies, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}"
|
|
SelectedIndex="0">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock FontFamily="{Binding}" Text="{Binding}" />
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
<ComboBox
|
|
MinWidth="200"
|
|
HorizontalAlignment="Left"
|
|
IsEditable="True"
|
|
ItemsSource="{Binding ViewModel.ComboBoxFontSizes, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}"
|
|
SelectedIndex="0" />
|
|
</UniformGrid>
|
|
</GroupBox>
|
|
<GroupBox Margin="0" Header="A DropDownButton">
|
|
<ui:DropDownButton Content="Hello" Icon="{ui:SymbolIcon Fluent24}">
|
|
<ui:DropDownButton.Flyout>
|
|
<ContextMenu>
|
|
<MenuItem Header="Add" />
|
|
<MenuItem Header="Remove" />
|
|
<MenuItem Header="Send" />
|
|
<MenuItem Header="Hello" />
|
|
</ContextMenu>
|
|
</ui:DropDownButton.Flyout>
|
|
</ui:DropDownButton>
|
|
</GroupBox>
|
|
<GroupBox Margin="0" Header="WPF UI hyperlink.">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<ui:HyperlinkButton
|
|
Grid.Column="0"
|
|
Content="WPF UI hyperlink"
|
|
Icon="{ui:SymbolIcon Link24}"
|
|
IsEnabled="{Binding ViewModel.IsHyperlinkEnabled, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}"
|
|
NavigateUri="https://lepo.co/" />
|
|
<CheckBox
|
|
Grid.Column="1"
|
|
Command="{Binding ViewModel.HyperlinkCheckboxCheckedCommand, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}"
|
|
CommandParameter="{Binding Mode=OneWay, RelativeSource={RelativeSource Mode=Self}}"
|
|
Content="Disable hyperlink" />
|
|
</Grid>
|
|
</GroupBox>
|
|
|
|
<GroupBox Header="WPF UI hyperlink with FontIcon.">
|
|
<ui:HyperlinkButton
|
|
Grid.Column="0"
|
|
Content="WPF UI hyperlink"
|
|
Icon="{ui:FontIcon 🌈}"
|
|
IsEnabled="{Binding ViewModel.IsHyperlinkEnabled, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}"
|
|
NavigateUri="https://lepo.co/" />
|
|
</GroupBox>
|
|
|
|
<GroupBox Header="WPF UI hyperlink with ImageIcon.">
|
|
<ui:HyperlinkButton
|
|
Grid.Column="0"
|
|
Content="WPF UI hyperlink"
|
|
Icon="{ui:ImageIcon pack://application:\,\,\,/WPFluent.Gallery;component/wpfui.png}"
|
|
IsEnabled="{Binding ViewModel.IsHyperlinkEnabled, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}"
|
|
NavigateUri="https://lepo.co/" />
|
|
</GroupBox>
|
|
<GroupBox Margin="0" Header="Standard RadioButton.">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0">
|
|
<RadioButton
|
|
Content="Option 1"
|
|
GroupName="radio_group_one"
|
|
IsChecked="True"
|
|
IsEnabled="{Binding ViewModel.IsRadioButtonEnabled, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}" />
|
|
<RadioButton
|
|
Content="Option 2"
|
|
GroupName="radio_group_one"
|
|
IsEnabled="{Binding ViewModel.IsRadioButtonEnabled, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}" />
|
|
<RadioButton
|
|
Content="Option 3"
|
|
GroupName="radio_group_one"
|
|
IsEnabled="{Binding ViewModel.IsRadioButtonEnabled, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}" />
|
|
</StackPanel>
|
|
<CheckBox
|
|
Grid.Column="1"
|
|
Command="{Binding ViewModel.RadioButtonCheckboxCheckedCommand, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}"
|
|
CommandParameter="{Binding Mode=OneWay, RelativeSource={RelativeSource Mode=Self}}"
|
|
Content="Disable radio buttons" />
|
|
</Grid>
|
|
</GroupBox>
|
|
|
|
<GroupBox Header="RadioButton with right to left flow direction.">
|
|
<StackPanel Grid.Column="0">
|
|
<RadioButton
|
|
Content="Option 1"
|
|
FlowDirection="RightToLeft"
|
|
GroupName="radio_group_two"
|
|
IsChecked="True" />
|
|
<RadioButton
|
|
Content="Option 2"
|
|
FlowDirection="RightToLeft"
|
|
GroupName="radio_group_two" />
|
|
<RadioButton
|
|
Content="Option 3"
|
|
FlowDirection="RightToLeft"
|
|
GroupName="radio_group_two" />
|
|
</StackPanel>
|
|
</GroupBox>
|
|
<GroupBox Margin="0" Header="WPF UI rating.">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<ui:RatingControl
|
|
HorizontalAlignment="Left"
|
|
Value="{Binding ViewModel.FirstRatingValue, Mode=TwoWay}"
|
|
IsEnabled="{Binding ViewModel.IsFirstRatingEnabled, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}" />
|
|
<StackPanel
|
|
Grid.Column="1"
|
|
MinWidth="60"
|
|
Margin="0,4,0,0"
|
|
VerticalAlignment="Center">
|
|
<Label Margin="0,0,0,-4" Content="Value:" />
|
|
<TextBlock Margin="0" Text="{Binding ViewModel.FirstRatingValue, Mode=TwoWay}" />
|
|
</StackPanel>
|
|
<CheckBox
|
|
Grid.Column="2"
|
|
VerticalAlignment="Center"
|
|
Command="{Binding ViewModel.FirstRatingCheckboxCheckedCommand, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}"
|
|
CommandParameter="{Binding Mode=OneWay, RelativeSource={RelativeSource Mode=Self}}"
|
|
Content="Disable rating" />
|
|
</Grid>
|
|
</GroupBox>
|
|
|
|
<GroupBox Header="WPF UI rating with full stars only.">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<ui:RatingControl
|
|
HorizontalAlignment="Left"
|
|
Value="{Binding ViewModel.SecondRatingValue, Mode=TwoWay}"
|
|
HalfStarEnabled="False"
|
|
IsEnabled="{Binding ViewModel.IsSecondRatingEnabled, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}" />
|
|
<StackPanel
|
|
Grid.Column="1"
|
|
MinWidth="60"
|
|
Margin="0,4,0,0"
|
|
VerticalAlignment="Center">
|
|
<Label Margin="0,0,0,-4" Content="Value:" />
|
|
<TextBlock Margin="0" Text="{Binding ViewModel.SecondRatingValue, Mode=TwoWay}" />
|
|
</StackPanel>
|
|
<CheckBox
|
|
Grid.Column="2"
|
|
VerticalAlignment="Center"
|
|
Command="{Binding ViewModel.SecondRatingCheckboxCheckedCommand, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}"
|
|
CommandParameter="{Binding Mode=OneWay, RelativeSource={RelativeSource Mode=Self}}"
|
|
Content="Disable rating" />
|
|
</Grid>
|
|
</GroupBox>
|
|
<GroupBox Margin="0" Header="A simple slider.">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Slider
|
|
Width="200"
|
|
Margin="0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
Value="{Binding ViewModel.SimpleSliderValue, Mode=TwoWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}"
|
|
Maximum="100"
|
|
Minimum="0" />
|
|
<Grid Grid.Column="1">
|
|
<StackPanel VerticalAlignment="Center">
|
|
<TextBlock Text="Output:" />
|
|
<TextBlock Text="{Binding ViewModel.SimpleSliderValue, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Grid>
|
|
</GroupBox>
|
|
|
|
<GroupBox Header="A slider with steps and range specified.">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Slider
|
|
Width="200"
|
|
Margin="0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
Value="{Binding ViewModel.RangeSliderValue, Mode=TwoWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}"
|
|
IsSnapToTickEnabled="True"
|
|
Maximum="1000"
|
|
Minimum="500"
|
|
TickFrequency="20" />
|
|
<Grid Grid.Column="1">
|
|
<StackPanel VerticalAlignment="Center">
|
|
<TextBlock Text="Output:" />
|
|
<TextBlock Text="{Binding ViewModel.RangeSliderValue, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Grid>
|
|
</GroupBox>
|
|
|
|
<GroupBox Header="A slider with tick marks.">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Slider
|
|
Width="200"
|
|
Margin="0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
Value="{Binding ViewModel.MarksSliderValue, Mode=TwoWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}"
|
|
IsSnapToTickEnabled="True"
|
|
Maximum="100"
|
|
Minimum="0"
|
|
TickFrequency="20"
|
|
TickPlacement="Both" />
|
|
<Grid Grid.Column="1">
|
|
<StackPanel VerticalAlignment="Center">
|
|
<TextBlock Text="Output:" />
|
|
<TextBlock Text="{Binding ViewModel.MarksSliderValue, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Grid>
|
|
</GroupBox>
|
|
|
|
<GroupBox Header="A vertical slider with range and tick marks specified.">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Slider
|
|
Width="200"
|
|
Margin="0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
Value="{Binding ViewModel.VerticalSliderValue, Mode=TwoWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}"
|
|
IsSnapToTickEnabled="True"
|
|
Maximum="100"
|
|
Minimum="0"
|
|
Orientation="Vertical"
|
|
TickFrequency="20"
|
|
TickPlacement="Both" />
|
|
<Grid Grid.Column="1">
|
|
<StackPanel VerticalAlignment="Center">
|
|
<TextBlock Text="Output:" />
|
|
<TextBlock Text="{Binding ViewModel.VerticalSliderValue, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Grid>
|
|
</GroupBox>
|
|
<GroupBox Margin="0" Header="A SplitButton">
|
|
<ui:SplitButton Icon="{ui:SymbolIcon PaintBrush24}">
|
|
<ui:SplitButton.Flyout>
|
|
<ContextMenu>
|
|
<MenuItem>
|
|
<MenuItem.Header>
|
|
<Border
|
|
Width="35"
|
|
Height="20"
|
|
Background="Red"
|
|
CornerRadius="4" />
|
|
</MenuItem.Header>
|
|
</MenuItem>
|
|
<MenuItem>
|
|
<MenuItem.Header>
|
|
<Border
|
|
Width="35"
|
|
Height="20"
|
|
Background="Blue"
|
|
CornerRadius="4" />
|
|
</MenuItem.Header>
|
|
</MenuItem>
|
|
<MenuItem>
|
|
<MenuItem.Header>
|
|
<Border
|
|
Width="35"
|
|
Height="20"
|
|
Background="White"
|
|
CornerRadius="4" />
|
|
</MenuItem.Header>
|
|
</MenuItem>
|
|
</ContextMenu>
|
|
</ui:SplitButton.Flyout>
|
|
<Border
|
|
Width="35"
|
|
Height="20"
|
|
Background="Green"
|
|
CornerRadius="4" />
|
|
</ui:SplitButton>
|
|
</GroupBox>
|
|
|
|
<GroupBox Header="A SplitButton with modified paddings">
|
|
<ui:SplitButton CornerRadius="4" Padding="0">
|
|
<ui:SplitButton.Flyout>
|
|
<ContextMenu>
|
|
<MenuItem>
|
|
<MenuItem.Header>
|
|
<Border
|
|
Width="35"
|
|
Height="20"
|
|
Background="Red"
|
|
CornerRadius="4" />
|
|
</MenuItem.Header>
|
|
</MenuItem>
|
|
<MenuItem>
|
|
<MenuItem.Header>
|
|
<Border
|
|
Width="35"
|
|
Height="20"
|
|
Background="Blue"
|
|
CornerRadius="4" />
|
|
</MenuItem.Header>
|
|
</MenuItem>
|
|
<MenuItem>
|
|
<MenuItem.Header>
|
|
<Border
|
|
Width="35"
|
|
Height="20"
|
|
Background="White"
|
|
CornerRadius="4" />
|
|
</MenuItem.Header>
|
|
</MenuItem>
|
|
</ContextMenu>
|
|
</ui:SplitButton.Flyout>
|
|
<Border
|
|
Width="35"
|
|
Height="25"
|
|
Background="Green"
|
|
CornerRadius="4,0,0,4" />
|
|
</ui:SplitButton>
|
|
</GroupBox>
|
|
<GroupBox Margin="0" Header="WPF UI thumb rate.">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<ui:ThumbRate HorizontalAlignment="Left" State="{Binding ViewModel.ThumbRateState, Mode=TwoWay, RelativeSource={RelativeSource AncestorType={x:Type pages:BasicInputPage}, Mode=FindAncestor}}" />
|
|
<StackPanel
|
|
Grid.Column="1"
|
|
MinWidth="60"
|
|
VerticalAlignment="Center">
|
|
<Label Content="State:" />
|
|
<TextBlock Text="{Binding ViewModel.ThumRateStateText, Mode=OneWay}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</GroupBox>
|
|
|
|
</ui:StackPanel>
|
|
</Page> |