Changes

XAML

291 bytes added, 28 April
/* Properties */
! Collection !! {{Tooltip|Performance|Could rendering be slowed down by using this binding, especially on ItemTemplates used in a list of many items.}} !! {{Tooltip|Capability|Extent of the viewmodel accessed}} !! {{Tooltip|Lazy-Loaded|Loaded on-demand (vs. always present)}}
|-
| Values || Great || Very limited - Read only, Property (or [[Traits]] {{Version/WinXSince|5.1}}{{Version/MobileSince|5.1}}) value only || No
|-
| PropertyItems || Good || Limited - Read only || No
|}
==== Values[MP_PROPERTYNAME] ====
* This is the most basic and performant way to bind to a property value.
* This collection simply displays the 'true' value of a property, meaning that it is only useful displaying for simple properties, such as String, Int, Dbl, unformatted DateTime, etc. Properties that have a DisplayValue that is different from their true value, such as GUIDs or selective list items with labels, are not best displayed using this binding.
* For complex ipropertiesproperties, it can be still be used in the xaml for non-display purposes, such as in combination with converters or commands. It is immediately present on the most basic content viewmodel (the ContentListItemViewModels used by child lists) without having to be loaded, and remains the best choice in most cases.* {{Version/WinXSince|5.1}}{{Version/MobileSince|5.1}} This is a combined getter that returns the raw value directly from the dictionary, instead of providing a complex <code>TraitViewModel</code> or <code>PropertyViewModel</code>.
<tabs>
<tab name="Instead do">
<source lang = "XML">
Command="{Binding NavigateToGuidCommand}" Command Parameter="{Binding Values[MP_GUIDGUID]}"
</source>
</tab>
{{Hint|The Values[ ] collection delivers the property's value as a string. The equivalent for the other bindings (above shown as '...') is <code>{Binding Collection[PROPERTY_NAME].'''DisplayValue'''}</code>, however, the capability of these viewmodels goes far beyond the DisplayValue. Use [[Developer_Mode]] to learn more.}}
[[Category:Mobile|XAML]][[Category:WinX|XAML]][[Category:XAML|XAML]]
==== * Troubleshooting null property values ====
* The [[XAML_Tips#SetPropertyValueCommand|Set Property Value Command]] sets a named property to a specific or calculated (such as through an [[EvalExpression]]) value.
[[Category:Mobile|XAML]][[Category:WinX|XAML]][[Category:XAML|XAML]]
== Commands ==
293
edits