mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
96 lines
5.0 KiB
XML
96 lines
5.0 KiB
XML
<UserControl x:Class="Artemis.UI.Screens.ProfileEditor.Conditions.DataModelConditionListView"
|
|
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:s="https://github.com/canton7/Stylet"
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
xmlns:local="clr-namespace:Artemis.UI.Screens.ProfileEditor.Conditions"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="450" d:DesignWidth="800"
|
|
d:DataContext="{d:DesignInstance Type=local:DataModelConditionListViewModel, IsDesignTimeCreatable=False}">
|
|
<UserControl.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="pack://application:,,,/Artemis.UI;component/ResourceDictionaries/DataModelConditions.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
</ResourceDictionary>
|
|
</UserControl.Resources>
|
|
<Grid Margin="0 3">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Button Grid.Row="0"
|
|
Grid.Column="0"
|
|
ToolTip="Delete the list predicate and all its children"
|
|
Style="{StaticResource MaterialDesignIconForegroundButton}"
|
|
HorizontalAlignment="Left"
|
|
Foreground="#E74C4C"
|
|
Width="25"
|
|
Height="25"
|
|
Command="{s:Action Delete}">
|
|
<materialDesign:PackIcon Kind="Close" Width="18" Height="18" />
|
|
</Button>
|
|
|
|
<!-- Left side, the list this predicate is targeting -->
|
|
<ContentControl Grid.Row="0"
|
|
Grid.Column="1"
|
|
s:View.Model="{Binding TargetSelectionViewModel}"
|
|
VerticalContentAlignment="Stretch"
|
|
HorizontalContentAlignment="Stretch"
|
|
IsTabStop="False" />
|
|
|
|
<!-- Operator -->
|
|
<Button Grid.Row="0"
|
|
Grid.Column="2"
|
|
Style="{StaticResource DataModelConditionButtonLeftClickMenu}"
|
|
Background="#7B7B7B"
|
|
BorderBrush="#7B7B7B"
|
|
Content="{Binding SelectedListOperator}"
|
|
Click="PropertyButton_OnClick"
|
|
HorizontalAlignment="Left"
|
|
ToolTip="Change the list operator, determining how the list contents should match">
|
|
<Button.ContextMenu>
|
|
<ContextMenu>
|
|
<MenuItem Header="Any"
|
|
Command="{s:Action SelectListOperator}"
|
|
CommandParameter="Any"
|
|
ToolTip="Any of the list items should evaluate to true"/>
|
|
<MenuItem Header="All"
|
|
Command="{s:Action SelectListOperator}"
|
|
CommandParameter="All"
|
|
ToolTip="All of the list items should evaluate to true"/>
|
|
<MenuItem Header="None"
|
|
Command="{s:Action SelectListOperator}"
|
|
CommandParameter="None"
|
|
ToolTip="None of the list items should evaluate to true"/>
|
|
<MenuItem Header="Count (NYI)"
|
|
Command="{s:Action SelectListOperator}"
|
|
CommandParameter="Count"
|
|
IsEnabled="False"
|
|
ToolTip="A specific amount of the list items should evaluate to true"/>
|
|
</ContextMenu>
|
|
</Button.ContextMenu>
|
|
</Button>
|
|
|
|
<ItemsControl Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" ItemsSource="{Binding Items}" Margin="0 4 0 0">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<materialDesign:TransitioningContent>
|
|
<materialDesign:TransitioningContent.OpeningEffects>
|
|
<materialDesign:TransitionEffect Kind="FadeIn" />
|
|
<materialDesign:TransitionEffect Kind="SlideInFromLeft" />
|
|
</materialDesign:TransitioningContent.OpeningEffects>
|
|
<ContentControl s:View.Model="{Binding}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" IsTabStop="False" />
|
|
</materialDesign:TransitioningContent>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</Grid>
|
|
</UserControl> |