Hi,
I was wondering if there is a way to disable horizontal scrollbar in WinListView.
Thanks,
Sameer
using nsScrollBar = Infragistics.Win.UltraWinScrollBar;
this.ultraListView1.CreationFilter = new DisabledScrollbarCreationFilter( Orientation.Horizontal );
#region DisabledScrollbarCreationFilterpublic class DisabledScrollbarCreationFilter : IUIElementCreationFilter{ private Orientation orientation = Orientation.Horizontal;
public DisabledScrollbarCreationFilter( Orientation orientation ) { this.orientation = orientation; }
#region IUIElementCreationFilter Members
void IUIElementCreationFilter.AfterCreateChildElements(UIElement parent) { if ( parent is UltraListViewUIElement ) { foreach( UIElement element in parent.ChildElements ) { nsScrollBar.ScrollBarUIElement scrollBarElement = element as nsScrollBar.ScrollBarUIElement; if ( scrollBarElement != null && scrollBarElement.Orientation == this.orientation ) { scrollBarElement.Enabled = false; break; } }
} }
bool IUIElementCreationFilter.BeforeCreateChildElements(UIElement parent) { return false; }
#endregion}#endregion DisabledScrollbarCreationFilter