Changes

Property Based Content Filters

14 bytes removed, 10:42, 27 June 2024
* Require a custom [[SYSCLS_CHILDAREATEMPLATE|Child Area template name]] to work. This customizing will not work applied to the UBIKChildArea.
* Work directly on the Children.Items collection. While filters are active, anything derived from this collection (such as Children.Items.Count or custom datasources like [[XAML_Changes_in_UBIK_WinX_3.5#Filtering_by_expressions|ListCollectionView]] / [[Xamarin_XAML#Content_filtering|sfDataSourceExt]]) will also be affected.
<br><br>
== Usage ==
* ClearPropertyFilters: Clear out all existing filters at the current level before executing the command. This is optional and defaults to false;
* All other parameters: KeyValue pairs used as filter criteria where the Keys are the names of the metaproperties by which you want to filter.
<br>
==== ItemsSource ====
Note that you will then need to remove references to the DisplayText, as the x:String value becomes the value used to filter.
<br>
 
 
 
 
 
==== GUID Properties ====
<br>
Note that in this example, a Properties.AllItems[LK_PLANT_QUERY] is added to the Content object to provide the list of items displayed by the Picker, as a workaround to the Children.Items[0] approach.
<br><br>
== Displaying Results ==
</Entry.Behaviors>
</source>
 
<br>
{{Hint|"&amp;quot;" and "\" are used for escaping the special characters in XAML and C# code respectively. "{0}" and "{1}" are placeholders and get replaced by the property name and the filter value. The end expression being executed in this example is <code>Content["PROPERTY_NAME"].Value.ToString().Equals(FILTER_VALUE)&#61;&#61;true</code>}}
 
<br><br>
 
 
 
 
 
== UI Customizing ==
728
edits