Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ example is awful #7

Open
sylveon opened this issue May 22, 2019 · 2 comments
Open

C++ example is awful #7

sylveon opened this issue May 22, 2019 · 2 comments

Comments

@sylveon
Copy link

sylveon commented May 22, 2019

The example tries to show me how to wrap window behavior in a class, which I already know how to and I already did in my code base: I'm trying to integrate Xaml Islands to an existing application, not trying to undo your abstractions so that I can understand what is going on (it hides important behavior in base classes split around the whole code base - the main part of getting Xaml Islands working, creating a DesktopWindowXamlSource, isn't even in the file with the entry point)

It doesn't explain design decisions: why use an event revoker for an event which literally just changes a text label's content???

Thought you could run it to understand it better? Too bad for you (after you've figured out how to make a self-signed certificate, of course, because none is included in the repo and VS isn't smart enough to generate a new one on its own, instead redirecting you to some PowerShell commands with arcane parameters):
image
image
(trying to launch the SampleCppApp directly instead project gives you a module not found hresult exception)

The examples should be kept to minimal changes from the base vs project for a win32 desktop app, and have the whole code in 1 or 2 files. Custom controls in such an example would be fine, because it's ignorable when trying to get the base stuff running.

@MarkIngramUK
Copy link

@sylveon , I took the liberty of making a trimmed down example that demonstrates the basics required for setting up Xaml Islands with Win32 and C++. Feel free to let me know how you get on with it.
https://github.com/MarkIngramUK/XamlIslands

@tomaszkot
Copy link

tomaszkot commented Nov 2, 2022

Did anyone manage to get SampleCppApp working ?

I hoped the trick mentioned there - namely adding
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain> to the proj would do the job, it it's not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants