mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Shared UI - Renamed DataModelVisualizationService
Databindings - Started on some basic UI elements
This commit is contained in:
1 parent
babd862b40
commit
a177188ce7
31 files changed
+423
-185
No files matched your search
+12
@@ -0,0 +1,12 @@
|
||||
<UserControl x:Class="Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings.DataBindingsTabView"
|
||||
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:local="clr-namespace:Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
using System.Reflection;
|
||||
using Artemis.Core.Models.Profile.LayerProperties;
|
||||
using Stylet;
|
||||
|
||||
namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings
|
||||
{
|
||||
public class DataBindingsTabViewModel : PropertyChangedBase
|
||||
{
|
||||
public DataBindingsTabViewModel(BaseLayerProperty layerProperty, PropertyInfo dataBindingProperty)
|
||||
{
|
||||
DisplayName = dataBindingProperty.Name.ToUpper();
|
||||
LayerProperty = layerProperty;
|
||||
DataBindingProperty = dataBindingProperty;
|
||||
}
|
||||
|
||||
public string DisplayName { get; }
|
||||
public BaseLayerProperty LayerProperty { get; }
|
||||
public PropertyInfo DataBindingProperty { get; }
|
||||
}
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
<UserControl x:Class="Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings.DataBindingsView"
|
||||
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:local="clr-namespace:Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:s="https://github.com/canton7/Stylet"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800"
|
||||
d:DataContext="{d:DesignInstance local:DataBindingsViewModel}">
|
||||
<TabControl Margin="0 -1 0 0"
|
||||
ItemsSource="{Binding Tabs}"
|
||||
DisplayMemberPath="DisplayName"
|
||||
Style="{StaticResource MaterialDesignTabControl}">
|
||||
<TabControl.ContentTemplate>
|
||||
<DataTemplate>
|
||||
<materialDesign:TransitioningContent OpeningEffect="{materialDesign:TransitionEffect FadeIn}">
|
||||
<ContentControl s:View.Model="{Binding}" TextElement.Foreground="{DynamicResource MaterialDesignBody}" />
|
||||
</materialDesign:TransitioningContent>
|
||||
</DataTemplate>
|
||||
</TabControl.ContentTemplate>
|
||||
</TabControl>
|
||||
</UserControl>
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
using Artemis.Core.Models.Profile.LayerProperties;
|
||||
using Stylet;
|
||||
|
||||
namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings
|
||||
{
|
||||
public class DataBindingsViewModel : PropertyChangedBase
|
||||
{
|
||||
public DataBindingsViewModel(BaseLayerProperty layerProperty)
|
||||
{
|
||||
Tabs = new BindableCollection<DataBindingsTabViewModel>();
|
||||
LayerProperty = layerProperty;
|
||||
|
||||
Initialise();
|
||||
}
|
||||
|
||||
public BindableCollection<DataBindingsTabViewModel> Tabs { get; set; }
|
||||
public BaseLayerProperty LayerProperty { get; }
|
||||
|
||||
private void Initialise()
|
||||
{
|
||||
foreach (var dataBindingProperty in LayerProperty.GetDataBindingProperties())
|
||||
Tabs.Add(new DataBindingsTabViewModel(LayerProperty, dataBindingProperty));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user