Profile editor - Finished most of the refactor except databindings

This commit is contained in:
SpoinkyNL committed 2020-09-14 01:24:07 +02:00
1 parent 7fff1a593f
commit fea454ad12
56 files changed
+866 -459

No files matched your search

@@ -20,6 +20,9 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.Tree
PropertyInputViewModel = _profileEditorService.CreatePropertyInputViewModel(LayerProperty);
_profileEditorService.SelectedDataBindingChanged += ProfileEditorServiceOnSelectedDataBindingChanged;
LayerProperty.VisibilityChanged += LayerPropertyOnVisibilityChanged;
LayerPropertyViewModel.IsVisible = !LayerProperty.IsHidden;
}
public LayerProperty<T> LayerProperty { get; }
@@ -51,6 +54,7 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.Tree
{
_propertyInputViewModel?.Dispose();
_profileEditorService.SelectedDataBindingChanged -= ProfileEditorServiceOnSelectedDataBindingChanged;
LayerProperty.VisibilityChanged -= LayerPropertyOnVisibilityChanged;
}
#endregion
@@ -83,6 +87,11 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.Tree
NotifyOfPropertyChange(nameof(DataBindingsOpen));
}
private void LayerPropertyOnVisibilityChanged(object? sender, LayerPropertyEventArgs<T> e)
{
LayerPropertyViewModel.IsVisible = !LayerProperty.IsHidden;
}
#endregion
}