This is a mirror of official site: http://jasper-net.blogspot.com/

Quick Tip: MouseOver the entire surface of a ListBoxItem VisualState

| Sunday, November 7, 2010
The template of ListItems of box knows the VisualState MouseOver. If you move the mouse pointer over a ListBoxItem VisualState MouseOver is enabled by default unless when the mouse pointer over the visible content. The visible contents are defined by the ContentPresenter of the template. The list box item is but usually wider than the ContentPresenter or as the contents of the list box items. This behavior may be undesirable.

Below I describe what you do to the VisualState MouseOver is always enabled when the mouse pointer on any point of the list box items.

It is assumed that somewhere on the surface of a Silverlight 4 project a ListBox with at least a ListBoxItem exists. This list box item is activated with the left mouse button. Next: Right click-> template edit-> copy edit, in the dialog box, the new style a name type, confirm and lands in the template of the list box items.

Then the "Conditions" tab is selected. For further action to ensure that "Base" is enabled:

ss1.png

Read more: SilverLaw

Posted via email from .NET Info

0 comments: