![]() Here's a ListView with the SwipeControl applied in its item DataTemplate. Setting up a swipe command to work in a collection or ListView is exactly the same as defining a single swipe command (shown previously), except you define your SwipeControl in a DataTemplate so it's applied to each item in the collection. These actions should be the primary ones that a user may want to perform multiple times over a short period. Remember to keep the menu items in your swipe content to short, concise text labels. SwipeItem uses an IconSource as its icon. ![]() You'll apply the swipe commands to the items in a ListView.įirst, create the swipe items, which represent the commands, as page level resources. Both sets of commands are defined in the Resources section of the page. In this example, you'll set up a delete command that uses Execute mode, and a menu of other commands that uses Reveal mode. Now we'll take a look at a more complete example of how you would typically use swipe commands in a list. It shows the hierarchy of XAML elements required to create a swipe command. Here's a simple example of a SwipeControl wrapped around some text. Swipe content can be placed inline, or defined in the Resources section of your page or app.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |