12345678910111213141516171819202122232425262728293031323334353637 |
- using InABox.Core;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Controls;
- namespace InABox.DynamicGrid
- {
- public abstract class DynamicFormControl : ContentControl
- {
- public DynamicFormDesignGrid FormDesignGrid { get; set; }
- protected abstract FrameworkElement Create();
- public abstract void SetControl(DFLayoutControl control);
- }
- public abstract class DynamicFormControl<TControl> : DynamicFormControl
- where TControl : DFLayoutControl
- {
- private TControl control;
- public TControl Control
- {
- get => control;
- set
- {
- control = value;
- Content = Create();
- }
- }
- public override void SetControl(DFLayoutControl control) => Control = (TControl)control;
- }
- }
|