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; using System.Windows.Media; namespace InABox.DynamicGrid { public class DFElementControl : DynamicFormControl { protected override FrameworkElement Create() { var element = FormDesignGrid.CreateElement(Control); if (element != null) return element; var result = new Border(); result.Child = new Label { Content = string.Format("[{0}]", Control.Description), HorizontalContentAlignment = HorizontalAlignment.Center, VerticalContentAlignment = VerticalAlignment.Center, FontWeight = FontWeights.DemiBold }; result.Background = new SolidColorBrush(Colors.Silver); result.BorderBrush = BorderBrush; result.BorderThickness = new Thickness(0.75); return result; } } }