Пример #1
0
        private static void OnOrientationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            RadLoopingList list = d as RadLoopingList;

            list.orientationCache = (Orientation)e.NewValue;
            list.OnOrientationChanged();
        }
Пример #2
0
        private static void OnItemsSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            RadLoopingList list = d as RadLoopingList;

            list.ResetItemsPanel();
            list.UpdateLogicalCount(true);
        }
Пример #3
0
        private static void OnItemSpacingChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            RadLoopingList list = d as RadLoopingList;

            if (list.itemsPanel != null)
            {
                list.ResetItemsPanel();
            }
        }
Пример #4
0
        private static void OnIsLoopingEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            RadLoopingList list = d as RadLoopingList;

            if (list.itemsPanel != null)
            {
                list.itemsPanel.IsLoopingEnabled = (bool)e.NewValue;
            }
        }
Пример #5
0
        private static void OnCenteredItemSnapPositionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            RadLoopingList list = d as RadLoopingList;

            if (list.itemsPanel != null)
            {
                list.itemsPanel.CenteredItemSnapPosition = (LoopingListItemSnapPosition)e.NewValue;
            }
        }
Пример #6
0
        private static void OnSnapOffsetCorrectionChanged(DependencyObject d, DependencyPropertyChangedEventArgs args)
        {
            RadLoopingList list = d as RadLoopingList;

            if (list.itemsPanel != null)
            {
                list.itemsPanel.SnapOffsetCorrection = (double)args.NewValue;
            }
        }
Пример #7
0
        private static void OnIsExpandedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            RadLoopingList list = d as RadLoopingList;

            list.isExpanded = (bool)e.NewValue;

            list.UpdateItemsVisualState();

            list.OnIsExpandedChanged();
        }
Пример #8
0
        private static void OnSelectedIndexChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            RadLoopingList list = d as RadLoopingList;

            if (list.IsInternalPropertyChange || !list.IsTemplateApplied)
            {
                return;
            }

            if (list.selectionChangeReason == LoopingListSelectionChangeReason.User)
            {
                list.UpdateSelection((int)e.NewValue, LoopingListSelectionChangeReason.User);
            }
        }
Пример #9
0
        private static void OnIsExpandedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            RadLoopingList list = d as RadLoopingList;

            list.isExpanded = (bool)e.NewValue;

            list.UpdateItemsVisualState();

            RadLoopingListAutomationPeer peer = FrameworkElementAutomationPeer.FromElement(list) as RadLoopingListAutomationPeer;

            if (peer != null)
            {
                peer.RaiseExpandCollapseAutomationEvent(!((bool)e.NewValue), (bool)e.NewValue);
            }

            list.OnIsExpandedChanged();
        }
Пример #10
0
        private static void OnSelectedIndexChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            RadLoopingList list = d as RadLoopingList;

            if (list.IsInternalPropertyChange)
            {
                return;
            }

            var selectedIndex       = (int)e.NewValue;
            var selectedVisualIndex = list.GetVisualIndex(selectedIndex);

            if (!list.IsTemplateApplied)
            {
                list.selectedIndex       = selectedIndex;
                list.selectedVisualIndex = selectedVisualIndex;
            }
            else if (list.selectionChangeReason == LoopingListSelectionChangeReason.User)
            {
                list.UpdateSelection(selectedIndex, selectedVisualIndex, LoopingListSelectionChangeReason.User);
            }
        }
Пример #11
0
        private static void OnItemTemplateSelectorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            RadLoopingList list = d as RadLoopingList;

            list.itemTemplateSelectorCache = (DataTemplateSelector)e.NewValue;
        }
Пример #12
0
        private static void OnItemStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            RadLoopingList list = d as RadLoopingList;

            list.itemStyleCache = (Style)e.NewValue;
        }