Reputation: 1633
I put one button in listpicker full mode template. I want when this button is pressed. It Just invoke my defined event. Not act as normal tap on listpicker And closes the full mode of listpicker.
Please see screenshot below.
Upvotes: 0
Views: 442
Reputation: 5104
To include the button in the listPicker full mode
, you have to define the data template
as such. Go through the listPicker given here
<DataTemplate x:Name="PickerFullModeItemTemplate">
<StackPanel Orientation="Horizontal" Margin="16 21 0 20">
<Button Click="event">
<Button.Content>
<StackPanel>
<Image Source="myImg.png"/>
<TextBlock Text="test"/>
</StackPanel>
</Button.Content>
</Button>
</StackPanel>
</DataTemplate>
For the behavior you require. Try and test by handling event function on click event
in the button. I guess it should work. If not then you have to use popUp
instead of listPicker. Or you would have to define your own UserControl
in the worst case.
Upvotes: 4