Archive for August 25th, 2007

25
Aug

Changing a CheckBox control’s icon

The following example shows how you can customize the check icon in a CheckBox control and use embedded images instead.

Full code after the jump.

Continue reading ‘Changing a CheckBox control’s icon’

25
Aug

Docking an ApplicationControlBar container

The following example shows how you can dock an ApplicationControlBar container by setting its dock property to true. Yes, this is perhaps the shortest and most boring example ever. Enjoy!

Full code after the jump.

Continue reading ‘Docking an ApplicationControlBar container’

25
Aug

Enabling and disabling specific tabs in a TabBar control

The following example shows how you can enable and disable individual tabs in a TabBar control by setting the enabled property in the ViewStack container’s child containers.

Full code after the jump.

Continue reading ‘Enabling and disabling specific tabs in a TabBar control’

25
Aug

Using the CurrencyValidator and CurrencyFormatter classes to validate and format numbers

The following entry shows how users can store an unformatted number and display it back to users when the TextInput control is being edited. When the text input control loses focus, the data is validated and formatted (if the data was valid) or focus is returned to the control if validation failed.

Full code after the jump.

Continue reading ‘Using the CurrencyValidator and CurrencyFormatter classes to validate and format numbers’

25
Aug

Using the ZipCodeValidator class to validate US or Canadian zip codes

The following example shows how you can use the ZipCodeValidator to validate either US or Canadian zip codes (or should that be “postal codes” for our friends from the Great White North?). It turns out that making the ZipCodeValidator “Canadian friendly” is as simple as setting the domain property, and passing a constant value from the ZipCodeValidatorDomainType class (valid constants are US_ONLY and US_OR_CANADA).

Full code after the jump.

Continue reading ‘Using the ZipCodeValidator class to validate US or Canadian zip codes’

25
Aug

Changing a Tile container’s child layout direction

The following example lets you change a Tile container’s direction property to control whether the container’s children are arranged from left to right, or top to bottom. You can also use two slider controls to change the value of the tileWidth and tileHeight properties.

Full code after the jump.

Continue reading ‘Changing a Tile container’s child layout direction’

25
Aug

Changing a Tile container’s horizontal and vertical gaps

The following example uses two slider controls to adjust the values of the horizontalGap and verticalGap styles.

Full code after the jump.

Continue reading ‘Changing a Tile container’s horizontal and vertical gaps’

25
Aug

Changing a Tile container’s horizontal and vertical alignment

The following example shows how you can horizontal and vertical alignment in a Tile container using the horizontalAlign and verticalAlign styles respectively.

Full code after the jump.

Continue reading ‘Changing a Tile container’s horizontal and vertical alignment’

25
Aug

Changing a CheckBox control’s label placement

While probably not very useful to most, this is a quick post on changing the CheckBox control’s labelPlacement property to control where the text appears in relation to the check box.

Full code after the jump.

Continue reading ‘Changing a CheckBox control’s label placement’

25
Aug

Changing a CheckBox control’s icon color and border color

The following example shows how you can change the CheckBox control’s checkmark icon color and the border color by setting the control’s iconColor and borderColor styles repectively.

Full code after the jump.

Continue reading ‘Changing a CheckBox control’s icon color and border color’