This question is locked. New answers and comments are not allowed.
I have a ListBox that contains data bound TextBoxes. The TextBox has a Context Menu.
In my Tapped event handlers, I can't figure out how to access the TextBox, and it's bound element, that the user long pressed on (it may or may not be selected, so I can't just use the ListBox). The ContextMenu documentation says to use GetElementUnderMenu(), but I can't find any documentation or examples on how to use it.
Any help or suggestions would be greatly appreciated.
In my Tapped event handlers, I can't figure out how to access the TextBox, and it's bound element, that the user long pressed on (it may or may not be selected, so I can't just use the ListBox). The ContextMenu documentation says to use GetElementUnderMenu(), but I can't find any documentation or examples on how to use it.
Any help or suggestions would be greatly appreciated.
<
Grid
x:Name
=
"ContentPanel"
Grid.Row
=
"1"
Margin
=
"12,0,12,0"
>
<
StackPanel
>
<
TextBlock
TextWrapping
=
"Wrap"
Text
=
"{Binding Path=LocalizedResources.ProfilesPageInstructions, Source={StaticResource LocalizedStrings}}"
Height
=
"104"
HorizontalAlignment
=
"Center"
/>
<
ListBox
x:Name
=
"listBox"
>
<
ListBox.ItemTemplate
>
<
DataTemplate
>
<
StackPanel
x:Name
=
"sp"
>
<
TextBlock
Text
=
"{Binding profileName}"
FontSize
=
"{StaticResource PhoneFontSizeLarge}"
/>
</
StackPanel
>
</
DataTemplate
>
</
ListBox.ItemTemplate
>
<
telerikPrimitives:RadContextMenu.ContextMenu
>
<
telerikPrimitives:RadContextMenu
OpenGesture
=
"Hold"
x:Name
=
"menu"
Opening
=
"OnMenuOpening"
IsFadeEnabled
=
"True"
IsZoomEnabled
=
"True"
>
<
telerikPrimitives:RadContextMenuItem
Content
=
"delete"
Tapped
=
"deleteTapped"
/>
<
telerikPrimitives:RadContextMenuItem
Content
=
"rename"
Tapped
=
"renameTapped"
/>
</
telerikPrimitives:RadContextMenu
>
</
telerikPrimitives:RadContextMenu.ContextMenu
>
</
ListBox
>
</
StackPanel
>
</
Grid
>
</
Grid
>