Hello,
I write a Xamarin forms application for UWP and try to use an adaptive UI. On a small screen I want the MasterBehavior to be 'popover' and on a large screen it should be 'split'. I registered the SizeChanged event and change the MasterBehaviour but it does not work. What must I do to make it work?
public MainPage()
{
this.InitializeComponent();
SizeChanged += OnSizeChanged;
}
private void OnSizeChanged(object sender, EventArgs e)
{
if ( Width < 700)
{
this.MasterBehavior = MasterBehavior.Popover;
UpdateChildrenLayout();
} else
{
this.MasterBehavior = MasterBehavior.Split;
UpdateChildrenLayout();
}
}