Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

BlazorWebView in Maui cannot click anything

$
0
0

When I use a tabbed page layout and call blazor web view pages in my Shared RCL, none of the buttons work in those pages.

When I use the normal navigation everything works. Am I calling this correctly?

Here is the normal MainPage.Xaml

<BlazorWebView x:Name="blazorWebView" HostPage="wwwroot/index.html"><BlazorWebView.RootComponents><RootComponent Selector="#app" ComponentType="{x:Type local:Components.Routes}" /></BlazorWebView.RootComponents></BlazorWebView>

Here is my modified MainPage.xaml with a tabbed page. This will show the screens from the Razor Class Library. I just cant interact with any of them(button clicks, Events etc)

<TabbedPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"             xmlns:local="clr-namespace:Mobile"             xmlns:android="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific;assembly=Microsoft.Maui.Controls"             android:TabbedPage.ToolbarPlacement="Bottom"             android:TabbedPage.IsSwipePagingEnabled="False"             x:Class="Mobile.MainPage"             BarTextColor="White"             BarBackgroundColor="#2B0B98"             SelectedTabColor="White"             UnselectedTabColor="SlateGrey"             BackgroundColor="{DynamicResource PageBackgroundColor}"             xmlns:pages="clr-namespace:Mobile.Components.Pages"><ContentPage Title="Home"  IconImageSource="{StaticResource TabOne}"><BlazorWebView HostPage="wwwroot/index.html"><BlazorWebView.RootComponents><RootComponent Selector="#app" ComponentType="{x:Type pages:Home}" /></BlazorWebView.RootComponents></BlazorWebView></ContentPage><ContentPage Title="Scheduler" IconImageSource="{StaticResource TabTwo}"><BlazorWebView  HostPage="wwwroot/index.html"><BlazorWebView.RootComponents><RootComponent Selector="#app" ComponentType="{x:Type pages:Scheduler}" /></BlazorWebView.RootComponents></BlazorWebView></ContentPage><ContentPage Title="Users" IconImageSource="{StaticResource TabThree}"><BlazorWebView  HostPage="wwwroot/index.html"><BlazorWebView.RootComponents><RootComponent Selector="#app" ComponentType="{x:Type pages:UserManagement}" /></BlazorWebView.RootComponents></BlazorWebView></ContentPage><ContentPage Title="Messages" IconImageSource="{StaticResource TabFour}"><BlazorWebView  HostPage="wwwroot/index.html"><BlazorWebView.RootComponents><RootComponent Selector="#app" ComponentType="{x:Type pages:Messages}" /></BlazorWebView.RootComponents></BlazorWebView></ContentPage><pages:Settings IconImageSource="{StaticResource TabFive}"/></TabbedPage>

Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>