コード例 #1
0
        private void UnrealizeItems()
        {
            var window = GetRealizationWindow();

            foreach (var item in MainPanel.Children)
            {
                var itemTop = Canvas.GetTop(item);
                if (itemTop < window.Top || itemTop > window.Bottom)
                {
                    MainPanel.Children.Remove(item);
                    GalleryThumbnailTemplate container = item as GalleryThumbnailTemplate;
                    (container.Tag as LayoutInfo).IsRendered = false;
                    containerCache.Put(container);
                }
            }
        }