Skip to content

Commit

Permalink
Using ViewSiwtcher Issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tpauchard committed Apr 26, 2024
1 parent 3efafce commit 66ad5ec
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
12 changes: 10 additions & 2 deletions DatatTemplatePerfIssue/NewPage1.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@
Title="NewPage1">
<ScrollView>
<StackLayout>
<Button BackgroundColor="Black" HorizontalOptions="Center" Text="Load Data" TextColor="White" WidthRequest="200" />
<HorizontalStackLayout>
<Button BackgroundColor="Black" Clicked="Button_Clicked" HorizontalOptions="Center" Text="Tab 1" TextColor="White" WidthRequest="200" />
<Button BackgroundColor="Black" Clicked="Button_Clicked_1" HorizontalOptions="Center" Text="Tab 2" TextColor="White" WidthRequest="200" />
<Button BackgroundColor="Black" Clicked="Button_Clicked_2" HorizontalOptions="Center" Text="Tab 3" TextColor="White" WidthRequest="200" />
</HorizontalStackLayout>
<Label x:Name="lbLoaded" FontSize="Large" HorizontalOptions="Center" VerticalOptions="Center" />
<tabs:DelayedView x:Name="delay" x:TypeArguments="local:Table" />
<tabs:ViewSwitcher x:Name="switcher">
<tabs:DelayedView x:Name="delay" x:TypeArguments="local:Table" UseActivityIndicator="True" />
<tabs:DelayedView x:Name="delay2" x:TypeArguments="local:Table" UseActivityIndicator="True" />
<tabs:DelayedView x:Name="delay3" x:TypeArguments="local:Table" UseActivityIndicator="True" />
</tabs:ViewSwitcher>
</StackLayout>
</ScrollView>
</ContentPage>
16 changes: 15 additions & 1 deletion DatatTemplatePerfIssue/NewPage1.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ public partial class NewPage1 : ContentPage
public NewPage1()
{
InitializeComponent();
delay.LoadView();
}

private void Button_Clicked(object sender, EventArgs e)
{
switcher.SelectedIndex = 0;
}

private void Button_Clicked_1(object sender, EventArgs e)
{
switcher.SelectedIndex = 1;
}

private void Button_Clicked_2(object sender, EventArgs e)
{
switcher.SelectedIndex = 2;
}
}

0 comments on commit 66ad5ec

Please sign in to comment.