Hi,
I have the following incomplete value entry helper class:
<Grid ux:Class="ButtonIconEntry" Columns="1*, 2*, 6*, 1*" Margin="0, 10, 0, 10" ImageColor="#FFF" LabelColor="#FFF">
<ImageSource ux:Property="Image" />
<float4 ux:Property="ImageColor" />
<string ux:Property="Label" />
<float4 ux:Property="LabelColor" />
<string ux:Property="Text" />
<float4 ux:Property="TextColor" />
<Image Source="{Property this.Image}" Width="25" Height="25" Alignment="BottomLeft"
Color="{Property this.ImageColor}" />
<Text Value="{Property this.Label}" TextColor="{Property this.LabelColor}"
FontSize="15" Alignment="BottomLeft" />
<TextInput Value="{Property this.Text}" TextColor="{Property this.TextColor}" CaretColor="{Property this.TextColor}" FontSize="15" Alignment="BottomLeft" />
<Image File="../assets/icons/arrow-right-02.png" Width="20" Color="#018bdb" Clicked="???" />
</Grid>
The last Image
object will be clickable to show, for example something like selection window, etc., to the user instead of entering values by hand. The problem is, this class can be used from everywhere and I don’t what is the correct way of assigning generic handlers to the Class elements.
-
I’ve tried to define a property of type object and assigned a function to this property but unfortunately it didn’t work. I don’t get any errors but function is not called.
-
I’ve tried to add a Dependency of type Callback on the class. But I couldn’t find a place on the page to declare the Callback that will be assigned to this class. I got the following error:
'Callback' doesn't fit here. 'Page' does not have any content properties that accept 'Callback'
-
The last one is raising errors which I haven’t tried yet. Because it seems so cumbersome while we may have the option of assigning Function type properties and I wasn’t able to do it correctly. May be I assigned the wrong type for the property.
So that’s why I wanted to ask, what is correct way to do this?
Thanks in advance,
Ipek