HEDGEWIZARDS
HEDGEWIZARDS

Reputation: 151

.NET Maui No Parameterless constructor defined for type (ContentView)

Trying to instance a ContentView that looks like this fails with reason "No Parameterless constructor defined for type "FooView"

public partial class FooView : ContentView
{
    internal FooView()
    {
        InitializeComponent();
    }

}

Upvotes: 2

Views: 417

Answers (1)

HEDGEWIZARDS
HEDGEWIZARDS

Reputation: 151

The Parameterless constructor for FooView should have a visibility of public, not internal

Upvotes: 3

Related Questions