/// <summary> /// Handler for header button toggle event. /// </summary> /// <param name="control">Source control.</param> protected virtual void OnHeaderToggle(Control control) { if (Collapsed != null) { Collapsed.Invoke(this); } }
/// <summary> /// Handler for header button toggle event. /// </summary> /// <param name="control">Source control.</param> protected virtual void OnHeaderToggle(Base control, EventArgs args) { if (Collapsed != null) { Collapsed.Invoke(this, EventArgs.Empty); } }
/// <summary> /// Handler for header button toggle event. /// </summary> /// <param name="control">Source control.</param> protected virtual void OnHeaderToggle(ControlBase control, EventArgs args) { m_Panel.IsHidden = m_HeaderButton.ToggleState; Invalidate(); InvalidateParent(); if (Collapsed != null) { Collapsed.Invoke(this, EventArgs.Empty); } }
private void UpdateInnerPanelCollapsedState() { if (isExpanded && innerPanel.Parent == null) { // todo - need to support collapsing without removing the child innerPanel.Parent = Visual; Expanded?.Invoke(this, null); } else if (!isExpanded && innerPanel.Parent != null) { innerPanel.Parent = null; Collapsed?.Invoke(this, null); } }
/// <summary> /// Closes the node. /// </summary> public void Close() { m_Panel.Hide(); if (m_ToggleButton != null) { m_ToggleButton.ToggleState = false; } if (Collapsed != null) { Collapsed.Invoke(this, EventArgs.Empty); } Invalidate(); }
/// <summary> /// Closes the node. /// </summary> public void Close() { m_InnerPanel.Hide(); if (m_ToggleButton != null) { m_ToggleButton.ToggleState = false; } if (Collapsed != null) { Collapsed.Invoke(this); } if (m_TreeControl != null && m_TreeControl.Collapsed != null) { m_TreeControl.Collapsed.Invoke(this); } Invalidate(); }
/// <summary> /// Closes the node. /// </summary> public void Close() { innerPanel.Hide(); if (toggleButton != null) { toggleButton.ToggleState = false; } if (Collapsed != null) { Collapsed.Invoke(this, EventArgs.Empty); } if (treeControl != null && treeControl.Collapsed != null) { treeControl.Collapsed.Invoke(this, EventArgs.Empty); } Invalidate(); }
/// <summary> /// Closes the node. /// </summary> public void Close() { m_InnerPanel.Collapse(); if (m_ToggleButton != null) { m_ToggleButton.ToggleState = false; } if (Collapsed != null) { Collapsed.Invoke(this, EventArgs.Empty); } if (RootNode != null && RootNode.Collapsed != null) { RootNode.Collapsed.Invoke(this, EventArgs.Empty); } Invalidate(); }
private void OnNodeCollapsed(TreeViewNode sender, object args) { var treeViewCollapsedEventArgs = new TreeViewCollapsedEventArgs(sender); if (ListControl != null) { if (ContainerFromNode(sender) is TreeViewItem collapsedTvi) { //Update TVI properties if (collapsedTvi.IsExpanded) { collapsedTvi.IsExpanded = false; } //Update TemplateSettings properties var templateSettings = collapsedTvi.TreeViewItemTemplateSettings; templateSettings.ExpandedGlyphVisibility = Visibility.Collapsed; templateSettings.CollapsedGlyphVisibility = Visibility.Visible; } Collapsed?.Invoke(this, treeViewCollapsedEventArgs); } }
/// <summary> /// Called when control is collapsed /// </summary> /// <param name="args">EventArgs</param> protected virtual void OnCollapsed(EventArgs args) { Collapsed?.Invoke(this, args); }
private void CollapseControl() { VisualStateManager.GoToState(this, StateContentCollapsed, true); Collapsed?.Invoke(this, new EventArgs()); }
protected void RaiseCollapsedEvent(Expander container) { Collapsed?.Invoke(this, new ExpanderCollapsedEventArgs()); // Uno Doc: We won't use null for args like WinUI }
private void OnCollapsed(object sender, RegionsCollapsedEventArgs e) { Collapsed?.Invoke(this, EventArgs.Empty); }
/// <summary> /// /// </summary> protected virtual void OnCollapsed() { Collapsed?.Invoke(this, new EventArgs()); }