Data bindings - Added the option for different data binding modes

This commit is contained in:
Robert committed 2020-09-15 17:31:23 +02:00
1 parent d025405ca7
commit 46175c2d6b
32 files changed
+940 -497

No files matched your search

@@ -1,4 +1,5 @@
using System;
using System.ComponentModel;
using System.Linq;
using Artemis.Core;
using Artemis.UI.Shared;
@@ -58,7 +59,7 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.Tree
}
#endregion
private void ApplyKeyframesEnabled(bool enable)
{
// If enabling keyframes for the first time, add a keyframe with the current value at the current position
@@ -95,8 +96,9 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.Tree
#endregion
}
public interface ITreePropertyViewModel : IScreen, IDisposable
public interface ITreePropertyViewModel : IScreen, INotifyPropertyChanged, IDisposable
{
bool HasPropertyInputViewModel { get; }
bool DataBindingsOpen { get; set; }
}
}
@@ -95,6 +95,11 @@
<Style TargetType="TreeViewItem" BasedOn="{StaticResource PropertyTreeStyle}">
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
<Setter Property="Visibility" Value="{Binding IsVisible, Converter={x:Static s:BoolToVisibilityConverter.Instance}, Mode=OneWay}" />
<Style.Triggers>
<DataTrigger Binding="{Binding TreePropertyViewModel.DataBindingsOpen}" Value="True">
<Setter Property="Background" Value="{DynamicResource MaterialDesignPaper}" />
</DataTrigger>
</Style.Triggers>
</Style>
</TreeView.ItemContainerStyle>
<TreeView.Resources>