mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Data bindings - WIP commit
Layer/effect config dialogs - Don't require specific ctor parameter names
This commit is contained in:
1 parent
0d0ba7bd7d
commit
3bb4e86f65
15 files changed
+408
-130
No files matched your search
+7
-2
@@ -31,16 +31,21 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings
|
||||
|
||||
private void Initialise()
|
||||
{
|
||||
DataBindingViewModel = null;
|
||||
DataBindingsTabsViewModel = null;
|
||||
|
||||
var properties = LayerProperty.GetDataBindingProperties();
|
||||
if (properties.Count == 0)
|
||||
if (properties == null || properties.Count == 0)
|
||||
return;
|
||||
|
||||
// Create a data binding VM for each data bindable property. These VMs will be responsible for retrieving
|
||||
// and creating the actual data bindings
|
||||
if (properties.Count == 1)
|
||||
DataBindingViewModel = new DataBindingViewModel(LayerProperty, properties.First());
|
||||
else
|
||||
{
|
||||
DataBindingsTabsViewModel = new DataBindingsTabsViewModel();
|
||||
foreach (var dataBindingProperty in LayerProperty.GetDataBindingProperties())
|
||||
foreach (var dataBindingProperty in properties)
|
||||
DataBindingsTabsViewModel.Tabs.Add(new DataBindingViewModel(LayerProperty, dataBindingProperty));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user