Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Handler not found for view Microsoft.Maui.Controls.Compatibility.RelativeLayout #3006

Closed
dothanh1996 opened this issue Oct 18, 2021 · 2 comments · Fixed by #3723
Closed
Assignees
Labels
area-core-hosting Extensions / Hosting / AppBuilder / Startup area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter fixed-in-6.0.200-preview.12 Look for this fix in 6.0.200-preview.12! t/bug Something isn't working

Comments

@dothanh1996
Copy link

Description

I have a source code that still works properly on maui preview 8, visual studio 2022 preview 4. When upgrading should use maui preview 9, visual studio 2022 preview 5, I get the following error: Handler not found for view Microsoft.Maui.Controls.Compatibility.RelativeLayout

Steps to Reproduce

  1. Create new project maui preview 9
  2. Add "xmlns:cmp="clr-namespace:Microsoft.Maui.Controls.Compatibility;assembly=Microsoft.Maui.Controls""
  3. Add

    <Grid.GestureRecognizers>

    </Grid.GestureRecognizers>


    <ContentView.BindingContext>
    model:MainPageObject/
    </ContentView.BindingContext>
    <cmp:RelativeLayout x:Name="RelativePreview"
    VerticalOptions="FillAndExpand"
    HorizontalOptions="FillAndExpand">
    </cmp:RelativeLayout>



Expected Behavior

The program builds and runs successfully as preview 8

Actual Behavior

Error: Handler not found for view Microsoft.Maui.Controls.Compatibility.RelativeLayout.

Basic Information

  • Visual studio preview 5
  • Maui preview 9
  • Build and run with: .net 6 windows 10.0.19041

Screenshots

image

image

@jsuarezruiz jsuarezruiz added the t/bug Something isn't working label Oct 18, 2021
@Eilon Eilon added the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label Oct 18, 2021
@hartez hartez added the area-core-hosting Extensions / Hosting / AppBuilder / Startup label Nov 5, 2021
@rmarinho
Copy link
Member

rmarinho commented Nov 12, 2021

Can you remove the compatibility from the namespace and use RelativeLayout new version? that's on the default namespace.. So basically just use <RelativeLayout

@hartez
Copy link
Contributor

hartez commented Nov 12, 2021

Can you remove the compatibility from the namespace and use RelativeLayout new version? that's on the default namespace.. So basically just use <RelativeLayout

That won't work just yet - we still haven't ported RelativeLayout to a new handler.
We'll need to add the Compatibility renderer in the configuration until we port it.

@hartez hartez self-assigned this Dec 10, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Feb 18, 2022
@samhouts samhouts added the fixed-in-6.0.200-preview.12 Look for this fix in 6.0.200-preview.12! label Feb 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-core-hosting Extensions / Hosting / AppBuilder / Startup area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter fixed-in-6.0.200-preview.12 Look for this fix in 6.0.200-preview.12! t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants