Hello,
Cannot find Text in MainViewModel?
Yes, please add the following BindingContext code in your XAML. Here is a document about: Use compiled bindings
<ContentPage.BindingContext>
<local:MainViewModel />
</ContentPage.BindingContext>
I followed the video but did not automatically generate a Text: string. How can I automatically generate it?
You can do this by adding it manually as the following code in MainViewModel.cs`.
public class MainViewModel
{
public string Text { get; set; } = "123";
}
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.