Beispiel #1
0
        private static void OnDataContextPrivateChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
        {
            RadExpanderControl typedSender = sender as RadExpanderControl;

            if (!typedSender.IsProperlyTemplated || typedSender.contextBinding)
            {
                return;
            }
            typedSender.expandableContent.Visibility = Visibility.Collapsed;
            typedSender.SetInitialControlState(false);
        }
Beispiel #2
0
        private static void OnExpandableContentChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
        {
            RadExpanderControl typedSender = sender as RadExpanderControl;

            if (!typedSender.IsTemplateApplied)
            {
                return;
            }
            typedSender.expandableContent.Visibility = Visibility.Collapsed;
            typedSender.SetInitialControlState(false);
        }
        private static void OnIsExpandedChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
        {
            RadExpanderControl typedSender = sender as RadExpanderControl;

            if (!typedSender.isPropertySetSilently)
            {
                if (!typedSender.HandleExpandedChange(typedSender.IsExpanded))
                {
                    typedSender.isPropertySetSilently = true;
                    typedSender.IsExpanded            = !typedSender.IsExpanded;
                    typedSender.isPropertySetSilently = false;
                }
            }
        }
Beispiel #4
0
        private static void OnIsExpandedChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
        {
            RadExpanderControl typedSender = sender as RadExpanderControl;

            if (!typedSender.isPropertySetSilently)
            {
                if (!typedSender.HandleExpandedChange(typedSender.IsExpanded))
                {
                    typedSender.isPropertySetSilently = true;
                    typedSender.IsExpanded            = !typedSender.IsExpanded;
                    typedSender.isPropertySetSilently = false;
                }
            }

            var expanderControlPeer = FrameworkElementAutomationPeer.FromElement(typedSender) as RadExpanderControlAutomationPeer;

            if (expanderControlPeer != null)
            {
                expanderControlPeer.RaiseExpandCollapseAutomationEvent((bool)args.OldValue, (bool)args.NewValue);
            }
        }