,

Summary

This chapter began with a short getting started guide that showed how to obtain and reference the Toolkit using NuGet. It then explored each Toolkit component starting with the ListPicker, which allows you to display a large number of options using an expandable or full-screen option picker. You saw how to bind a ListPicker to a viewmodel collection and how to customize the way items are displayed.

The chapter then looked at the AutoCompleteBox, which provides suggestions for the user in a drop-down list. You saw how to use the AutoCompleteBox from code-beside and via data binding to a viewmodel. You looked at dynamically changing the way the AutoCompleteBox filters items, at creating a custom filter, and at dynamic population of the suggestion list. How to overcome a limitation to allow binding from the AutoCompleteBox.Text property was also discussed.

The chapter looked at the ContextMenu, which is an expanding menu control that you can use to emulate the familiar right-click menu in Windows desktop applications. You saw how to consume the various ContextMenu events and how to use the ContextMenu in conjunction with the MVVM pattern. You also looked at hosting a ContextMenu in a ListBoxItem.

The DatePicker and TimePicker, which allow the user to select a date or time using infinitely scrollable lists, were discussed. You learned how to customize the Value format of the controls and how to create a custom full-screen picker page. You also learned how to use the lesser known LoopingSelector to allow the user to select a numeric value from an infinitely scrolling list.

The chapter then looked at the TiltEffect component, which allows you to add a subtle rotation effect to other controls when the user interacts with them, and which helps to engage the user and improve the perceived responsiveness of the UI. You also saw how to suppress the tilt effect on particular controls and how to add new control types to the list of tiltable control types.

The chapter then looked at the ToggleSwitch, which serves as a replacement for the CheckBox control in some scenarios. You saw how to respond to the Checked and Unchecked events of the ToggleSwitch, and at binding the ToggleSwitch to a viewmodel property. You looked at localizing the ToggleSwitch header text, allowing it to be used when the display language of the phone is not English, and also how to change the switch color using the ToggleSwitch.SwitchForeground property.

Finally, the chapter discussed the WrapPanel, which is a flexible container that positions items sequentially and is ideally suited to the limited display size of the phone. You learned how to use the WrapPanel in conjunction with a ListBox, to enable binding to a viewmodel collection.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.223.123