Skip to content

DialogHost is deprecated but setting DialogHostEx throws because DialogHost is not set #1687

@TheJoeFin

Description

@TheJoeFin

Describe the bug

There seems to be an issue where DialogHost of a content dialog is deprecated, but the new solution of DialogHostEx does not work when I replace it.

To Reproduce

dialog.DialogHost = Presenter;

See deprecation warning

However

ContentDialogService dialogService = new();
dialog.DialogHostEx = dialogService.GetDialogHostEx();

returns a runtime error.

Expected behavior

Either the deprecation warning to go away, or the new way of setting DialogHostEx to work without crash.

Screenshots

No response

OS version

Windows 11 26100.1.arm64

.NET version

net10

WPF-UI NuGet version

4.2.0

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions