From 47735ef00a2d386ea87696fdad3ac57fd22b4245 Mon Sep 17 00:00:00 2001 From: Miguel Date: Sun, 2 Jun 2024 09:13:01 +0200 Subject: [PATCH] Xceed PropetyGrid --- App.xaml | 1 + CtrEditor.csproj | 1 + MainViewModel.cs | 5 +- MainWindow.xaml | 13 +- MainWindow.xaml.cs | 2 +- ObjetosSim/SensoresComandos/ucBoton.xaml | 2 +- ObjetosSim/SensoresComandos/ucBoton.xaml.cs | 18 +-- .../ucSensTemperatura.xaml.cs | 3 + ObjetosSim/UserControlFactory.cs | 72 ++++++++- ObjetosSim/UserControls/BrushEditor.xaml | 29 ++++ ObjetosSim/UserControls/BrushEditor.xaml.cs | 33 +++++ ObjetosSim/osBase.cs | 3 +- PropiedadesExtendidas.xaml | 14 ++ PropiedadesExtendidas.xaml.cs | 28 ++++ XAMLhelpers.cs | 138 ++++++++++++++++++ 15 files changed, 341 insertions(+), 21 deletions(-) create mode 100644 ObjetosSim/UserControls/BrushEditor.xaml create mode 100644 ObjetosSim/UserControls/BrushEditor.xaml.cs create mode 100644 PropiedadesExtendidas.xaml create mode 100644 PropiedadesExtendidas.xaml.cs diff --git a/App.xaml b/App.xaml index 8993d5f..d7b127d 100644 --- a/App.xaml +++ b/App.xaml @@ -15,6 +15,7 @@ + diff --git a/CtrEditor.csproj b/CtrEditor.csproj index d291c5c..6e88f75 100644 --- a/CtrEditor.csproj +++ b/CtrEditor.csproj @@ -61,6 +61,7 @@ + diff --git a/MainViewModel.cs b/MainViewModel.cs index aa37365..0db044f 100644 --- a/MainViewModel.cs +++ b/MainViewModel.cs @@ -14,6 +14,7 @@ using CtrEditor.Simulacion; using System.Diagnostics; using System.Reflection; using CommunityToolkit.Mvvm.ComponentModel; +using Xceed.Wpf.Toolkit.PropertyGrid; namespace CtrEditor @@ -528,9 +529,9 @@ namespace CtrEditor } // Se cargan los datos de cada UserControl en el StackPanel - public void CargarPropiedadesosDatos(osBase selectedObject, StackPanel PanelEdicion, ResourceDictionary Resources) + public void CargarPropiedadesosDatos(osBase selectedObject, PropertyGrid PanelEdicion, ResourceDictionary Resources) { - UserControlFactory.CargarPropiedadesosDatos(selectedObject, PanelEdicion, Resources); + UserControlFactory.CargarPropiedadesosDatos(selectedObject, PanelEdicion); } private RelayCommand saveCommand; diff --git a/MainWindow.xaml b/MainWindow.xaml index 987a0b9..741bdb1 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -4,6 +4,9 @@ xmlns:i="http://schemas.microsoft.com/xaml/behaviors" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Siemens="clr-namespace:CtrEditor.Siemens" + xmlns:local="clr-namespace:CtrEditor" + xmlns:uc="clr-namespace:CtrEditor.ObjetosSim.UserControls" + xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" xmlns:ObjetosSim="clr-namespace:CtrEditor.ObjetosSim" x:Class="CtrEditor.MainWindow" Height="900" Width="1600" WindowState="Maximized" ResizeMode="CanResize" Title="{Binding directorioTrabajo}" Icon="/app2.png"> @@ -161,13 +164,11 @@ VerticalAlignment="Center"/> - - - - - + + - + +