Wednesday, 15 August 2012

Prevent the ItemsControl from changing the focus when clicked (Silverlight) -



Prevent the ItemsControl from changing the focus when clicked (Silverlight) -

i have itemscontrol host input controls (textboxes, etc). when click in background of itemscontrol, focus automatically changed first item in itemscontrol.

is there way prevent this? tried overriding ongotfocus on itemscontrol without calling base of operations did not worked.

thanks in advanced!

jacques.

ok, figured out causing first element focus. in case, using scrollviewer hosting custom itemscontrol. itemscontrol , container within of have istabstop set false. alter of focus made scrollviewer in onmouseleftbuttondown method.

since scrollviewer sealed, had override onmouseleftbuttondown on container , itemscontrol set e.handled true. solved issue.

silverlight

No comments:

Post a Comment