We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am not sure what I am doing wrong here - I am trying to bind the text value of a label as part of my custom control.
My control code behind looks like this: using Maui.BindableProperty.Generator.Core; namespace TestCustomControls.Controls;
public partial class HeaderControl : VerticalStackLayout { [AutoBindable()] private readonly string? _firstName;
[AutoBindable(DefaultBindingMode = nameof(BindingMode.OneWayToSource))] private readonly string? _message; public HeaderControl() { InitializeComponent(); }
}
My control xaml looks like this:
<Label Text="First Name" /> <Entry Text="{Binding Source={x:Reference this}, Path=FirstName}" /> <Label FontAttributes="Bold" FontSize="Header" Text="{Binding Source={x:Reference this}, Path=Message}" TextColor="Black" />
My test solution can be found at https://github.com/420tech/TestCustomControls. I can't get the label to render.
The text was updated successfully, but these errors were encountered:
I think the bindingmodes are wrong: FirstName should be OneWayToSource and Message should be OneWay.
Sorry, something went wrong.
No branches or pull requests
I am not sure what I am doing wrong here - I am trying to bind the text value of a label as part of my custom control.
My control code behind looks like this:
using Maui.BindableProperty.Generator.Core;
namespace TestCustomControls.Controls;
public partial class HeaderControl : VerticalStackLayout
{
[AutoBindable()]
private readonly string? _firstName;
}
My control xaml looks like this:
My test solution can be found at https://github.com/420tech/TestCustomControls. I can't get the label to render.
The text was updated successfully, but these errors were encountered: