Jump to: navigation, search

Changes


XAML Tips

374 bytes added, 11:19, 28 November 2023
/* Invoke on filtered results */ adapted text for Xamarin example
{{Attention|To use a binding in the KeyValueParameter, it has to be applied like in the example provided here: [[KeyValueList]]}}
* First, you need to setup a filtered list (**UWP: Setup a ListCollectionView) in the Resources section of a UI element (e.g. Grid).* This list is only available/visible within that UI element (the Grid in this case);.**Xamarin: Setup a String with a filtering expression & a SfDataSourceExt in the ResourceDictionary of the ContentView. For the Expression property of the SfDataSourceExt refer to the created expression String. 
* The ItemsSource uses Children.Items. Use the [[Developer_Mode|developer mode]] if necessary to find out if this is available where you intend to define the list;
* The example expression filters for any items that don't contain the text "EXAMPLE" in their Title texts. You can filter differently by altering the expression.
With the filtered list configured, you can then insert the following code snippet to execute the SetPropertyValueCommand for the filtered result items.
* The example code assumes that the child objects have an editable property called "VALUE" and tries to set 50 as their value;
* The "Filtered" refers to the ListCollectionView (UWP) or SfDataSourceExt (Xamarin) configured above.
<br />
{{Attention|The binding <code>ListViewModel.InvokeOnItemsCommand</code> should be updated to <code>BulkOperation.InvokeOnItemsCommand</code> starting from version 4.3.}}
[[Category:Client|XAML Tips]][[Category:WinX|XAML Tips]][[Category:XAML|XAML Tips]][[Category:Xamarin|XAML Tips]]
==== Support for old styled commands ====
337
edits