예제 #1
0
 /// <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);
     }
 }
예제 #3
0
 /// <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);
     }
 }
예제 #4
0
 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);
     }
 }
예제 #5
0
        /// <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();
        }
예제 #6
0
        /// <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();
        }
예제 #7
0
        /// <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();
        }
예제 #8
0
        /// <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();
        }
예제 #9
0
        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);
            }
        }
예제 #10
0
 /// <summary>
 /// Called when control is collapsed
 /// </summary>
 /// <param name="args">EventArgs</param>
 protected virtual void OnCollapsed(EventArgs args)
 {
     Collapsed?.Invoke(this, args);
 }
예제 #11
0
 private void CollapseControl()
 {
     VisualStateManager.GoToState(this, StateContentCollapsed, true);
     Collapsed?.Invoke(this, new EventArgs());
 }
예제 #12
0
 protected void RaiseCollapsedEvent(Expander container)
 {
     Collapsed?.Invoke(this, new ExpanderCollapsedEventArgs());             // Uno Doc: We won't use null for args like WinUI
 }
예제 #13
0
 private void OnCollapsed(object sender, RegionsCollapsedEventArgs e)
 {
     Collapsed?.Invoke(this, EventArgs.Empty);
 }
예제 #14
0
 /// <summary>
 ///
 /// </summary>
 protected virtual void OnCollapsed()
 {
     Collapsed?.Invoke(this, new EventArgs());
 }