I've got 2 issues with creating a new WPF X# program.
First is probably one of the many dreadful VS issues, maybe someone knows how to prevent that. When I right click Add, New project, WPF Application (X#), the suggested project name is WpfApplication1. I change that, click Create, the namespace is now the name I've chosen but the class name looks as follows:
PUBLIC PARTIAL CLASS WPFWindow1 INHERIT Window
How can I prevent the class to be called WPFWindow1?
Now you would probably say, just rename all occurrences of WPFWindow1 with YourName.
I did. Then the program doesn't start anymore (without a visible error). In debug mode however I get:
System.IO.IOException: 'Cannot locate resource 'yourname.xaml'.'
So I want to either prevent having the wrong class name to start with or if that is not possible, rename my class and prevent or solve this stupid VS error. How can I do that?
Another issue is that when I select, in WPF XAML, Click="MyMethodName" and press F12 (goto definition) this does not work in X# (it does in C#). You get an errorbox Cannot navigate to definition.
In C# it would create the event MyMethodName with all parameters. It will almost sure be totally mislocated in the code, which is a logical result of the deficient VS design, but at least I get my method to start with.
Also when the method is created F12/Goto definition on the Click event in XAML won't work in X#.
Is that something which can be fixed?
Dick