Changes

KeyValueList

785 bytes added, 08:39, 29 March 2022
=== Example ===
The following example shows how to use the control with two parameters in conjunction with the NavigateToGuidCommand. The first parameter specifies the Guid of the target document and the second parameter specifies the HotSpot that should be highlighted on that very document. This example needs a namespace declaration '''xmlns:ctrls="using:UBIK.WinX.Controls"'''
<source lang = "xml">
<Button Command="{Binding NavigateToGuidCommand}" Content="Test">
<ctrls:KeyValueList>
<ctrls:KeyValueParameter Key="Guid" Value="c9ad0e93-395a-4b4e-a526-fb5d5e42f8ff" />
<ctrls:KeyValueParameter Key="HotSpot" Value="05d2e931b9e855f9-ad11d3be-44074b60-a8e6b4e3-337f6779f96b19398f5925b5" />
</ctrls:KeyValueList>
</Button.CommandParameter>
</Button>
</source>
 
To use a Binding in the KeyValueParameter, the following logic has to be used, instead of applying the binding directly on the Value property
 
<source lang = "xml">
<Button Content="{Binding Header}" Command="{Binding CreateChildItemCommand}" x:Name="CreateButton" Tag="{Binding}">
<Button.CommandParameter>
<uc:KeyValueList>
<uc:KeyValueParameter Key="Parent" Value="{Binding Tag, ElementName=CreateButton}"/>
<uc:KeyValueParameter Key="Type" Value="21fc990a-d064-4bee-8d48-3293351f827a"/>
</uc:KeyValueList>
</Button.CommandParameter>
</Button>
</source>
 
 
== Parameters ==
==See also==
* [[XAML]]
 
[[Category:Pages with broken file links|KeyValueList]]
322
edits

Help improve this page!