Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why is the scrolling behavior slightly different than with WPF?

0
Posted

Why is the scrolling behavior slightly different than with WPF?

0

If you have a ListBox with enough items that a vertical ScrollBar is displayed, using the Page Up/Down or arrow keys to scroll through the list behaves just a little bit differently on Silverlight than on WPF. In particular, WPF’s default behavior is to keep the top-most item fully visible and flush against the top of the ListBox at all times. Therefore, scrolling doesn’t affect the items’ vertical placement until the very beginning/end of the list. Silverlight does not have the same behavior with respect to the top-most item, so the item placement tends to change slightly while scrolling through the list. This behavior difference is due to the fact that the WPF ListBox’s default Style overrides the default ScrollViewer.CanContentScroll value of False and sets it to True, changing the ScrollViewer’s scrolling mode from physical scrolling (pixel-based) to logical scrolling (item-based). Silverlight’s ScrollViewer supports only physical scrolling, so this override is not present on Silve

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123