Sub btnSearch_Click
' Wait For (Dialog.ShowTemplate(SearchTemplate, "", "", "CANCEL")) Complete (Result As Int)
Dim rs As ResumableSub = Dialog.ShowTemplate(SearchTemplate, "", "", "CANCEL")
#If B4a
Dialog.Base.Parent.As(Panel).Elevation = 8dip
#End If
Wait For (rs) Complete (Result As Int)
If Result = XUI.DialogResponse_Positive Then
btnSearch.xLBL.Text = SearchTemplate.SelectedItem
End If
End Sub