MAUI Custom Control : XFC0009 No property, BindableProperty, or event found for "Title", or mismatching type between value and property
04:49 04 Jan 2023

Am using MAUI application on .Net 6. Created a custom control for activity indicator, and created bindable property for Running & title.

CODE BEHIND ``public partial class CustomProgressDialog : VerticalStackLayout { #region CTOR public CustomProgressDialog() { InitializeComponent(); } #endregion #region BINDABLE PROPERTY`

public BindableProperty TitleProperty = BindableProperty.Create(propertyName: nameof(Title), returnType: typeof(string), declaringType: typeof(CustomProgressDialog), defaultValue:"Please wait...",
 defaultBindingMode: BindingMode.TwoWay,    propertyChanged: (bindable, oldvalue, newvalue) =>
{
    var control = (CustomProgressDialog)bindable;
    control.TitleLabel.Text = newvalue as string;
});

public BindableProperty RunningProperty  = BindableProperty.Create(propertyName: nameof(Running), returnType: typeof(bool), declaringType: typeof(CustomProgressDialog), defaultValue: false,

  defaultBindingMode: BindingMode.TwoWay, propertyChanged: (bindable, oldvalue, newvalue) =>
    {
        var control = (CustomProgressDialog)bindable;
        control.Indicator.IsRunning = (bool)newvalue;
    });

#endregion
#region PROPERTY
public string Title
{      
    get => (string)GetValue(TitleProperty);
    set => SetValue(TitleProperty, value);
}

public bool Running
{       
    get => (bool)GetValue(RunningProperty);
    set => SetValue(RunningProperty, value);
}
#endregion

}

When a giving direct value instead of binding, then there is no error. But when am using Binding then error.

XFC0009 No property, BindableProperty, or event found for "Title", or mismatching type between value and property.

Please help...

.net xaml custom-controls maui bindableproperty