ContentView x:Name="contentView" Grid.Row="1" >
<ContentView.Content>
<WebView x:Name="webView" WidthRequest="1000" HeightRequest="1000"
Navigating="WebView_Navigating" Navigated="WebView_Navigated" />
</ContentView.Content>
</ContentView>
private async void WebView_Navigating(object sender, WebNavigatingEventArgs e)
{
contentView.Content = new Button()
{
WidthRequest = 30,
HeightRequest = 30
}; }
private async void WebView_Navigated(object sender, WebNavigatedEventArgs e)
{
contentView.Content = webView;
} |
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="100"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="1">
<controls:CustomWebView x:Name="webView">
...
</controls:CustomWebView>
<shimmer:SfShimmer x:Name="shimmer"
... >
<shimmer:SfShimmer.CustomView>
...
</shimmer:SfShimmer.CustomView>
</shimmer:SfShimmer>
</Grid>
</Grid> |
…
<controls:CustomWebView x:Name="webView"
Source="{Binding MyUrlBooking}"
Uri="{Binding MyUrlBooking}"
WidthRequest="1000" HeightRequest="1000"
NavigatingCommand="{Binding WebViewNavigatingCommand}"
NavigatedCommand="{Binding WebViewNavigatedCommand}">
…
</controls:CustomWebView>
<Grid BackgroundColor="White" IsVisible="{Binding IsBusy, Mode=TwoWay}">
<shimmer:SfShimmer x:Name="shimmer" VerticalOptions="FillAndExpand"
IsActive="{Binding IsBusy, Mode=TwoWay}" >
<shimmer:SfShimmer.CustomView>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition Height="30" />
<RowDefinition Height="90" />
<RowDefinition Height="90" />
<RowDefinition Height="90" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="90" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="90" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<BoxView Grid.Row="0" Grid.Column="0"
HorizontalOptions="Start"
WidthRequest="20"
BackgroundColor="{StaticResource Gray-400}" />
<BoxView Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="3"
HorizontalOptions="StartAndExpand"
WidthRequest="150"
BackgroundColor="{StaticResource Gray-400}" />
<BoxView Grid.Row="0" Grid.Column="4"
HorizontalOptions="Start"
WidthRequest="20"
BackgroundColor="{StaticResource Gray-400}" />
</Grid>
</shimmer:SfShimmer.CustomView>
</shimmer:SfShimmer>
</Grid>
…
|