mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
168 lines
8.7 KiB
XML
168 lines
8.7 KiB
XML
<UserControl x:Class="Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings.DataBindingView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
xmlns:dd="urn:gong-wpf-dragdrop"
|
|
xmlns:s="https://github.com/canton7/Stylet"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="450" d:DesignWidth="800">
|
|
<UserControl.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="pack://application:,,,/Artemis.UI;component/ResourceDictionaries/DisplayConditions.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
</ResourceDictionary>
|
|
</UserControl.Resources>
|
|
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
|
<Grid Margin="10 0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="0.75*" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid Margin="0 5 5 0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="48" />
|
|
<RowDefinition Height="48" />
|
|
<RowDefinition Height="48" />
|
|
<RowDefinition Height="48" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<StackPanel Grid.Row="0" Margin="-3 0 0 0">
|
|
<Label FontSize="10" Foreground="{StaticResource MaterialDesignNavigationItemSubheader}" Margin="0 0 0 2">Source</Label>
|
|
<ContentControl s:View.Model="{Binding TargetSelectionViewModel}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" IsTabStop="False" />
|
|
</StackPanel>
|
|
|
|
<ComboBox Grid.Row="1"
|
|
Style="{StaticResource MaterialDesignFloatingHintComboBox}"
|
|
materialDesign:HintAssist.Hint="Data binding mode"
|
|
MinWidth="128"
|
|
SelectedValue="{Binding SelectedDataBindingMode}" ItemsSource="{Binding DataBindingModes}" SelectedValuePath="Value" DisplayMemberPath="Description" >
|
|
</ComboBox>
|
|
|
|
<StackPanel Grid.Row="2">
|
|
<TextBox Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
|
Text="{Binding EasingTime}"
|
|
materialDesign:TextFieldAssist.HasClearButton="True"
|
|
materialDesign:TextFieldAssist.SuffixText="ms"
|
|
materialDesign:HintAssist.Hint="Easing time"
|
|
IsEnabled="{Binding IsDataBindingEnabled}" />
|
|
</StackPanel>
|
|
|
|
<ComboBox Grid.Row="3"
|
|
Style="{StaticResource MaterialDesignFloatingHintComboBox}"
|
|
materialDesign:HintAssist.Hint="Easing type"
|
|
MinWidth="128"
|
|
IsEnabled="{Binding IsEasingTimeEnabled}"
|
|
SelectedItem="{Binding SelectedEasingViewModel}"
|
|
ItemsSource="{Binding EasingViewModels}">
|
|
<ComboBox.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<VirtualizingStackPanel />
|
|
</ItemsPanelTemplate>
|
|
</ComboBox.ItemsPanel>
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Polyline Stroke="{DynamicResource MaterialDesignBody}"
|
|
StrokeThickness="1"
|
|
Points="{Binding EasingPoints}"
|
|
Stretch="Uniform"
|
|
Width="14"
|
|
Height="14"
|
|
Margin="0 0 10 0" />
|
|
<TextBlock Text="{Binding Description}" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
|
|
<materialDesign:Card Grid.Row="4" Grid.ColumnSpan="2" Margin="0 5 0 0">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Grid.Row="0" Margin="10 10 4 0">
|
|
Test result
|
|
</TextBlock>
|
|
<Separator Grid.Row="1" Style="{StaticResource MaterialDesignLightSeparator}" Margin="0" />
|
|
<Grid Grid.Row="2" Margin="10 4 10 10">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Margin="0 2">Input</TextBlock>
|
|
<TextBlock Grid.Row="0" Grid.Column="1" Margin="0 2" FontFamily="Consolas" Text="{Binding TestInputValue}" />
|
|
|
|
<TextBlock Grid.Row="1" Grid.Column="0" Margin="0 2">Output</TextBlock>
|
|
<TextBlock Grid.Row="1" Grid.Column="1" Margin="0 2" FontFamily="Consolas" Text="{Binding TestResultValue}" />
|
|
</Grid>
|
|
</Grid>
|
|
</materialDesign:Card>
|
|
</Grid>
|
|
|
|
<Grid Grid.Column="1">
|
|
<Grid Margin="5 26 0 0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Button Style="{StaticResource MaterialDesignFlatMidBgButton}"
|
|
HorizontalAlignment="Left"
|
|
FontSize="12"
|
|
Padding="6 4"
|
|
Height="22"
|
|
IsEnabled="{Binding CanAddModifier}"
|
|
Command="{s:Action AddModifier}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<materialDesign:PackIcon Margin="0 -1 4 0" Kind="Plus" />
|
|
<TextBlock>
|
|
Add modifier
|
|
</TextBlock>
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
<CheckBox Grid.Row="0"
|
|
Grid.Column="1"
|
|
Style="{StaticResource MaterialDesignCheckBox}"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Top"
|
|
IsChecked="{Binding IsDataBindingEnabled}">
|
|
Enable data binding
|
|
</CheckBox>
|
|
|
|
<ListBox Grid.Row="1"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="2"
|
|
ItemsSource="{Binding ModifierViewModels}"
|
|
materialDesign:RippleAssist.IsDisabled="True"
|
|
dd:DragDrop.IsDragSource="True"
|
|
dd:DragDrop.IsDropTarget="True"
|
|
dd:DragDrop.UseDefaultDragAdorner="True"
|
|
dd:DragDrop.DropHandler="{Binding}"
|
|
HorizontalContentAlignment="Stretch">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<ContentControl s:View.Model="{Binding}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" IsTabStop="False" />
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
</ScrollViewer>
|
|
</UserControl> |