Removed item block display settings popup
This commit is contained in:
parent
da3759cd76
commit
f5dcdf0af9
|
@ -5,7 +5,7 @@ using System.Windows.Data;
|
|||
|
||||
namespace Filtration.Converters
|
||||
{
|
||||
internal class BooleanVisibilityConverter : IValueConverter
|
||||
internal class BooleanVisibilityConverterCopy : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
|
|
|
@ -5,7 +5,7 @@ using System.Windows.Data;
|
|||
|
||||
namespace Filtration.Converters
|
||||
{
|
||||
internal class BooleanVisibilityConverterCopy : IValueConverter
|
||||
internal class BooleanVisibilityConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
|
|
|
@ -136,12 +136,13 @@
|
|||
<Compile Include="Converters\BooleanInverterConverter.cs" />
|
||||
<Compile Include="Converters\BooleanToBlockActionInverseConverter.cs" />
|
||||
<Compile Include="Converters\BooleanToBlockActionConverter.cs" />
|
||||
<Compile Include="Converters\BooleanVisibilityConverter.cs" />
|
||||
<Compile Include="Converters\BooleanVisibilityConverterCopy.cs" />
|
||||
<Compile Include="Converters\BlockItemToRemoveEnabledVisibilityConverter.cs" />
|
||||
<Compile Include="Converters\ColorToSolidColorBrushConverter.cs" />
|
||||
<Compile Include="Converters\HashSignRemovalConverter.cs" />
|
||||
<Compile Include="Converters\ItemRarityConverter.cs" />
|
||||
<Compile Include="Converters\BooleanVisibilityConverter.cs" />
|
||||
<Compile Include="Converters\InverseBooleanVisibilityConverter.cs" />
|
||||
<Compile Include="Converters\StringToVisibilityConverter.cs" />
|
||||
<Compile Include="Converters\TreeViewMarginConverter.cs" />
|
||||
<Compile Include="Extensions\EnumerationExtension.cs" />
|
||||
|
@ -208,9 +209,6 @@
|
|||
<DependentUpon>BlockGroupBrowserView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\BlockTemplateSelector.cs" />
|
||||
<Compile Include="Views\ItemFilterBlockDisplaySettingsView.xaml.cs">
|
||||
<DependentUpon>ItemFilterBlockDisplaySettingsView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\ItemFilterScriptView.xaml.cs">
|
||||
<DependentUpon>ItemFilterScriptView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
@ -298,10 +296,6 @@
|
|||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\ItemFilterBlockDisplaySettingsView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\ToolPanes\BlockOutputPreviewView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
|
|
@ -50,7 +50,7 @@ using System.Windows;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("0.5.*")]
|
||||
[assembly: AssemblyVersion("0.6.*")]
|
||||
|
||||
[assembly: InternalsVisibleTo("Filtration.Tests")]
|
||||
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]
|
|
@ -8,6 +8,8 @@
|
|||
xmlns:blockItemTypes="clr-namespace:Filtration.ObjectModel.BlockItemTypes;assembly=Filtration.ObjectModel"
|
||||
xmlns:extensions="clr-namespace:Filtration.Extensions"
|
||||
xmlns:enums="clr-namespace:Filtration.ObjectModel.Enums;assembly=Filtration.ObjectModel"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
xmlns:views="clr-namespace:Filtration.Views"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=userControls:BlockItemControl}"
|
||||
d:DesignHeight="200" d:DesignWidth="150">
|
||||
|
@ -38,7 +40,7 @@
|
|||
<userControls:CrossButton Grid.Row="0" Height="12" HorizontalAlignment="Right" VerticalAlignment="Center" Command="{Binding RemoveItemCommand}" CommandParameter="{Binding BlockItem}" Visibility="{Binding RemoveEnabled}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
<ContentControl Grid.Row="1" Content="{Binding BlockItem}">
|
||||
<ContentControl Grid.Row="1" Content="{Binding BlockItem}" Name="BlockItemContentControl" Margin="3">
|
||||
<ContentControl.Resources>
|
||||
<!-- Action Template -->
|
||||
<DataTemplate DataType="{x:Type blockItemBaseTypes:ActionBlockItem}">
|
||||
|
@ -81,6 +83,29 @@
|
|||
<DataTemplate DataType="{x:Type blockItemTypes:SocketGroupBlockItem}">
|
||||
<userControls:EditableListBoxControl Margin="5,5,5,5" ItemsSource="{Binding Items}" />
|
||||
</DataTemplate>
|
||||
|
||||
<!-- Color Template -->
|
||||
<DataTemplate DataType="{x:Type blockItemBaseTypes:ColorBlockItem}">
|
||||
<xctk:ColorPicker SelectedColor="{Binding Color}" AvailableColors="{Binding ElementName=BlockItemContentControl, Path=DataContext.AvailableColors }" ShowAvailableColors="True" AvailableColorsHeader="Path of Exile Colors"/>
|
||||
</DataTemplate>
|
||||
|
||||
<!-- Font Size Template -->
|
||||
<DataTemplate DataType="{x:Type blockItemTypes:FontSizeBlockItem}">
|
||||
<WrapPanel HorizontalAlignment="Left">
|
||||
<xctk:ShortUpDown Value="{Binding Value}" Minimum="{Binding Minimum}" Maximum="{Binding Maximum}" Width="50" />
|
||||
</WrapPanel>
|
||||
</DataTemplate>
|
||||
|
||||
<!-- Sound Template -->
|
||||
<DataTemplate DataType="{x:Type blockItemTypes:SoundBlockItem}">
|
||||
<WrapPanel HorizontalAlignment="Left">
|
||||
<Button Command="{Binding Path=DataContext.PlaySoundCommand, RelativeSource={RelativeSource AncestorType={x:Type views:ItemFilterBlockView}}}" Width="20" Height="20" Background="Transparent" BorderBrush="Transparent">
|
||||
<Image Source="/Filtration;component/Resources/Icons/speaker_icon.png" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
</Button>
|
||||
<ComboBox ItemsSource="{Binding ElementName=BlockItemContentControl, Path=DataContext.SoundsAvailable}" SelectedValue="{Binding Value}" Style="{StaticResource MetroComboBox}" />
|
||||
<xctk:ShortUpDown Value="{Binding Path=SecondValue}" Minimum="1" Maximum="100" HorizontalAlignment="Right" ToolTip="Volume"/>
|
||||
</WrapPanel>
|
||||
</DataTemplate>
|
||||
</ContentControl.Resources>
|
||||
</ContentControl>
|
||||
</Grid>
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Windows;
|
||||
using Filtration.Annotations;
|
||||
using Filtration.ObjectModel;
|
||||
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||
using Filtration.Views;
|
||||
using GalaSoft.MvvmLight.CommandWpf;
|
||||
using Xceed.Wpf.Toolkit;
|
||||
|
||||
namespace Filtration.UserControls
|
||||
{
|
||||
|
@ -70,6 +74,25 @@ namespace Filtration.UserControls
|
|||
SetValue(RemoveEnabledProperty, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public ObservableCollection<ColorItem> AvailableColors
|
||||
{
|
||||
get
|
||||
{
|
||||
{
|
||||
return PathOfExileColors.DefaultColors;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<int> SoundsAvailable
|
||||
{
|
||||
get
|
||||
{
|
||||
return new List<int> { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
}
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ namespace Filtration.ViewModels
|
|||
|
||||
private bool _displaySettingsPopupOpen;
|
||||
private bool _isExpanded;
|
||||
private bool _audioVisualBlockItemsGridVisible;
|
||||
|
||||
public ItemFilterBlockViewModel(IStaticDataService staticDataService, IReplaceColorsViewModel replaceColorsViewModel)
|
||||
{
|
||||
|
@ -55,7 +56,7 @@ namespace Filtration.ViewModels
|
|||
ToggleBlockActionCommand = new RelayCommand(OnToggleBlockActionCommand);
|
||||
AddAudioVisualBlockItemCommand = new RelayCommand<Type>(OnAddAudioVisualBlockItemCommand);
|
||||
RemoveFilterBlockItemCommand = new RelayCommand<IItemFilterBlockItem>(OnRemoveFilterBlockItemCommand);
|
||||
RemoveAudioVisualBlockItemCommand = new RelayCommand<IItemFilterBlockItem>(OnRemoveAudioVisualBlockItemCommand);
|
||||
SwitchBlockItemsViewCommand = new RelayCommand(OnSwitchBlockItemsViewCommand);
|
||||
PlaySoundCommand = new RelayCommand(OnPlaySoundCommand, () => HasSound);
|
||||
}
|
||||
|
||||
|
@ -93,8 +94,8 @@ namespace Filtration.ViewModels
|
|||
public RelayCommand<Type> AddFilterBlockItemCommand { get; private set; }
|
||||
public RelayCommand<Type> AddAudioVisualBlockItemCommand { get; private set; }
|
||||
public RelayCommand<IItemFilterBlockItem> RemoveFilterBlockItemCommand { get; private set; }
|
||||
public RelayCommand<IItemFilterBlockItem> RemoveAudioVisualBlockItemCommand { get; private set; }
|
||||
public RelayCommand PlaySoundCommand { get; private set; }
|
||||
public RelayCommand SwitchBlockItemsViewCommand { get; private set; }
|
||||
|
||||
public ItemFilterBlock Block { get; private set; }
|
||||
|
||||
|
@ -120,6 +121,11 @@ namespace Filtration.ViewModels
|
|||
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 { return Block.BlockItems.Where(b => b is IAudioVisualBlockItem); }
|
||||
|
@ -133,6 +139,20 @@ namespace Filtration.ViewModels
|
|||
}
|
||||
}
|
||||
|
||||
public bool AudioVisualBlockItemsGridVisible
|
||||
{
|
||||
get { return _audioVisualBlockItemsGridVisible; }
|
||||
set
|
||||
{
|
||||
_audioVisualBlockItemsGridVisible = value;
|
||||
RaisePropertyChanged();
|
||||
if (value && IsExpanded == false)
|
||||
{
|
||||
IsExpanded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool DisplaySettingsPopupOpen
|
||||
{
|
||||
get { return _displaySettingsPopupOpen; }
|
||||
|
@ -153,25 +173,6 @@ namespace Filtration.ViewModels
|
|||
get { return _staticDataService.ItemBaseTypes; }
|
||||
}
|
||||
|
||||
public List<int> SoundsAvailable
|
||||
{
|
||||
get
|
||||
{
|
||||
return new List<int>
|
||||
{
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public List<Type> BlockItemTypesAvailable
|
||||
{
|
||||
get
|
||||
|
@ -293,7 +294,6 @@ namespace Filtration.ViewModels
|
|||
var fontSize = HasFontSize ? (BlockItems.OfType<FontSizeBlockItem>().First().Value / 1.8) : 19;
|
||||
|
||||
return fontSize;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -302,6 +302,11 @@ namespace Filtration.ViewModels
|
|||
get { return Block.HasBlockItemOfType<SoundBlockItem>(); }
|
||||
}
|
||||
|
||||
private void OnSwitchBlockItemsViewCommand()
|
||||
{
|
||||
AudioVisualBlockItemsGridVisible = !AudioVisualBlockItemsGridVisible;
|
||||
}
|
||||
|
||||
private void OnToggleBlockActionCommand()
|
||||
{
|
||||
var actionBlock = Block.BlockItems.OfType<ActionBlockItem>().First();
|
||||
|
@ -323,6 +328,13 @@ namespace Filtration.ViewModels
|
|||
private void OnRemoveFilterBlockItemCommand(IItemFilterBlockItem blockItem)
|
||||
{
|
||||
BlockItems.Remove(blockItem);
|
||||
|
||||
if (blockItem is IAudioVisualBlockItem)
|
||||
{
|
||||
blockItem.PropertyChanged -= OnAudioVisualBlockItemChanged;
|
||||
OnAudioVisualBlockItemChanged(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
IsDirty = true;
|
||||
}
|
||||
|
||||
|
@ -333,15 +345,7 @@ namespace Filtration.ViewModels
|
|||
|
||||
newBlockItem.PropertyChanged += OnAudioVisualBlockItemChanged;
|
||||
BlockItems.Add(newBlockItem);
|
||||
OnAudioVisualBlockItemChanged(null, null);
|
||||
IsDirty = true;
|
||||
}
|
||||
|
||||
private void OnRemoveAudioVisualBlockItemCommand(IItemFilterBlockItem blockItem)
|
||||
{
|
||||
blockItem.PropertyChanged -= OnAudioVisualBlockItemChanged;
|
||||
BlockItems.Remove(blockItem);
|
||||
OnAudioVisualBlockItemChanged(null, null);
|
||||
OnAudioVisualBlockItemChanged(this, EventArgs.Empty);
|
||||
IsDirty = true;
|
||||
}
|
||||
|
||||
|
@ -437,6 +441,7 @@ namespace Filtration.ViewModels
|
|||
|
||||
private void OnBlockItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
|
||||
{
|
||||
RaisePropertyChanged("RegularBlockItems");
|
||||
RaisePropertyChanged("SummaryBlockItems");
|
||||
RaisePropertyChanged("AudioVisualBlockItems");
|
||||
}
|
||||
|
|
|
@ -1,107 +0,0 @@
|
|||
<UserControl x:Class="Filtration.Views.ItemFilterBlockDisplaySettingsView"
|
||||
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:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
xmlns:userControls="clr-namespace:Filtration.UserControls"
|
||||
xmlns:viewModels="clr-namespace:Filtration.ViewModels"
|
||||
xmlns:blockItembaseTypes="clr-namespace:Filtration.ObjectModel.BlockItemBaseTypes;assembly=Filtration.ObjectModel"
|
||||
xmlns:componentModel="clr-namespace:System.ComponentModel;assembly=WindowsBase"
|
||||
xmlns:blockItemTypes="clr-namespace:Filtration.ObjectModel.BlockItemTypes;assembly=Filtration.ObjectModel"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=viewModels:ItemFilterBlockViewModel}"
|
||||
d:DesignHeight="120" d:DesignWidth="175">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="SharedResourcesDictionary.xaml" />
|
||||
<ResourceDictionary>
|
||||
<CollectionViewSource x:Key="AudioVisualBlockItemsViewSource" Source="{Binding AudioVisualBlockItems}">
|
||||
<CollectionViewSource.SortDescriptions>
|
||||
<componentModel:SortDescription PropertyName="SortOrder" />
|
||||
</CollectionViewSource.SortDescriptions>
|
||||
</CollectionViewSource>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<Border BorderThickness="2" CornerRadius="4" BorderBrush="Black" Padding="4" Background="White">
|
||||
<Grid Background="White" Name="SettingsGrid">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<ItemsControl ItemsSource="{Binding AudioVisualBlockItemTypesAvailable}" Grid.Row="0" Margin="0,0,0,5">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel></WrapPanel>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Margin="0,0,3,0">
|
||||
<Hyperlink Command="{Binding ElementName=SettingsGrid, Path=DataContext.AddAudioVisualBlockItemCommand}" CommandParameter="{Binding}">
|
||||
<TextBlock>+</TextBlock><TextBlock Text="{Binding Path=., Converter={StaticResource BlockItemTypeToStringConverter}}" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<ItemsControl Grid.Row="1" ItemsSource="{Binding Source={StaticResource AudioVisualBlockItemsViewSource}}" Grid.IsSharedSizeScope="True">
|
||||
<ItemsControl.Resources>
|
||||
<Style TargetType="{x:Type TextBlock}" x:Key="DisplayHeading">
|
||||
<Setter Property="Margin" Value="0,0,5,0" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
<DataTemplate DataType="{x:Type blockItembaseTypes:ColorBlockItem}">
|
||||
<Grid Margin="0,0,0,2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition SharedSizeGroup="AudioVisualBlockItemTitleColumn" Width="*" />
|
||||
<ColumnDefinition SharedSizeGroup="AudioVisualBlockItemValueColumn" Width="Auto" />
|
||||
<ColumnDefinition SharedSizeGroup="AudioVisualBlockItemCloseColumn" Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="{Binding DisplayHeading}" Style="{StaticResource DisplayHeading}" />
|
||||
<xctk:ColorPicker Grid.Column="1" SelectedColor="{Binding Color}" HorizontalAlignment="Right" Width="100" AvailableColors="{Binding ElementName=SettingsGrid, Path=DataContext.AvailableColors}" ShowAvailableColors="True" AvailableColorsHeader="Path of Exile Colors"/>
|
||||
<userControls:CrossButton Grid.Column="2" Height="12" Command="{Binding ElementName=SettingsGrid, Path=DataContext.RemoveAudioVisualBlockItemCommand}" CommandParameter="{Binding}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type blockItembaseTypes:IntegerBlockItem}">
|
||||
<Grid Margin="0,0,0,2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition SharedSizeGroup="AudioVisualBlockItemTitleColumn" Width="*" />
|
||||
<ColumnDefinition SharedSizeGroup="AudioVisualBlockItemValueColumn" Width="Auto" />
|
||||
<ColumnDefinition SharedSizeGroup="AudioVisualBlockItemCloseColumn" Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="{Binding DisplayHeading}" Style="{StaticResource DisplayHeading}" />
|
||||
<xctk:ShortUpDown Grid.Column="1" Value="{Binding Value}" Minimum="{Binding Minimum}" Maximum="{Binding Maximum}" Width="50" HorizontalAlignment="Right"/>
|
||||
<userControls:CrossButton Grid.Column="2" Height="12" Command="{Binding ElementName=SettingsGrid, Path=DataContext.RemoveAudioVisualBlockItemCommand}" CommandParameter="{Binding}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type blockItemTypes:SoundBlockItem}">
|
||||
<Grid Margin="0,0,0,2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition SharedSizeGroup="AudioVisualBlockItemTitleColumn" Width="*" />
|
||||
<ColumnDefinition SharedSizeGroup="AudioVisualBlockItemValueColumn" Width="Auto" />
|
||||
<ColumnDefinition SharedSizeGroup="AudioVisualBlockItemCloseColumn" Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="{Binding DisplayHeading}" Style="{StaticResource DisplayHeading}" />
|
||||
<WrapPanel Grid.Column="1" Grid.Row="0" HorizontalAlignment="Right">
|
||||
<Button Command="{Binding ElementName=SettingsGrid, Path=DataContext.PlaySoundCommand}" Width="20" Height="20" Background="Transparent" BorderBrush="Transparent">
|
||||
<Image Source="/Filtration;component/Resources/Icons/speaker_icon.png" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
</Button>
|
||||
<ComboBox ItemsSource="{Binding ElementName=SettingsGrid, Path=DataContext.SoundsAvailable}" SelectedValue="{Binding Value}" />
|
||||
<xctk:ShortUpDown Value="{Binding Path=SecondValue}" Minimum="1" Maximum="100" HorizontalAlignment="Right" ToolTip="Volume"/>
|
||||
</WrapPanel>
|
||||
<userControls:CrossButton Grid.Column="2" Grid.Row="0" Height="12" Command="{Binding ElementName=SettingsGrid, Path=DataContext.RemoveAudioVisualBlockItemCommand}" CommandParameter="{Binding}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
</Border>
|
||||
</UserControl>
|
|
@ -1,10 +0,0 @@
|
|||
namespace Filtration.Views
|
||||
{
|
||||
public partial class ItemFilterBlockDisplaySettingsView
|
||||
{
|
||||
public ItemFilterBlockDisplaySettingsView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -19,6 +19,24 @@
|
|||
<ResourceDictionary>
|
||||
<views:BindingProxy x:Key="proxy" Data="{Binding}" />
|
||||
<converters:BlockGroupAdvancedFillColorConverter x:Key="BlockGroupAdvancedFillColorConverter" />
|
||||
<Style TargetType="{x:Type ContentPresenter}" x:Key="BlockItemFadeInStyle">
|
||||
<Setter Property="LayoutTransform">
|
||||
<Setter.Value>
|
||||
<ScaleTransform x:Name="transform" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<EventTrigger RoutedEvent="Loaded">
|
||||
<EventTrigger.Actions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<DoubleAnimation Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.5" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</EventTrigger.Actions>
|
||||
</EventTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
|
@ -122,7 +140,7 @@
|
|||
<ToggleButton Margin="0,2,2,2"
|
||||
Style="{StaticResource ChromelessToggleButton}"
|
||||
x:Name="ItemPreviewButton"
|
||||
IsChecked="{Binding DisplaySettingsPopupOpen, Mode=OneWayToSource}"
|
||||
IsChecked="{Binding AudioVisualBlockItemsGridVisible}"
|
||||
ToolTip="Click here to change color and font settings" Cursor="Hand" >
|
||||
<userControls:ItemPreviewControl TextColor="{Binding DisplayTextColor}"
|
||||
BackgroundColor="{Binding DisplayBackgroundColor}"
|
||||
|
@ -130,90 +148,120 @@
|
|||
BlockFontSize="{Binding DisplayFontSize}" />
|
||||
</ToggleButton>
|
||||
</WrapPanel>
|
||||
|
||||
<!-- AudioVisual BlockItem Settings Popup -->
|
||||
<Popup Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
PlacementTarget="{Binding ElementName=ItemPreviewButton}"
|
||||
Placement="Left"
|
||||
PopupAnimation="Slide"
|
||||
StaysOpen="False"
|
||||
IsOpen="{Binding DisplaySettingsPopupOpen}"
|
||||
AllowsTransparency="True"
|
||||
HorizontalOffset="-5"
|
||||
Width="250">
|
||||
<views:ItemFilterBlockDisplaySettingsView />
|
||||
</Popup>
|
||||
</Grid>
|
||||
</Expander.Header>
|
||||
<Grid Margin="10,5,10,5" x:Name="BlockItemsGrid">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Add Block Item Links -->
|
||||
<ItemsControl ItemsSource="{Binding BlockItemTypesAvailable}" 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>
|
||||
<Grid Grid.Row="0" Visibility="{Binding AudioVisualBlockItemsGridVisible, Converter={StaticResource InverseBooleanVisibilityConverter}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="1" VerticalAlignment="Bottom" HorizontalAlignment="Right">
|
||||
<Hyperlink Command="{Binding SwitchBlockItemsViewCommand}">
|
||||
Switch to Appearance Block Items
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
|
||||
<!-- Block Items -->
|
||||
<WrapPanel Grid.Row="1" MaxHeight="200">
|
||||
<WrapPanel.Resources>
|
||||
<CollectionViewSource Source="{Binding BlockItems}" x:Key="BlockItemsCollectionViewSource">
|
||||
<CollectionViewSource.SortDescriptions>
|
||||
<componentModel:SortDescription PropertyName="SortOrder"/>
|
||||
</CollectionViewSource.SortDescriptions>
|
||||
</CollectionViewSource>
|
||||
</WrapPanel.Resources>
|
||||
<ItemsControl ItemsSource="{Binding Source={StaticResource BlockItemsCollectionViewSource}}">
|
||||
<!-- Add Block Item Links -->
|
||||
<ItemsControl ItemsSource="{Binding BlockItemTypesAvailable}" Grid.Row="0" Margin="0,0,0,10">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Vertical" />
|
||||
<WrapPanel></WrapPanel>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type ContentPresenter}">
|
||||
<Setter Property="LayoutTransform">
|
||||
<Setter.Value>
|
||||
<ScaleTransform x:Name="transform" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<EventTrigger RoutedEvent="Loaded">
|
||||
<EventTrigger.Actions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<DoubleAnimation Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.5" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</EventTrigger.Actions>
|
||||
</EventTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ItemsControl.ItemContainerStyle>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<userControls:BlockItemControl BlockItem="{Binding}" RemoveItemCommand="{Binding ElementName=TopLevelGrid, Path=DataContext.RemoveFilterBlockItemCommand}" RemoveEnabled="{Binding Path=., Converter={StaticResource BlockItemToRemoveEnabledVisibilityConverter}}" />
|
||||
<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>
|
||||
</WrapPanel>
|
||||
<Grid Grid.Row="2" Margin="0,5,0,5">
|
||||
|
||||
<!-- Block Items -->
|
||||
<WrapPanel 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="0" 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.AddAudioVisualBlockItemCommand}" CommandParameter="{Binding}">
|
||||
<TextBlock>+</TextBlock><TextBlock Text="{Binding Path=., Converter={StaticResource BlockItemTypeToStringConverter}}" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
<!-- Block Items -->
|
||||
<WrapPanel Grid.Row="1" MaxHeight="200">
|
||||
<WrapPanel.Resources>
|
||||
<CollectionViewSource Source="{Binding AudioVisualBlockItems}" 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}" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</WrapPanel>
|
||||
</Grid>
|
||||
<Grid Grid.Row="1" Margin="0,5,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
<converters:BooleanToBlockActionInverseConverter x:Key="BooleanToBlockActionInverseConverter" />
|
||||
<converters:BlockItemTypeToStringConverter x:Key="BlockItemTypeToStringConverter" />
|
||||
<converters:BooleanVisibilityConverter x:Key="BooleanVisibilityConverter" />
|
||||
<converters:InverseBooleanVisibilityConverter x:Key="InverseBooleanVisibilityConverter" />
|
||||
<converters:BlockItemToRemoveEnabledVisibilityConverter x:Key="BlockItemToRemoveEnabledVisibilityConverter" />
|
||||
</ResourceDictionary>
|
||||
<ResourceDictionary Source="ExpanderStyle.xaml" />
|
||||
|
|
Loading…
Reference in New Issue