public void VisualControlDeactivate(UserControlEx control) { if (VisualControlDict.ContainsKey(control)) { VisualControlDict.Remove(control); } }
public void VisualControlActivate(UserControlEx control) { if (!VisualControlDict.ContainsKey(control)) { VisualControlDict.Add(control, 0); } }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/WebControl;component/Controls/ButtonEx.xaml", System.UriKind.Relative)); this.ButtonEx1 = ((WebControl.UserControlEx)(this.FindName("ButtonEx1"))); this.tbToolTip = ((System.Windows.Controls.TextBlock)(this.FindName("tbToolTip"))); this.MouseStateGroup = ((System.Windows.VisualStateGroup)(this.FindName("MouseStateGroup"))); this.ControlMouseEnter = ((System.Windows.VisualState)(this.FindName("ControlMouseEnter"))); this.ControlMouseLeave = ((System.Windows.VisualState)(this.FindName("ControlMouseLeave"))); this.VisualStateGroup = ((System.Windows.VisualStateGroup)(this.FindName("VisualStateGroup"))); this.ControlMouseDown = ((System.Windows.VisualState)(this.FindName("ControlMouseDown"))); this.ControlMouseUp = ((System.Windows.VisualState)(this.FindName("ControlMouseUp"))); this.recMouse = ((System.Windows.Shapes.Rectangle)(this.FindName("recMouse"))); this.vwWarning = ((System.Windows.Controls.Viewbox)(this.FindName("vwWarning"))); this.imgBase = ((System.Windows.Controls.Image)(this.FindName("imgBase"))); this.tbCaption = ((System.Windows.Controls.TextBlock)(this.FindName("tbCaption"))); }
private void GetTextBoxes(UIElement uiElement, Collection <UserControlEx> textBoxList) { UserControlEx textBox = uiElement as UserControlEx; if (textBox != null) { // If the UIElement is a Textbox, add it to the list. textBoxList.Add(textBox); } else { Panel panel = uiElement as Panel; if (panel != null) { // If the UIElement is a panel, then loop through it's children foreach (UIElement child in panel.Children) { GetTextBoxes(child, textBoxList); } } } }
public static void ShowForm(ref DocumentPanel documentPanel, string caption, string uriDirection, Size size, bool activate = true, object owner = null) { if (documentPanel == null) { //TrendPanel = Global.Default.DockManager.DockController.AddDocumentPanel(Global.Default.DocumentContainer, new Uri("/WebControl;component/Forms/TrendForm.xaml", UriKind.Relative)); documentPanel = Global.Default.DockManager.DockController.AddDocumentPanel(new Point(500, 500), size, new Uri(uriDirection, UriKind.Relative)); documentPanel.Caption = caption; if (owner != null) { UserControlEx controlEx = (UserControlEx)documentPanel.Control; controlEx.SetOwner(owner); } Global.Default.DockManager.Activate(documentPanel); Global.Default.DockManager.DockController.Float(documentPanel); } else { if (activate || documentPanel.Closed) { Global.Default.DockManager.DockController.Restore(documentPanel); Global.Default.DockManager.Activate(documentPanel); } } }