public TextBoxWithDescription(TextBoxWithDescription control) { InitializeControl(); this.Name = control.Name; this.LabelText = control.LabelText; this.DataContext = control.DataContext; var binding = control.GetBindingExpression(TextBoxWithDescription.TextProperty); SetBinding(TextProperty, binding.ParentBindingBase); this.Height = control.Height; }
public void AddControl(TextBoxWithDescription control) { foreach (Control existing in MyStackPanel.Children) { if (existing.Name == control.Name) { return; } } TextBoxWithDescription newControl = new TextBoxWithDescription(control); MyStackPanel.Children.Add(newControl); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 5 "..\..\..\Dialogs\ZoomValue.xaml" ((TaskDash.CustomControls.ZoomValue)(target)).KeyDown += new System.Windows.Input.KeyEventHandler(this.Window_KeyDown); #line default #line hidden return; case 2: this.textBoxEditableValue = ((TaskDash.CustomControls.TextBoxWithDescription)(target)); return; } this._contentLoaded = true; }