81 lines
4.7 KiB
XML
81 lines
4.7 KiB
XML
<UserControl x:Class="ClassicAssist.UI.Views.Agents.ScavengerTabControl"
|
|
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:local="clr-namespace:ClassicAssist.UI.Views.Agents"
|
|
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
|
xmlns:agents="clr-namespace:ClassicAssist.Shared.UI.ViewModels.Agents;assembly=ClassicAssist.Shared"
|
|
xmlns:valueConverters="clr-namespace:ClassicAssist.UI.Misc.ValueConverters"
|
|
xmlns:controls="clr-namespace:ClassicAssist.UI.Controls"
|
|
mc:Ignorable="d"
|
|
d:DesignWidth="493" d:DesignHeight="400">
|
|
<d:DesignerProperties.DesignStyle>
|
|
<Style TargetType="UserControl">
|
|
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" />
|
|
</Style>
|
|
</d:DesignerProperties.DesignStyle>
|
|
<UserControl.DataContext>
|
|
<agents:ScavengerTabViewModel />
|
|
</UserControl.DataContext>
|
|
<UserControl.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="../../../Resources/DarkTheme.xaml" />
|
|
<ResourceDictionary Source="../../../Resources/ResourceDictionary.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
</ResourceDictionary>
|
|
</UserControl.Resources>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.Resources>
|
|
<valueConverters:CellWidthValueConverter x:Key="CellWidthValueConverter" />
|
|
</Grid.Resources>
|
|
<StackPanel Grid.Column="0" Margin="10,10,0,10">
|
|
<StackPanel.Resources>
|
|
<Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
|
|
<Setter Property="Margin" Value="0,5,0,0" />
|
|
<Setter Property="Padding" Value="20,0,20,0" />
|
|
</Style>
|
|
</StackPanel.Resources>
|
|
<CheckBox Content="{x:Static resources:Strings.Enabled}" IsChecked="{Binding Enabled}" />
|
|
<Button Content="{x:Static resources:Strings.Insert}" Command="{Binding InsertCommand}" />
|
|
<Button Content="{x:Static resources:Strings.Remove}" Command="{Binding RemoveCommand}"
|
|
CommandParameter="{Binding SelectedItem, ElementName=ListView}" />
|
|
<Button Content="{x:Static resources:Strings.Clear_All}" Command="{Binding ClearAllCommand}" />
|
|
<Button Content="{x:Static resources:Strings.Set_Container}" Command="{Binding SetContainerCommand}" />
|
|
</StackPanel>
|
|
<ListView x:Name="ListView" Grid.Column="1" Margin="10"
|
|
ItemsSource="{Binding Items, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
SelectedItem="{Binding SelectedItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
Foreground="Black">
|
|
<ListView.View>
|
|
<GridView>
|
|
<GridViewColumn Header="✓">
|
|
<GridViewColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<CheckBox IsChecked="{Binding Enabled}" />
|
|
</DataTemplate>
|
|
</GridViewColumn.CellTemplate>
|
|
</GridViewColumn>
|
|
<GridViewColumn Header="{x:Static resources:Strings.Name}" DisplayMemberBinding="{Binding Name}"
|
|
Width="150" />
|
|
<GridViewColumn Header="{x:Static resources:Strings.Graphic}"
|
|
DisplayMemberBinding="{Binding Graphic, StringFormat=0x\{0:x\}}" Width="75" />
|
|
<GridViewColumn Header="{x:Static resources:Strings.Color}" Width="75" x:Name="HueColumn">
|
|
<GridViewColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<controls:EditTextBlock Text="{Binding Hue}" TabIndex="0"
|
|
Width="{Binding Width, ConverterParameter=15, Converter={StaticResource CellWidthValueConverter}, ElementName=HueColumn}"
|
|
ShowIcon="True" />
|
|
</DataTemplate>
|
|
</GridViewColumn.CellTemplate>
|
|
</GridViewColumn>
|
|
</GridView>
|
|
</ListView.View>
|
|
</ListView>
|
|
</Grid>
|
|
</UserControl> |