Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.
This repository was archived by the owner on May 1, 2024. It is now read-only.

[WPF] Page doesn't render #2704

@VladislavAntonyuk

Description

@VladislavAntonyuk

Description

Page doesn't render if init navigation not in constructor

Steps to Reproduce

  1. Create Xamarin Forms app with Android and wpf projects.

2 In Xamarin Forms app change method to this
public App()
{
InitializeComponent();
InitApp(); // used for DI
}

protected override async void OnStart()
{
base.OnStart();
await InitNavigation();
OnResume();
}

private static Task InitNavigation()
{
var navigationService = IoC.Container.GetInstance();
return navigationService.InitializeAsync(); // Navigate to page NavigateToAsync()
}

  1. Run on Android. The page is rendered.
  2. Run on WPF. The page is not rendered

Expected Behavior

Page is rendered on wpf

Actual Behavior

The page can be rendered on WPF if run InitNavigation on Constructor

public App()
{
InitializeComponent();
InitApp();
InitNavigation();
}

protected override async void OnStart()
{
base.OnStart();
OnResume();
}

Basic Information

  • Version with issue: 3.1.0.469394-pre1, the same on previous
  • Last known good version:
  • IDE: VS2017 15.7.1
  • Platform Target Frameworks:
    • iOS:
    • Android:
    • UWP:
  • Android Support Library Version:
  • Nuget Packages:
  • Affected Devices:

Screenshots

Reproduction Link

Metadata

Metadata

Assignees

No one assigned

    Labels

    p/WPFs/needs-repro ❔This reported issue doesn't include a sample project reproducing the issue. Please provide one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions