1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Implemented most of layer grouping

This commit is contained in:
SpoinkyNL 2016-05-21 23:57:20 +02:00
parent 9a560d780d
commit 8adc6b1b9d
25 changed files with 279 additions and 161 deletions

View File

@ -313,7 +313,7 @@
<Compile Include="Models\Profiles\Properties\HeadsetPropertiesModel.cs" />
<Compile Include="Models\Profiles\Properties\KeyboardPropertiesModel.cs" />
<Compile Include="Models\Profiles\Properties\LayerPropertiesModel.cs" />
<Compile Include="Models\Profiles\Properties\GenericPropertiesModel.cs" />
<Compile Include="Models\Profiles\Properties\FolderPropertiesModel.cs" />
<Compile Include="Models\Profiles\Properties\MousePropertiesModel.cs" />
<Compile Include="Modules\Effects\AmbientLightning\AmbientLightningEffectModel.cs" />
<Compile Include="Modules\Effects\AmbientLightning\AmbientLightningEffectSettings.cs" />
@ -458,13 +458,14 @@
<Compile Include="Modules\Games\Dota2\Dota2ViewModel.cs" />
<Compile Include="Modules\Games\RocketLeague\RocketLeagueViewModel.cs" />
<Compile Include="Modules\Games\Witcher3\Witcher3ViewModel.cs" />
<Compile Include="ViewModels\LayerEditor\KeyboardPropertiesViewModel.cs" />
<Compile Include="ViewModels\LayerEditor\Properties\KeyboardPropertiesViewModel.cs" />
<Compile Include="ViewModels\LayerEditor\LayerConditionViewModel.cs" />
<Compile Include="ViewModels\LayerEditor\LayerDynamicPropertiesViewModel.cs" />
<Compile Include="ViewModels\LayerEditor\LayerEditorViewModel.cs" />
<Compile Include="ViewModels\LayerEditor\LayerPropertiesViewModel.cs" />
<Compile Include="ViewModels\LayerEditor\HeadsetPropertiesViewModel.cs" />
<Compile Include="ViewModels\LayerEditor\MousePropertiesViewModel.cs" />
<Compile Include="ViewModels\LayerEditor\Properties\LayerPropertiesViewModel.cs" />
<Compile Include="ViewModels\LayerEditor\Properties\HeadsetPropertiesViewModel.cs" />
<Compile Include="ViewModels\LayerEditor\Properties\FolderPropertiesViewModel.cs" />
<Compile Include="ViewModels\LayerEditor\Properties\MousePropertiesViewModel.cs" />
<Compile Include="ViewModels\OverlaysViewModel.cs" />
<Compile Include="Modules\Overlays\VolumeDisplay\VolumeDisplayViewModel.cs" />
<Compile Include="ViewModels\ProfileEditorViewModel.cs" />
@ -501,10 +502,13 @@
<Compile Include="Modules\Games\Witcher3\Witcher3View.xaml.cs">
<DependentUpon>Witcher3View.xaml</DependentUpon>
</Compile>
<Compile Include="Views\LayerEditor\HeadsetPropertiesView.xaml.cs">
<Compile Include="Views\LayerEditor\Properties\FolderPropertiesView.xaml.cs">
<DependentUpon>FolderPropertiesView.xaml</DependentUpon>
</Compile>
<Compile Include="Views\LayerEditor\Properties\HeadsetPropertiesView.xaml.cs">
<DependentUpon>HeadsetPropertiesView.xaml</DependentUpon>
</Compile>
<Compile Include="Views\LayerEditor\KeyboardPropertiesView.xaml.cs">
<Compile Include="Views\LayerEditor\Properties\KeyboardPropertiesView.xaml.cs">
<DependentUpon>KeyboardPropertiesView.xaml</DependentUpon>
</Compile>
<Compile Include="Views\LayerEditor\LayerConditionView.xaml.cs">
@ -516,7 +520,7 @@
<Compile Include="Views\LayerEditor\LayerEditorView.xaml.cs">
<DependentUpon>LayerEditorView.xaml</DependentUpon>
</Compile>
<Compile Include="Views\LayerEditor\MousePropertiesView.xaml.cs">
<Compile Include="Views\LayerEditor\Properties\MousePropertiesView.xaml.cs">
<DependentUpon>MousePropertiesView.xaml</DependentUpon>
</Compile>
<Compile Include="Views\OverlaysView.xaml.cs">
@ -686,11 +690,15 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\LayerEditor\HeadsetPropertiesView.xaml">
<Page Include="Views\LayerEditor\Properties\FolderPropertiesView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\LayerEditor\KeyboardPropertiesView.xaml">
<Page Include="Views\LayerEditor\Properties\HeadsetPropertiesView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\LayerEditor\Properties\KeyboardPropertiesView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
@ -706,7 +714,7 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Views\LayerEditor\MousePropertiesView.xaml">
<Page Include="Views\LayerEditor\Properties\MousePropertiesView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>

View File

@ -1,28 +1,26 @@
using System.Collections;
using System.Linq;
using System.Reflection;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Interactivity;
namespace Artemis.ItemBehaviours
{
/// <summary>
/// Steve Greatrex - http://stackoverflow.com/a/5118406/5015269
/// </summary>
public class BindableSelectedItemBehavior : Behavior<TreeView>
{
protected override void OnAttached()
{
base.OnAttached();
AssociatedObject.SelectedItemChanged += OnTreeViewSelectedItemChanged;
}
protected override void OnDetaching()
{
base.OnDetaching();
if (AssociatedObject != null)
{
AssociatedObject.SelectedItemChanged -= OnTreeViewSelectedItemChanged;
}
}
private void OnTreeViewSelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
@ -38,51 +36,55 @@ namespace Artemis.ItemBehaviours
set { SetValue(SelectedItemProperty, value); }
}
public static readonly DependencyProperty SelectedItemProperty = DependencyProperty.Register("SelectedItem",
typeof(object), typeof(BindableSelectedItemBehavior), new UIPropertyMetadata(null, OnSelectedItemChanged));
public static readonly DependencyProperty SelectedItemProperty =
DependencyProperty.Register("SelectedItem", typeof(object), typeof(BindableSelectedItemBehavior),
new UIPropertyMetadata(null, OnSelectedItemChanged));
private static void OnSelectedItemChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
{
var item = ((BindableSelectedItemBehavior) sender).AssociatedObject
.ItemContainerGenerator.ContainerFromItem(e.NewValue) as TreeViewItem;
if (item != null)
item.SetValue(TreeViewItem.IsSelectedProperty, true);
var behavior = sender as BindableSelectedItemBehavior;
var tree = behavior?.AssociatedObject;
if (tree == null) return;
if (e.NewValue == null)
foreach (var item in tree.Items.OfType<TreeViewItem>())
item.SetValue(TreeViewItem.IsSelectedProperty, false);
var treeViewItem = e.NewValue as TreeViewItem;
if (treeViewItem != null)
treeViewItem.SetValue(TreeViewItem.IsSelectedProperty, true);
else
ClearTreeViewSelection(((BindableSelectedItemBehavior) sender).AssociatedObject);
}
/// <summary>
/// Clears a TreeView's selected item recursively
/// Tom Wright - http://stackoverflow.com/a/1406116/5015269
/// </summary>
/// <param name="tv"></param>
public static void ClearTreeViewSelection(TreeView tv)
{
if (tv != null)
ClearTreeViewItemsControlSelection(tv.Items, tv.ItemContainerGenerator);
}
/// <summary>
/// Clears a TreeView's selected item recursively
/// Tom Wright - http://stackoverflow.com/a/1406116/5015269
/// </summary>
/// <param name="ic"></param>
/// <param name="icg"></param>
private static void ClearTreeViewItemsControlSelection(ICollection ic, ItemContainerGenerator icg)
{
if ((ic == null) || (icg == null))
return;
for (var i = 0; i < ic.Count; i++)
{
var tvi = icg.ContainerFromIndex(i) as TreeViewItem;
if (tvi == null)
continue;
ClearTreeViewItemsControlSelection(tvi.Items, tvi.ItemContainerGenerator);
tvi.IsSelected = false;
var itemsHostProperty = tree.GetType()
.GetProperty("ItemsHost", BindingFlags.NonPublic | BindingFlags.Instance);
var itemsHost = itemsHostProperty?.GetValue(tree, null) as Panel;
if (itemsHost == null) return;
foreach (var item in itemsHost.Children.OfType<TreeViewItem>())
{
if (WalkTreeViewItem(item, e.NewValue))
break;
}
}
}
public static bool WalkTreeViewItem(TreeViewItem treeViewItem, object selectedValue)
{
if (treeViewItem.DataContext == selectedValue)
{
treeViewItem.SetValue(TreeViewItem.IsSelectedProperty, true);
treeViewItem.Focus();
return true;
}
var itemsHostProperty = treeViewItem.GetType()
.GetProperty("ItemsHost", BindingFlags.NonPublic | BindingFlags.Instance);
var itemsHost = itemsHostProperty?.GetValue(treeViewItem, null) as Panel;
if (itemsHost == null) return false;
foreach (var item in itemsHost.Children.OfType<TreeViewItem>())
{
if (WalkTreeViewItem(item, selectedValue))
break;
}
return false;
}
#endregion
}
}

View File

@ -1,4 +1,5 @@
using System.ComponentModel;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Windows.Media;
using System.Xml.Serialization;
@ -20,6 +21,7 @@ namespace Artemis.Models.Profiles
public string Name { get; set; }
public LayerType LayerType { get; set; }
public bool Enabled { get; set; }
public bool Expanded { get; set; }
public int Order { get; set; }
public LayerPropertiesModel Properties { get; set; }
public ChildItemCollection<LayerModel, LayerModel> Children { get; }
@ -167,7 +169,7 @@ namespace Artemis.Models.Profiles
selectedLayer.Order = newOrder;
}
private void FixOrder()
public void FixOrder()
{
Children.Sort(l => l.Order);
for (var i = 0; i < Children.Count; i++)
@ -183,6 +185,18 @@ namespace Artemis.Models.Profiles
return Enabled && (LayerType == LayerType.Keyboard || LayerType == LayerType.KeyboardGif);
}
public IEnumerable<LayerModel> GetAllLayers()
{
var layers = new List<LayerModel>();
foreach (var layerModel in Children)
{
layers.Add(layerModel);
layers.AddRange(layerModel.Children);
}
return layers;
}
#region IChildItem<Parent> Members
LayerModel IChildItem<LayerModel>.Parent

View File

@ -1,4 +1,5 @@
using System.Drawing;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Windows;
using System.Windows.Media;
@ -28,7 +29,7 @@ namespace Artemis.Models.Profiles
[XmlIgnore]
public DrawingVisual DrawingVisual { get; set; }
protected bool Equals(ProfileModel other)
{
return string.Equals(Name, other.Name) &&
@ -100,6 +101,34 @@ namespace Artemis.Models.Profiles
if (target == null)
return;
if (target.LayerType == LayerType.Folder)
{
if (selectedLayer.Parent == null)
selectedLayer.Profile.Layers.Remove(selectedLayer);
else
selectedLayer.Parent.Children.Remove(selectedLayer);
target.Children.Add(selectedLayer);
if (moveUp)
{
var parentTarget = target.Children.OrderBy(c => c.Order).LastOrDefault();
if (parentTarget != null)
selectedLayer.Order = parentTarget.Order + 1;
else
selectedLayer.Order = 1;
}
else
{
var parentTarget = target.Children.OrderBy(c => c.Order).LastOrDefault();
if (parentTarget != null)
selectedLayer.Order = parentTarget.Order - 1;
else
selectedLayer.Order = 1;
}
target.FixOrder();
}
target.Order = selectedLayer.Order;
selectedLayer.Order = newOrder;
}
@ -111,7 +140,8 @@ namespace Artemis.Models.Profiles
Layers[i].Order = i;
}
public Bitmap GenerateBitmap<T>(Rect keyboardRect, IGameDataModel gameDataModel, bool preview, bool updateAnimations)
public Bitmap GenerateBitmap<T>(Rect keyboardRect, IGameDataModel gameDataModel, bool preview,
bool updateAnimations)
{
Bitmap bitmap = null;
DrawingVisual.Dispatcher.Invoke(() =>
@ -149,5 +179,20 @@ namespace Artemis.Models.Profiles
return result;
}
/// <summary>
/// Gives all the layers and their children in a flat list
/// </summary>
public List<LayerModel> GetAllLayers()
{
var layers = new List<LayerModel>();
foreach (var layerModel in Layers)
{
layers.Add(layerModel);
layers.AddRange(layerModel.GetAllLayers());
}
return layers;
}
}
}

View File

@ -3,7 +3,7 @@ using Artemis.Utilities;
namespace Artemis.Models.Profiles.Properties
{
public class GenericPropertiesModel : LayerPropertiesModel
public class FolderPropertiesModel : LayerPropertiesModel
{
public override LayerPropertiesModel GetAppliedProperties(IGameDataModel dataModel)
{

View File

@ -12,7 +12,7 @@ namespace Artemis.Models.Profiles.Properties
[XmlInclude(typeof(KeyboardPropertiesModel))]
[XmlInclude(typeof(MousePropertiesModel))]
[XmlInclude(typeof(HeadsetPropertiesModel))]
[XmlInclude(typeof(GenericPropertiesModel))]
[XmlInclude(typeof(FolderPropertiesModel))]
public abstract class LayerPropertiesModel
{
protected LayerPropertiesModel()

View File

@ -6,6 +6,7 @@ using Artemis.Models.Profiles;
using Artemis.Models.Profiles.Properties;
using Artemis.Services;
using Artemis.Utilities;
using Artemis.ViewModels.LayerEditor.Properties;
using Caliburn.Micro;
using Ninject;
@ -127,6 +128,13 @@ namespace Artemis.ViewModels.LayerEditor
if (model != null)
model.IsGif = LayerType == LayerType.KeyboardGif;
// If the layer was a folder, but isn't anymore, assign it's children to it's parent.
if (LayerType != LayerType.Folder && LayerPropertiesViewModel is FolderPropertiesViewModel)
{
foreach (var child in Layer.Children)
child.Parent = Layer.Parent;
}
// Apply the proper PropertiesViewModel
if ((LayerType == LayerType.Keyboard || LayerType == LayerType.KeyboardGif) &&
!(LayerPropertiesViewModel is KeyboardPropertiesViewModel))
@ -140,6 +148,8 @@ namespace Artemis.ViewModels.LayerEditor
LayerPropertiesViewModel = new MousePropertiesViewModel(_gameDataModel, Layer.Properties);
else if (LayerType == LayerType.Headset && !(LayerPropertiesViewModel is HeadsetPropertiesViewModel))
LayerPropertiesViewModel = new HeadsetPropertiesViewModel(_gameDataModel, Layer.Properties);
else if (LayerType == LayerType.Folder && !(LayerPropertiesViewModel is FolderPropertiesViewModel))
LayerPropertiesViewModel = new FolderPropertiesViewModel(_gameDataModel, Layer.Properties);
NotifyOfPropertyChange(() => LayerPropertiesViewModel);
}

View File

@ -0,0 +1,33 @@
using Artemis.Models.Interfaces;
using Artemis.Models.Profiles.Properties;
using Artemis.Utilities;
namespace Artemis.ViewModels.LayerEditor.Properties
{
public class FolderPropertiesViewModel : LayerPropertiesViewModel
{
private LayerPropertiesModel _proposedProperties;
public FolderPropertiesViewModel(IGameDataModel gameDataModel, LayerPropertiesModel properties)
: base(gameDataModel)
{
ProposedProperties = GeneralHelpers.Clone(properties);
}
public LayerPropertiesModel ProposedProperties
{
get { return _proposedProperties; }
set
{
if (Equals(value, _proposedProperties)) return;
_proposedProperties = value;
NotifyOfPropertyChange(() => ProposedProperties);
}
}
public override LayerPropertiesModel GetAppliedProperties()
{
return GeneralHelpers.Clone(ProposedProperties);
}
}
}

View File

@ -2,7 +2,7 @@
using Artemis.Models.Profiles.Properties;
using Artemis.Utilities;
namespace Artemis.ViewModels.LayerEditor
namespace Artemis.ViewModels.LayerEditor.Properties
{
public class HeadsetPropertiesViewModel : LayerPropertiesViewModel
{

View File

@ -1,11 +1,10 @@
using System.Windows.Forms;
using Artemis.Models.Interfaces;
using Artemis.Models.Profiles;
using Artemis.Models.Profiles.Properties;
using Artemis.Utilities;
using Caliburn.Micro;
namespace Artemis.ViewModels.LayerEditor
namespace Artemis.ViewModels.LayerEditor.Properties
{
public class KeyboardPropertiesViewModel : LayerPropertiesViewModel
{

View File

@ -2,7 +2,7 @@
using Artemis.Models.Profiles.Properties;
using Caliburn.Micro;
namespace Artemis.ViewModels.LayerEditor
namespace Artemis.ViewModels.LayerEditor.Properties
{
public abstract class LayerPropertiesViewModel : PropertyChangedBase
{

View File

@ -2,7 +2,7 @@
using Artemis.Models.Profiles.Properties;
using Artemis.Utilities;
namespace Artemis.ViewModels.LayerEditor
namespace Artemis.ViewModels.LayerEditor.Properties
{
public class MousePropertiesViewModel : LayerPropertiesViewModel
{

View File

@ -119,7 +119,7 @@ namespace Artemis.ViewModels
Layers.Clear();
if (_selectedProfile != null)
Layers.AddRange(_selectedProfile.Layers);
Layers.AddRange(SelectedProfile.Layers);
NotifyOfPropertyChange(() => SelectedProfile);
NotifyOfPropertyChange(() => CanAddLayer);
@ -142,8 +142,8 @@ namespace Artemis.ViewModels
public PreviewSettings? PreviewSettings => ActiveKeyboard?.PreviewSettings;
public bool CanAddLayer => _selectedProfile != null;
public bool CanRemoveLayer => _selectedProfile != null && _selectedLayer != null;
public bool CanAddLayer => SelectedProfile != null;
public bool CanRemoveLayer => SelectedProfile != null && _selectedLayer != null;
private KeyboardProvider ActiveKeyboard { get; set; }
@ -312,7 +312,10 @@ namespace Artemis.ViewModels
else
SelectedLayer.Profile.Reorder(SelectedLayer, true);
NotifyOfPropertyChange(() => Layers);
// Update the UI
Layers.Clear();
if (SelectedProfile != null)
Layers.AddRange(SelectedProfile.Layers);
SelectedLayer = reorderLayer;
}
@ -331,7 +334,10 @@ namespace Artemis.ViewModels
else
SelectedLayer.Profile.Reorder(SelectedLayer, false);
NotifyOfPropertyChange(() => Layers);
// Update the UI
Layers.Clear();
if (SelectedProfile != null)
Layers.AddRange(SelectedProfile.Layers);
SelectedLayer = reorderLayer;
}
@ -363,7 +369,7 @@ namespace Artemis.ViewModels
var x = pos.X/((double) ActiveKeyboard.PreviewSettings.Width/ActiveKeyboard.Width);
var y = pos.Y/((double) ActiveKeyboard.PreviewSettings.Height/ActiveKeyboard.Height);
var hoverLayer = SelectedProfile.Layers
var hoverLayer = SelectedProfile.GetAllLayers()
.OrderBy(l => l.Order)
.Where(l => l.MustDraw())
.FirstOrDefault(l => ((KeyboardPropertiesModel) l.Properties)
@ -385,7 +391,7 @@ namespace Artemis.ViewModels
var pos = e.GetPosition((Image) e.OriginalSource);
var x = pos.X/((double) ActiveKeyboard.PreviewSettings.Width/ActiveKeyboard.Width);
var y = pos.Y/((double) ActiveKeyboard.PreviewSettings.Height/ActiveKeyboard.Height);
var hoverLayer = SelectedProfile.Layers.OrderBy(l => l.Order).Where(l => l.MustDraw())
var hoverLayer = SelectedProfile.GetAllLayers().OrderBy(l => l.Order).Where(l => l.MustDraw())
.FirstOrDefault(l => ((KeyboardPropertiesModel) l.Properties).GetRect(1).Contains(x, y));
HandleDragging(e, x, y, hoverLayer);
@ -435,7 +441,13 @@ namespace Artemis.ViewModels
drawingContext.DrawRectangle(new SolidColorBrush(Color.FromArgb(0, 0, 0, 0)), null, keyboardRect);
// Draw the layers
foreach (var layer in _selectedProfile.Layers.OrderByDescending(l => l.Order).Where(l => l.MustDraw()))
var drawLayers = SelectedProfile.GetAllLayers()
.OrderByDescending(l => l.Order)
.Where(l => l.Enabled &&
(l.LayerType == LayerType.Keyboard ||
l.LayerType == LayerType.KeyboardGif ||
l.LayerType == LayerType.Folder));
foreach (var layer in drawLayers)
layer.Draw<object>(null, drawingContext, true, false);
// Get the selection color

View File

@ -1,28 +0,0 @@
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 Artemis.Views.LayerEditor
{
/// <summary>
/// Interaction logic for HeadsetPropertiesView.xaml
/// </summary>
public partial class HeadsetPropertiesView : UserControl
{
public HeadsetPropertiesView()
{
InitializeComponent();
}
}
}

View File

@ -1,28 +0,0 @@
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 Artemis.Views.LayerEditor
{
/// <summary>
/// Interaction logic for KeyboardPropertiesView.xaml
/// </summary>
public partial class KeyboardPropertiesView : UserControl
{
public KeyboardPropertiesView()
{
InitializeComponent();
}
}
}

View File

@ -1,28 +0,0 @@
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 Artemis.Views.LayerEditor
{
/// <summary>
/// Interaction logic for MousePropertiesView.xaml
/// </summary>
public partial class MousePropertiesView : UserControl
{
public MousePropertiesView()
{
InitializeComponent();
}
}
}

View File

@ -0,0 +1,14 @@
<UserControl x:Class="Artemis.Views.LayerEditor.Properties.FolderPropertiesView"
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="300" d:DesignWidth="300">
<Grid>
<TextBlock Margin="10,2,10,10" FontSize="13.333"
Foreground="{DynamicResource HighlightBrush}"
Text="Note: A folder allows you to organise layers. Layers within a folder are only drawn if both the layer's and the folder's conditions are met."
VerticalAlignment="Top" Height="Auto" TextWrapping="Wrap" />
</Grid>
</UserControl>

View File

@ -0,0 +1,15 @@
using System.Windows.Controls;
namespace Artemis.Views.LayerEditor.Properties
{
/// <summary>
/// Interaction logic for FolderPropertiesView.xaml
/// </summary>
public partial class FolderPropertiesView : UserControl
{
public FolderPropertiesView()
{
InitializeComponent();
}
}
}

View File

@ -1,4 +1,4 @@
<UserControl x:Class="Artemis.Views.LayerEditor.HeadsetPropertiesView"
<UserControl x:Class="Artemis.Views.LayerEditor.Properties.HeadsetPropertiesView"
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"

View File

@ -0,0 +1,15 @@
using System.Windows.Controls;
namespace Artemis.Views.LayerEditor.Properties
{
/// <summary>
/// Interaction logic for HeadsetPropertiesView.xaml
/// </summary>
public partial class HeadsetPropertiesView : UserControl
{
public HeadsetPropertiesView()
{
InitializeComponent();
}
}
}

View File

@ -1,4 +1,4 @@
<UserControl x:Class="Artemis.Views.LayerEditor.KeyboardPropertiesView"
<UserControl x:Class="Artemis.Views.LayerEditor.Properties.KeyboardPropertiesView"
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"

View File

@ -0,0 +1,15 @@
using System.Windows.Controls;
namespace Artemis.Views.LayerEditor.Properties
{
/// <summary>
/// Interaction logic for KeyboardPropertiesView.xaml
/// </summary>
public partial class KeyboardPropertiesView : UserControl
{
public KeyboardPropertiesView()
{
InitializeComponent();
}
}
}

View File

@ -1,4 +1,4 @@
<UserControl x:Class="Artemis.Views.LayerEditor.MousePropertiesView"
<UserControl x:Class="Artemis.Views.LayerEditor.Properties.MousePropertiesView"
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"

View File

@ -0,0 +1,15 @@
using System.Windows.Controls;
namespace Artemis.Views.LayerEditor.Properties
{
/// <summary>
/// Interaction logic for MousePropertiesView.xaml
/// </summary>
public partial class MousePropertiesView : UserControl
{
public MousePropertiesView()
{
InitializeComponent();
}
}
}

View File

@ -91,6 +91,11 @@
</StackPanel>
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
<TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource {x:Type TreeViewItem}}">
<Setter Property="IsExpanded" Value="{Binding Path=Expanded, Mode=TwoWay}" />
</Style>
</TreeView.ItemContainerStyle>
</TreeView>
</Border>
<Grid Grid.Column="1" Grid.Row="2" Margin="10,5,0,0">