[.NET] Advanced Customisation Options with Visual Studio
Moxo QuickWeb Studio's .NET development leaves the user with a Visual Studio project, rather than a built and finished application. This means that the building and deployment of the application is up to the developer. Because of the nature of this development method, the application can be further customised using C# and .NET from within Visual Studio, before - or after - being built and deployed.
For example, you can use Visual Studio to add additional buttons to the menu, or delete buttons from the menu. We do encourage you to familiarise yourself with the license agreement, as some UI elements and disclaimers must not be removed from your project.
Contents Quick jump to parts of this document:
- Editing, Adding and Removing Menu Items
- Editing Existing Menu Items
- Creating new Menu Items
- Changing the Web-App URL
From the tab, you should see a preview of your application. This will include the WebView2, which is where your web-app will be displayed along with the menu bar and menu items, such as Refresh, Back and Forward.
There are many properties for an item, but some of the ones you may want to adjust include:
|The background colour for the button
|Specifies whether the button includes an image or just text.
|Specifies whether the button is enabled and accepts the user clicking on it.
|The font used on the button
|Segoe UI, 9pt
|The colour used for the text of the button
|The image that will be displayed on the item
|Specifies the spacing between this item and adjacent items and UI elements.
|15,1,0,2 (Left, Top, Right, Bottom)
|The text that appears on the bottom.
|Specifies where the text is aligned to, on the button
|Specifies where the text appears in relation to the image (if any)
To edit the text of a button to "Go Back" instead of "Back", simply click the "Back" button and chance the "Text" property to "Go Back".
In addition, you can also specify actions with code for when the button is interacted with. To do this, click on the Events button, which appears as a lightning bolt. You can then double click in the text box to auto generate an event, or type a name for it and hit enter. This will take you to the code file, where you can write custom code for the event. By default, the included buttons should have an "Click" Event.
The code for a click event on a "Back" button is as follows:
private void UI_Button_Back_Click(object sender, EventArgs e)
//If the WebView is capable of going Back, Execute GoBack();
if(UI_WebView.CanGoBack == true)
To create a basic button, click "Button" - but you may want to familiarise yourself with Windows Forms and the .NET Framework, to learn about other buttons and how you might use them. Once you have created a button, you can click on it to view and edit its properties using the Properties panel.
Refer to the article above, "Editing Existing Menu Items" for instructions on how to edit different properties and creating and editing events for buttons.
From within the Solution Explorer, expand "Properties" and double click on "Settings.settings". This will open your settings file.
From the settings file, you will have a table that will offer you a few quick and easy settings to change.
|The name of the developer.
|Ryan Walpole Enterprises
|The name of the publisher.
|Ryan Walpole Enterprises
|The version of the application.
|The name of the application.
|My Awesome Web-App
|The URL of your web-app, to be shown.
|The height (in px) of the main window.
|The width (in px) of the main window.
To change the URL of your web-app, simply adjust the "WebViewSource" property and set the value to your new URL.
Additionally, you can use a more advanced method in which you will manually set the URL to a static URL, instead of referring to the settings file. This just means in the future, you'll be required to manually change the URL through code again if the need arises.
From the Solution Explorer, right click on Startup.cs and click View Code to open the Code File.
Then, scroll to where you find the
You'll want to change the line that says:
UI_WebView.Source = new Uri(Properties.Settings.Default.WebViewSource); and replace it, with something like the following:
UI WebView.Source = new Uri("https://my-web-app.com/");
Be sure to build and run your application to test that the new URL is working correctly.
Moxo and Moxo QuickWeb Studio are software products of Ryan Walpole Enterprises. dotLX and Code LX are products of Ryan Walpole Enterprises.
.NET and the .NET Framework, along with Visual Studio and C# are products of Microsoft Corporation.
This documentation is ©️ Copyright 2023, Ryan Walpole Enterprises. This documentation is offered as a part of the Moxo QuickWeb Studio product, to help inform users of how to perform certain tasks or utilise the software. Ryan Walpole Enterprises has made an effort to ensure that all information is accurate as of the date it is produced.
QuickWeb for dotLX allows you to run your existing web-app on Windows, natively, using the next generation of the Code LX Programming Language: dotLX. Learn More
QuickWeb for .NET allows you to turn your existing web-app into a native .NET Windows app that can be further extended and edited using C#, .NET Framework and Visual Studio. Learn More