Is there written documentation on creating UI for Windows with Swift?

Hi all,

Looking to start porting some of my projects to Windows as a little experiment. As far as I can tell, the only examples on Windows UI being used is the calculator project from the blog post. Is there a written doc on it somewhere or more examples? The calculator kind of went over my head haha

@compnerd

Hi @ModernEra,

What type of documentation are you looking for? There is no doc on the project, it is a personal project of mine. But if there are specific things that you think would be useful to add documentation for, I could try to write up something for that.

There are a couple of example programs in the same repository, but I think that the calculator demo might be simpler than anything but the empty application entry point stub.

Hey @compnerd, thanks for getting back to me.

I'm very new to programming in general so a lot of the things in the examples were confusing for me.
This project is very impressive and I understand the lack of necessity for specific documentation, as it is a personal project.

A small doc detailing hooking into the Windows UI system would be more than enough to get me going, or just any tips in general. I'm used to using Storyboard in XCode and XAML with VS, but the examples listed seem to use something else, unless I'm mistaken.

What exactly do you mean by hooking into the UI system? There is no one UI system, and they are all interconnected in some ways but completely disjoint in others. The tips in general, again is overly broad - tips in general, I would say is best covered as: MSDN is a fantastic resource for documentation on the various subsystems that are involved here.

I think that this is what you might really be after. There is no current equivalent to any of that. There is no UI designer, the UIs are built programmatically. I was looking at the XAML hosting APIs for WinUI integration from Project Reunion. However, I ended up not going too far down that route as I kept running into issues with WinUI and I could not find the implementation for the hosting container (most likely because it isn't open sourced).

I would recommend that you read through the initializer for the Calculator class to see how the controls are added to the Window, and the member variables for how the controls are actually created.

1 Like
Terms of Service

Privacy Policy

Cookie Policy