Use a webpage as the UI in a C# desktop application?

前端 未结 6 1486
予麋鹿
予麋鹿 2021-01-31 02:39

I\'m building a C# desktop app with a simple UI. Due to my familiarity with HTML/CSS, and a previous web-based iteration of a very similar app, it would be ideal if I could re-u

6条回答
  •  清歌不尽
    2021-01-31 03:15

    You can use WebBrowser control to add Web browser functionality to your application.

    You can create your own html(s) and set your WebBrowser control to display those pages. You can navigate by clicking hyperlinks or by using keyboard shortcuts to move backward and forward through navigation history. By default, you can access additional browser functionality through the right-click shortcut menu

    You can even manage those pages centrally (for e.g. on LAN) and all clients on LAN can connect to this central location. This way you can modify pages centrally.

    Check a walkthrough on MSDN:

    How to: Add Web Browser Capabilities to a Windows Forms Application

提交回复
热议问题