This question is locked. New answers and comments are not allowed.
Hi,
Let say this code works.. the problem is, why when I tap "Load More" button, List_Tap always trigger also, so it will navigate to OtherPage.xaml ? How to fix it ?
Let say this code works.. the problem is, why when I tap "Load More" button, List_Tap always trigger also, so it will navigate to OtherPage.xaml ? How to fix it ?
<
telerikPrimitives:RadDataBoundListBox
x:Name
=
"listBound"
Tap
=
"List_Tap"
DataVirtualizationMode
=
"OnDemandManual"
>
<
telerikPrimitives:RadDataBoundListBox.DataVirtualizationItemTemplate
>
<
DataTemplate
>
<
Button
x:Name
=
"btnLoadMore"
Tap
=
"btnLoadMore_Tap"
/>
</
DataTemplate
>
</
telerikPrimitives:RadDataBoundListBox.DataVirtualizationItemTemplate
>
</
telerikPrimitives:RadDataBoundListBox
>
namespace Testing
{
public partial class MainPage : PhoneApplicationPage
{
private Button getMoreButton;
public MainPage()
{
InitializeComponent();
this.listBound.DataRequested += this.OnLoadDataRequest;
}
private async void OnLoadDataRequest(object sender, EventArgs e)
{
// API to load data here...
}
private void btnLoadMore_Tap(object sender, System.Windows.Input.GestureEventArgs
e)
{
this.getMoreButton = sender as Button;
if (getMoreButton.Name == "btnLoadMore")
{
this.OnLoadDataRequest(DataCategoryToLoad, null);
}
}
private void List_Tap(object sender, System.Windows.Input.GestureEventArgs e)
{
NavigationService.Navigate(new Uri("/OtherPage.xaml", UriKind.Relative));
}
}
}