This project has moved and is read-only. For the latest updates, please go here.

TurnstileFeatherEffect support ItemsControl


Having had a look at the source (TurnstileFeatherEffect.cs) it seems strange to me that ListBoxes are explicitly supported, but general ItemsControls aren't.

Is this deliberate/for perf reasons? (A quick test seemed fine, but I might be missing something)


QuinnDamerell wrote Jan 13, 2013 at 10:04 PM

I was wondering the same thing. Is it easy to get it working?

l3v5y wrote Jan 14, 2013 at 6:50 PM

It's very easy!

In Effects\TurnstileFeatherEffect.cs, find
ListBox listBox = r.Target as ListBox;
LongListSelector longListSelector = r.Target as LongListSelector;
Pivot pivot = r.Target as Pivot;
if (listBox != null)
     // If the target is a ListBox, feather its items individually.
     ItemsControlExtensions.GetItemsInViewPort(listBox, targets);
You can either add another line/check, or change ListBox to ItemsControl (ListBox is a subclass of ItemsControl so it doesn't affect that) and ItemsControlExtensions does all the hard work.

wrote Jan 17, 2013 at 12:29 AM

QuinnDamerell wrote Jan 17, 2013 at 12:30 AM

Thanks for the info!

wrote Feb 22, 2013 at 1:50 AM

wrote May 4, 2013 at 4:05 PM

wrote May 7, 2013 at 2:56 AM

Kinnara wrote Jul 4, 2013 at 5:15 PM

Please try this fork which has this issue fixed.

wrote Jul 11, 2013 at 8:36 PM