Skip to content

HostingWindowsProcessDemo cannot run on Avalonia higher version #1

@ghost

Description

@npolyak Hello, I came here from this article Embedding Native…… , thank you very much for your amazing demo, however, when I try to upgrade HostingWindowsProcessDemo from Avalonia 11.0.0-preview4 to 11.0.6 and any version, I get the error:
CS0122 "IWindowBaseImpl.Handle" is not accessible because it has a certain protection level
WinApi.SetParent(ProcessWindowHandle, ((Window)e.Root).PlatformImpl.Handle.Handle); in EmbeddedProcessWindow.cs

I mainly saw that you mentioned in the article:
Note that both the article and the samples code have been updated to work with the latest version of Avalonia - 11.0.6

Is there something wrong with my operation or is this method unable to run in the higher version of Avalonia? If it is the latter, is there an alternative method? Sincerely thank you.
(By the way, I tried reflection and it didn't work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions