protected override void SetupScrollViewer(ScrollViewer scrollViewer) { base.SetupScrollViewer(scrollViewer); scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Disabled; scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Visible; }
protected virtual void SetupScrollViewer(ScrollViewer scrollViewer) { scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Visible; scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled; scrollViewer.LayoutUpdated += this.ScrollViewer_LayoutUpdated; }
protected override void GeneratePanel() { if (this.panel != null) { if (this.panel is IVirtualizingPanel) { ((IVirtualizingPanel)panel).ScrollOwner = null; } this.RemoveLogicalChild(this.panel); this.panel.Children.Clear(); this.RemovePanelFromNativeContainer(); } this.panel = (Panel)this.ItemsPanel.LoadContent(); if (this.panel is IVirtualizingPanel) { ((IVirtualizingPanel)this.panel).Generator = this.ItemContainerGenerator; if (((IVirtualizingPanel)panel).HasNativeScroll) { this.scrollViewer = null; } else { if (this.scrollViewer == null) { this.scrollViewer = new ScrollViewer(); this.AddLogicalChild(this.scrollViewer); this.SetupScrollViewer(this.scrollViewer); } ((IVirtualizingPanel)panel).ScrollOwner = this.scrollViewer; } } if (this.panel.Parent == null) { this.AddLogicalChild(this.panel); this.AddPanelToNativeContainer(); this.UpdateItems(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset)); } }
protected virtual void SetupScrollViewer(ScrollViewer scrollViewer) { scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Visible; scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled; scrollViewer.LayoutUpdated += this.ScrollViewer_LayoutUpdated; }