Esempio n. 1
0
        private void FlexGrid_ContainerContentChanging(ListViewBase sender, ContainerContentChangingEventArgs args)
        {
            var templateRoot = args.ItemContainer.ContentTemplateRoot;

            var child          = templateRoot.GetAllChildren();
            var _frozenContent = child.Where(x => FlexGridItemFrozenContent.GetIsFrozenContent(x));

            if (_frozenContent != null && _offsetXAnimation != null)
            {
                foreach (var item in _frozenContent)
                {
                    var _frozenContentVisual = ElementCompositionPreview.GetElementVisual(item);

                    _frozenContentVisual.StartAnimation("Offset.X", _offsetXAnimation);
                }
            }
        }
        private void NewFlexGridFrozenRows_Loaded(object sender, RoutedEventArgs e)
        {
            (sender as ListViewItem).Loaded -= NewFlexGridFrozenRows_Loaded;

            var templateRoot = (sender as ListViewItem).ContentTemplateRoot;

            var child          = templateRoot.GetAllChildren();
            var _frozenContent = child.FirstOrDefault(x => FlexGridItemFrozenContent.GetIsFrozenContent(x));

            if (_frozenContent != null && _offsetXAnimation != null)
            {
                //foreach (var item in _frozenContent)
                {
                    var _frozenContentVisual = ElementCompositionPreview.GetElementVisual(_frozenContent);

                    _frozenContentVisual.StartAnimation("Offset.X", _offsetXAnimation);
                }
            }
        }