is it possible to make a button click event open a window? if so how should i do this? i mean a window that has already been created and marked up, im using wpf and am a staring programmer with not so very much knowledge of the language
1. You have a WPF project and It already has a window. You are able to run this application.
2. Now you right click on the project and Add new Window. You name it MyNewWindow.xaml
3. You would now notice MyNewWindow.xaml and MyNewWindow.xaml.cs added to your project. (the class name for the window would be MyNewWindow which is in the .xaml.cs file and it derives from Window; also a partial class)
4. Open the XAML file for the MyNewWindow (MyNewWindow.xaml) and add your controls. Treat it like any other window and write code.
5. Now in your main window (the first one) you add a Button which when clicked should show the newly created window.
For that inside the Click handler, ....
var newWindow = new MyNewWindow();
This would create a new instance of the MyNewWindow and shows it to the user. It would appear just as you designed in your XAML.
If this is an issue, let me know so that I will upload a sample application and link you with it.
I am having trouble with my program its solving expressions and when I compile it I get a "Illegal start of expresson" line in my output. I am ...
I'm hoping for some help with a regex that has me stumped. My skill with regex is rather rudimentary.
To start, here are a couple of example URLs, and ...
The purpose of this question is to calculate the three cubic roots of a complex number.
A complex number is of the form a + ib where i is √−1. ...