Is there a way to enable design context in Xamarin Forms XAML pages to enable intellisense? It works in WPF but for years I couldn't get it to work in Xamarin Forms.
So if you compile your xaml by setting the attribute in code somewhere, and then include the xaml snippet below, you can use design time data contexts and get the intellisense.
[assembly: XamlCompilation(XamlCompilationOptions.Compile)]
namespace MySpace
{
public partial class App {}
}
<Page
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d ="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=list:TestViewModel}"
xmlns:list="clr-namespace:PolyhydraGames.Test.ViewModels"
.../>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With