Windows Media Player SDK banner art
PreviousNext

Button Styles

Buttons come in two styles: coordinate-based and region-based. Each style provides three different kinds of buttons. For more details about buttons, see the Buttons section of the Skin Reference.

Coordinate Buttons

Coordinate buttons are placed on the screen by their coordinate definitions. There are three types of coordinate buttons:

Type Description
Push Button that triggers a single event.
Toggle Button that changes state back and forth each time you tap on it. The two states are on and off. For example, the Repeat button changes from on to off when you tap it, and changes back to on when you tap it again.
2Push Button that has two possible events to trigger. The first push triggers the first event, and the second push triggers a second event. The third push triggers the first event, and so on.

Region Buttons

Region buttons can be used to define what areas of a button will respond to taps. This lets you create buttons that are circular or otherwise not rectangular. The area that will respond to a tap is defined by areas in the Region bitmap that are filled with specific colors. For example, if the Region bitmap contains a blue circle, and you have defined blue as the color for your Prev button, then only taps inside the circle will trigger the Prev button. You must also define the coordinates of the button so that the secondary bitmaps such as Pushed and Disabled can be displayed in the correct location. The art in the Region bitmap is not seen by the user, but is used for hit processing only.

There are three types of region buttons:

Type Description
PushHit Same as Push but uses a Region bitmap to define the hit region.
ToggleHit Same as Toggle but uses a Region bitmap to define the hit region.
2PushHit Same as 2Push but uses a Region bitmap to define the hit region.

PreviousNext


© 2000-2001 Microsoft Corporation. All rights reserved.