Hello,
Can anyone explain to me why this code throws an unauthorized exception (only on windows):
public App()
{
var page = new ContentPage();
page.Content = new Button
{
Text = "Change content",
Command = new Command(async () =>
{
Task<Label> t = Task.Run(() =>
{
return new Label { Text = "abc", FontSize = 22 };
});
await t;
page.Content = t.Result;
})
};
MainPage = page;
}
And it does not throw an exception when I don't set the FontSize ?