* Bumped version to 1.1.0-beta3
* Fixed Switch to Appearance/Regular Block Items text overlapping block item controls * Added Enable/Disable toggle button to Appearance block items control * Added horizontal scrollbar to block items view * Moved Enable/Disable toggle button to separate user control(previously it was only visible when viewing Regular block items) * Added DesignTimeItemFilterBlockViewModel
This commit is contained in:
parent
f840fb69ad
commit
30e76e333c
@ -238,12 +238,16 @@
|
||||
<Compile Include="UserControls\EditableListBoxControl.xaml.cs">
|
||||
<DependentUpon>EditableListBoxControl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\EnableDisableToggleButton.xaml.cs">
|
||||
<DependentUpon>EnableDisableToggleButton.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\ItemPreviewControl.xaml.cs">
|
||||
<DependentUpon>ItemPreviewControl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\ThemeComponentSelectionControl.xaml.cs">
|
||||
<DependentUpon>ThemeComponentSelectionControl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ViewModels\DesignTime\DesignTimeItemFilterBlockViewModel.cs" />
|
||||
<Compile Include="ViewModels\DesignTime\DesignTimeSettingsPageViewModel.cs" />
|
||||
<Compile Include="Views\AttachedProperties\SelectedItemsAttachedProperty.cs" />
|
||||
<Compile Include="Utility\RoutedCommandHandler.cs" />
|
||||
@ -282,6 +286,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UserControls\EnableDisableToggleButton.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UserControls\ThemeComponentSelectionControl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
@ -12,6 +12,10 @@
|
||||
<releaseNotes>* All open filter scripts are now remembered on exit and reopened when the application is started rather than just the last opened one (#95)
|
||||
* Filter sections are once again now expanded by default when scripts are opened, unless the new "Auto-expand all sections when opening scripts" setting is disabled
|
||||
* A new Clear Styles button has been added which removes all styles from the selected block (#96)
|
||||
* The Enable/Disable Block toggle button is now visible on both the Regular Block Items and Appearance Block Items views
|
||||
* When there are too many block items to fit horizontally in a block a horizontal scrollbar will now appear
|
||||
* Fixed the application freezing for a long period of time when Ctrl+A (Select All) is performed
|
||||
* Fixed the Switch to Appearance/Regular Block Items text overlapping block items
|
||||
* Fixed theme saving (blank theme files were being saved) (#83)
|
||||
* Fixed checkboxes in Block Group Browser (#97)
|
||||
* Fixed the Select Path of Exile data directory dialog appearing after every upgrade (#94)
|
||||
|
@ -11,7 +11,7 @@ using System.Runtime.CompilerServices;
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
[assembly: AssemblyVersion("1.1.0")]
|
||||
[assembly: AssemblyInformationalVersion("1.1.0-beta2")]
|
||||
[assembly: AssemblyInformationalVersion("1.1.0-beta3")]
|
||||
|
||||
[assembly: InternalsVisibleTo("Filtration.Tests")]
|
||||
[assembly: InternalsVisibleTo("Filtration.ItemFilterPreview.Tests")]
|
||||
|
30
Filtration/UserControls/EnableDisableToggleButton.xaml
Normal file
30
Filtration/UserControls/EnableDisableToggleButton.xaml
Normal file
@ -0,0 +1,30 @@
|
||||
<UserControl x:Class="Filtration.UserControls.EnableDisableToggleButton"
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<ToggleButton Style="{StaticResource ChromelessToggleButton}"
|
||||
IsChecked="{Binding BlockEnabled}"
|
||||
Margin="0,0,5,0"
|
||||
ToolTip="Enable/Disable Block"
|
||||
Cursor="Hand"
|
||||
Width="25"
|
||||
Height="25">
|
||||
<Image RenderOptions.BitmapScalingMode="HighQuality">
|
||||
<Image.Style>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding BlockEnabled}" Value="true">
|
||||
<Setter Property="Source" Value="/Filtration;component/Resources/Icons/standby_enabled_icon.png"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding BlockEnabled}" Value="false">
|
||||
<Setter Property="Source" Value="/Filtration;component/Resources/Icons/standby_disabled_icon.png"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Image.Style>
|
||||
</Image>
|
||||
</ToggleButton>
|
||||
</UserControl>
|
28
Filtration/UserControls/EnableDisableToggleButton.xaml.cs
Normal file
28
Filtration/UserControls/EnableDisableToggleButton.xaml.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Filtration.UserControls
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for EnableDisableToggleButton.xaml
|
||||
/// </summary>
|
||||
public partial class EnableDisableToggleButton : UserControl
|
||||
{
|
||||
public EnableDisableToggleButton()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,158 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Windows.Media;
|
||||
using Filtration.ObjectModel;
|
||||
using Filtration.ObjectModel.BlockItemTypes;
|
||||
using Filtration.ObjectModel.Commands;
|
||||
using Filtration.ObjectModel.Enums;
|
||||
using GalaSoft.MvvmLight.CommandWpf;
|
||||
using Xceed.Wpf.Toolkit;
|
||||
|
||||
namespace Filtration.ViewModels.DesignTime
|
||||
{
|
||||
internal class FakeCommandManager : ICommandManagerInternal {
|
||||
public void ExecuteCommand(ICommand command)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Undo(int undoLevels = 1)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Redo(int redoLevels = 1)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void SetScript(IItemFilterScriptInternal layout)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
internal class DesignTimeItemFilterBlockViewModel : IItemFilterBlockViewModel
|
||||
{
|
||||
private ItemFilterBlock itemFilterBlock;
|
||||
|
||||
public DesignTimeItemFilterBlockViewModel()
|
||||
{
|
||||
itemFilterBlock = new ItemFilterBlock(new ItemFilterScript(new FakeCommandManager()))
|
||||
{
|
||||
Action = BlockAction.Show,
|
||||
Enabled = true
|
||||
};
|
||||
|
||||
itemFilterBlock.BlockItems.Add(new RarityBlockItem(FilterPredicateOperator.Equal, ItemRarity.Rare));
|
||||
itemFilterBlock.BlockItems.Add(new DropLevelBlockItem(FilterPredicateOperator.GreaterThan, 23));
|
||||
itemFilterBlock.BlockItems.Add(new BaseTypeBlockItem());
|
||||
itemFilterBlock.BlockItems.Add(new BaseTypeBlockItem());
|
||||
itemFilterBlock.BlockItems.Add(new BaseTypeBlockItem());
|
||||
}
|
||||
|
||||
public void Initialise(IItemFilterBlockBase itemFilterBlock, IItemFilterScriptViewModel itemFilterScriptViewModel)
|
||||
{
|
||||
//throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public IItemFilterBlockBase BaseBlock { get; }
|
||||
public bool IsDirty { get; set; }
|
||||
public bool IsVisible { get; set; }
|
||||
public event EventHandler BlockBecameDirty;
|
||||
|
||||
public bool IsExpanded
|
||||
{
|
||||
get => true;
|
||||
set { }
|
||||
}
|
||||
|
||||
public IItemFilterBlock Block => itemFilterBlock;
|
||||
|
||||
public bool BlockEnabled
|
||||
{
|
||||
get => true;
|
||||
set { }
|
||||
}
|
||||
|
||||
public string BlockDescription { get; set; }
|
||||
public RelayCommand CopyBlockStyleCommand { get; }
|
||||
public RelayCommand PasteBlockStyleCommand { get; }
|
||||
public RelayCommand ToggleBlockActionCommand { get; }
|
||||
public RelayCommand ReplaceColorsCommand { get; }
|
||||
public RelayCommand<Type> AddFilterBlockItemCommand { get; }
|
||||
public RelayCommand<IItemFilterBlockItem> RemoveFilterBlockItemCommand { get; }
|
||||
public RelayCommand PlaySoundCommand { get; }
|
||||
public RelayCommand PlayPositionalSoundCommand { get; }
|
||||
public RelayCommand SwitchBlockItemsViewCommand { get; }
|
||||
public RelayCommand CustomSoundFileDialogCommand { get; }
|
||||
public RelayCommand PlayCustomSoundCommand { get; }
|
||||
public RelayCommand AddBlockGroupCommand { get; }
|
||||
public RelayCommand DeleteBlockGroupCommand { get; }
|
||||
public ObservableCollection<ItemFilterBlockGroup> BlockGroups { get; }
|
||||
public ObservableCollection<string> BlockGroupSuggestions { get; }
|
||||
public string BlockGroupSearch { get; set; }
|
||||
public ObservableCollection<IItemFilterBlockItem> BlockItems => Block.BlockItems;
|
||||
|
||||
public IEnumerable<IItemFilterBlockItem> SummaryBlockItems
|
||||
{
|
||||
get { return Block.BlockItems.Where(b => !(b is IAudioVisualBlockItem)); }
|
||||
}
|
||||
|
||||
public IEnumerable<IItemFilterBlockItem> RegularBlockItems
|
||||
{
|
||||
get { return Block.BlockItems.Where(b => !(b is IAudioVisualBlockItem)); }
|
||||
}
|
||||
|
||||
public IEnumerable<IItemFilterBlockItem> AudioVisualBlockItems { get; }
|
||||
public bool AdvancedBlockGroup { get; }
|
||||
public bool AudioVisualBlockItemsGridVisible { get; set; }
|
||||
public bool DisplaySettingsPopupOpen { get; set; }
|
||||
public IEnumerable<string> AutoCompleteItemClasses { get; }
|
||||
public IEnumerable<string> AutoCompleteItemBaseTypes { get; }
|
||||
public IEnumerable<string> AutocompleteItemMods { get; }
|
||||
public List<Type> BlockItemTypesAvailable => new List<Type>
|
||||
{
|
||||
typeof (ItemLevelBlockItem),
|
||||
typeof (DropLevelBlockItem),
|
||||
typeof (QualityBlockItem),
|
||||
typeof (RarityBlockItem),
|
||||
typeof (SocketsBlockItem),
|
||||
typeof (LinkedSocketsBlockItem),
|
||||
typeof (WidthBlockItem),
|
||||
typeof (HeightBlockItem),
|
||||
typeof (SocketGroupBlockItem),
|
||||
typeof (ClassBlockItem),
|
||||
typeof (BaseTypeBlockItem),
|
||||
typeof (IdentifiedBlockItem),
|
||||
typeof (CorruptedBlockItem),
|
||||
typeof (ElderItemBlockItem),
|
||||
typeof (ShaperItemBlockItem),
|
||||
typeof (MapTierBlockItem),
|
||||
typeof (ShapedMapBlockItem),
|
||||
typeof (ElderMapBlockItem),
|
||||
typeof (GemLevelBlockItem),
|
||||
typeof (StackSizeBlockItem),
|
||||
typeof (HasExplicitModBlockItem)
|
||||
};
|
||||
public List<Type> AudioVisualBlockItemTypesAvailable { get; }
|
||||
public ObservableCollection<ColorItem> AvailableColors { get; }
|
||||
public Color DisplayTextColor => Colors.Red;
|
||||
public Color DisplayBackgroundColor => Colors.White;
|
||||
public Color DisplayBorderColor => Colors.GreenYellow;
|
||||
public double DisplayFontSize => 20;
|
||||
public int DisplayIconSize { get; }
|
||||
public int DisplayIconColor { get; }
|
||||
public int DisplayIconShape { get; }
|
||||
public Color DisplayEffectColor { get; }
|
||||
public bool HasSound { get; }
|
||||
public bool HasPositionalSound { get; }
|
||||
public bool HasCustomSound { get; }
|
||||
public bool HasAudioVisualBlockItems { get; }
|
||||
public void RefreshBlockPreview()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
@ -25,6 +25,47 @@ namespace Filtration.ViewModels
|
||||
IItemFilterBlock Block { get; }
|
||||
bool BlockEnabled { get; set; }
|
||||
string BlockDescription { get; set; }
|
||||
RelayCommand CopyBlockStyleCommand { get; }
|
||||
RelayCommand PasteBlockStyleCommand { get; }
|
||||
RelayCommand ToggleBlockActionCommand { get; }
|
||||
RelayCommand ReplaceColorsCommand { get; }
|
||||
RelayCommand<Type> AddFilterBlockItemCommand { get; }
|
||||
RelayCommand<IItemFilterBlockItem> RemoveFilterBlockItemCommand { get; }
|
||||
RelayCommand PlaySoundCommand { get; }
|
||||
RelayCommand PlayPositionalSoundCommand { get; }
|
||||
RelayCommand SwitchBlockItemsViewCommand { get; }
|
||||
RelayCommand CustomSoundFileDialogCommand { get; }
|
||||
RelayCommand PlayCustomSoundCommand { get; }
|
||||
RelayCommand AddBlockGroupCommand { get; }
|
||||
RelayCommand DeleteBlockGroupCommand { get; }
|
||||
ObservableCollection<ItemFilterBlockGroup> BlockGroups { get; }
|
||||
ObservableCollection<string> BlockGroupSuggestions { get; }
|
||||
string BlockGroupSearch { get; set; }
|
||||
ObservableCollection<IItemFilterBlockItem> BlockItems { get; }
|
||||
IEnumerable<IItemFilterBlockItem> SummaryBlockItems { get; }
|
||||
IEnumerable<IItemFilterBlockItem> RegularBlockItems { get; }
|
||||
IEnumerable<IItemFilterBlockItem> AudioVisualBlockItems { get; }
|
||||
bool AdvancedBlockGroup { get; }
|
||||
bool AudioVisualBlockItemsGridVisible { get; set; }
|
||||
bool DisplaySettingsPopupOpen { get; set; }
|
||||
IEnumerable<string> AutoCompleteItemClasses { get; }
|
||||
IEnumerable<string> AutoCompleteItemBaseTypes { get; }
|
||||
IEnumerable<string> AutocompleteItemMods { get; }
|
||||
List<Type> BlockItemTypesAvailable { get; }
|
||||
List<Type> AudioVisualBlockItemTypesAvailable { get; }
|
||||
ObservableCollection<ColorItem> AvailableColors { get; }
|
||||
Color DisplayTextColor { get; }
|
||||
Color DisplayBackgroundColor { get; }
|
||||
Color DisplayBorderColor { get; }
|
||||
double DisplayFontSize { get; }
|
||||
int DisplayIconSize { get; }
|
||||
int DisplayIconColor { get; }
|
||||
int DisplayIconShape { get; }
|
||||
Color DisplayEffectColor { get; }
|
||||
bool HasSound { get; }
|
||||
bool HasPositionalSound { get; }
|
||||
bool HasCustomSound { get; }
|
||||
bool HasAudioVisualBlockItems { get; }
|
||||
void RefreshBlockPreview();
|
||||
}
|
||||
|
||||
|
@ -3,19 +3,17 @@
|
||||
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:viewModels="clr-namespace:Filtration.ViewModels"
|
||||
xmlns:userControls="clr-namespace:Filtration.UserControls"
|
||||
xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
|
||||
xmlns:views="clr-namespace:Filtration.Views"
|
||||
xmlns:converters="clr-namespace:Filtration.Converters"
|
||||
xmlns:blockItemBaseTypes="clr-namespace:Filtration.ObjectModel.BlockItemBaseTypes;assembly=Filtration.ObjectModel"
|
||||
xmlns:componentModel="clr-namespace:System.ComponentModel;assembly=WindowsBase"
|
||||
xmlns:designTime="clr-namespace:Filtration.ViewModels.DesignTime"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=viewModels:ItemFilterBlockViewModel}"
|
||||
d:DesignHeight="200" d:DesignWidth="800">
|
||||
d:DataContext="{d:DesignInstance Type=designTime:DesignTimeItemFilterBlockViewModel, IsDesignTimeCreatable=True}"
|
||||
d:DesignHeight="400" d:DesignWidth="817">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary>
|
||||
<views:BindingProxy x:Key="Proxy" Data="{Binding}" />
|
||||
<converters:BlockGroupAdvancedFillColorConverter x:Key="BlockGroupAdvancedFillColorConverter" />
|
||||
@ -39,8 +37,6 @@
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<Grid x:Name="TopLevelGrid">
|
||||
<Grid x:Name="DisabledBlockOverlay" IsHitTestVisible="False" Panel.ZIndex="1000" Visibility="{Binding BlockEnabled, Converter={StaticResource InverseBooleanVisibilityConverter}}">
|
||||
@ -99,7 +95,7 @@
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- BlockItems Summary Panel -->
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" VerticalAlignment="Center">
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Margin="0,5">
|
||||
<StackPanel.Resources>
|
||||
<CollectionViewSource Source="{Binding SummaryBlockItems}" x:Key="SummaryBlockItemsCollectionViewSource">
|
||||
<CollectionViewSource.SortDescriptions>
|
||||
@ -199,9 +195,9 @@
|
||||
</Expander.Header>
|
||||
<Grid Margin="10,5,10,5" x:Name="BlockItemsGrid">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<WrapPanel Grid.Row="0">
|
||||
@ -241,23 +237,77 @@
|
||||
ToolTip="Add" Background="Transparent" BorderThickness="0" Margin="3,0,0,0" />
|
||||
</WrapPanel>
|
||||
|
||||
<!-- Regular Block Items-->
|
||||
<Grid Grid.Row="1" Visibility="{Binding AudioVisualBlockItemsGridVisible, Converter={StaticResource InverseBooleanVisibilityConverter}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Row="1" VerticalAlignment="Bottom" HorizontalAlignment="Right">
|
||||
<Hyperlink Command="{Binding SwitchBlockItemsViewCommand}">
|
||||
Switch to Appearance Block Items
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
|
||||
<!-- Add Block Item Links -->
|
||||
<ItemsControl Grid.Column="0" ItemsSource="{Binding BlockItemTypesAvailable}" Grid.Row="0" Margin="0,0,0,10">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Margin="0,0,3,0">
|
||||
<Hyperlink Command="{Binding ElementName=TopLevelGrid, Path=DataContext.AddFilterBlockItemCommand}" CommandParameter="{Binding}">
|
||||
<TextBlock>+</TextBlock><TextBlock Text="{Binding Path=., Converter={StaticResource BlockItemTypeToStringConverter}}" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
<!-- Enable/Disable Block Button -->
|
||||
<userControls:EnableDisableToggleButton Grid.Row="0" Grid.Column="1" VerticalAlignment="Top" />
|
||||
|
||||
<!-- Block Items -->
|
||||
<Grid Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" MaxHeight="200">
|
||||
<Grid.Resources>
|
||||
<CollectionViewSource Source="{Binding RegularBlockItems}" x:Key="BlockItemsCollectionViewSource">
|
||||
<CollectionViewSource.SortDescriptions>
|
||||
<componentModel:SortDescription PropertyName="SortOrder"/>
|
||||
</CollectionViewSource.SortDescriptions>
|
||||
</CollectionViewSource>
|
||||
</Grid.Resources>
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled">
|
||||
<ItemsControl ItemsSource="{Binding Source={StaticResource BlockItemsCollectionViewSource}}"
|
||||
ItemContainerStyle="{StaticResource BlockItemFadeInStyle}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Vertical" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<userControls:BlockItemControl BlockItem="{Binding}" RemoveItemCommand="{Binding ElementName=TopLevelGrid, Path=DataContext.RemoveFilterBlockItemCommand}" RemoveEnabled="{Binding Path=., Converter={StaticResource BlockItemToRemoveEnabledVisibilityConverter}}" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<!-- Audio/Visual Block Items-->
|
||||
<Grid Grid.Row="1" Visibility="{Binding AudioVisualBlockItemsGridVisible, Converter={StaticResource BooleanVisibilityConverter}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Add AudioVisual Block Item Links -->
|
||||
<ItemsControl Grid.Column="0" ItemsSource="{Binding AudioVisualBlockItemTypesAvailable}" Grid.Row="0" Margin="0,0,0,10">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel></WrapPanel>
|
||||
@ -275,94 +325,20 @@
|
||||
</ItemsControl>
|
||||
|
||||
<!-- Enable/Disable Block Button -->
|
||||
<ToggleButton Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Style="{StaticResource ChromelessToggleButton}"
|
||||
IsChecked="{Binding BlockEnabled}"
|
||||
Margin="0,0,5,0"
|
||||
ToolTip="Enable/Disable Block"
|
||||
Cursor="Hand"
|
||||
Width="25"
|
||||
Height="25">
|
||||
<Image RenderOptions.BitmapScalingMode="HighQuality">
|
||||
<Image.Style>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding BlockEnabled}" Value="true">
|
||||
<Setter Property="Source" Value="/Filtration;component/Resources/Icons/standby_enabled_icon.png"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding BlockEnabled}" Value="false">
|
||||
<Setter Property="Source" Value="/Filtration;component/Resources/Icons/standby_disabled_icon.png"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Image.Style>
|
||||
</Image>
|
||||
</ToggleButton>
|
||||
<userControls:EnableDisableToggleButton Grid.Row="0" Grid.Column="1" VerticalAlignment="Top" />
|
||||
|
||||
<TextBlock Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" FontStyle="Italic" HorizontalAlignment="Left" Visibility="{Binding HasAudioVisualBlockItems, Converter={StaticResource InverseBooleanVisibilityConverter}}">To change the appearance of this block, add a Text, Background or Border Block Item above.</TextBlock>
|
||||
|
||||
<!-- Block Items -->
|
||||
<WrapPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" MaxHeight="200">
|
||||
<WrapPanel.Resources>
|
||||
<CollectionViewSource Source="{Binding RegularBlockItems}" x:Key="BlockItemsCollectionViewSource">
|
||||
<CollectionViewSource.SortDescriptions>
|
||||
<componentModel:SortDescription PropertyName="SortOrder"/>
|
||||
</CollectionViewSource.SortDescriptions>
|
||||
</CollectionViewSource>
|
||||
</WrapPanel.Resources>
|
||||
<ItemsControl ItemsSource="{Binding Source={StaticResource BlockItemsCollectionViewSource}}"
|
||||
ItemContainerStyle="{StaticResource BlockItemFadeInStyle}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Vertical" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<userControls:BlockItemControl BlockItem="{Binding}" RemoveItemCommand="{Binding ElementName=TopLevelGrid, Path=DataContext.RemoveFilterBlockItemCommand}" RemoveEnabled="{Binding Path=., Converter={StaticResource BlockItemToRemoveEnabledVisibilityConverter}}" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</WrapPanel>
|
||||
</Grid>
|
||||
<Grid Grid.Row="1" Visibility="{Binding AudioVisualBlockItemsGridVisible, Converter={StaticResource BooleanVisibilityConverter}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="1" VerticalAlignment="Bottom" HorizontalAlignment="Right">
|
||||
<Hyperlink Command="{Binding SwitchBlockItemsViewCommand}">
|
||||
Switch to Regular Block Items
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
<!-- Add AudioVisual Block Item Links -->
|
||||
<ItemsControl ItemsSource="{Binding AudioVisualBlockItemTypesAvailable}" Grid.Row="0" Margin="0,0,0,10">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel></WrapPanel>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Margin="0,0,3,0">
|
||||
<Hyperlink Command="{Binding ElementName=TopLevelGrid, Path=DataContext.AddFilterBlockItemCommand}" CommandParameter="{Binding}">
|
||||
<TextBlock>+</TextBlock><TextBlock Text="{Binding Path=., Converter={StaticResource BlockItemTypeToStringConverter}}" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
<TextBlock Grid.Row="1" FontStyle="Italic" HorizontalAlignment="Left" Visibility="{Binding HasAudioVisualBlockItems, Converter={StaticResource InverseBooleanVisibilityConverter}}">To change the appearance of this block, add a Text, Background or Border Block Item above.</TextBlock>
|
||||
|
||||
<!-- Block Items -->
|
||||
<WrapPanel Grid.Row="1" MaxHeight="200">
|
||||
<WrapPanel.Resources>
|
||||
<Grid Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" MaxHeight="200">
|
||||
<Grid.Resources>
|
||||
<CollectionViewSource Source="{Binding AudioVisualBlockItems}" x:Key="BlockItemsCollectionViewSource">
|
||||
<CollectionViewSource.SortDescriptions>
|
||||
<componentModel:SortDescription PropertyName="SortOrder"/>
|
||||
</CollectionViewSource.SortDescriptions>
|
||||
</CollectionViewSource>
|
||||
</WrapPanel.Resources>
|
||||
</Grid.Resources>
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled">
|
||||
<ItemsControl ItemsSource="{Binding Source={StaticResource BlockItemsCollectionViewSource}}"
|
||||
ItemContainerStyle="{StaticResource BlockItemFadeInStyle}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
@ -376,15 +352,29 @@
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</WrapPanel>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid Grid.Row="2" Margin="0,5,0,5">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Margin="0,0,5,0" Text="Description:" VerticalAlignment="Center" />
|
||||
<TextBox Grid.Column="1" Text="{Binding BlockDescription}" />
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0,0,0,8">
|
||||
<Hyperlink Command="{Binding SwitchBlockItemsViewCommand}">
|
||||
<Grid>
|
||||
<TextBlock Text="Switch to Regular Block Items" Visibility="{Binding AudioVisualBlockItemsGridVisible, Converter={StaticResource BooleanVisibilityConverter}}" />
|
||||
<TextBlock Text="Switch to Appearance Block Items" Visibility="{Binding AudioVisualBlockItemsGridVisible, Converter={StaticResource InverseBooleanVisibilityConverter}}" />
|
||||
</Grid>
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Margin="0,0,5,0" Text="Description:" VerticalAlignment="Center" />
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding BlockDescription}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Expander>
|
||||
|
Loading…
x
Reference in New Issue
Block a user