But unfortunately I get another problem... The alignment of the text. :(
Just for fun, the font change will mess with text spacing and layout.Um, yeah, it breaks. After I discovered the Flatstyle thing I had to shuffle everything in my UI around a bit. Settle on a Font size first - I compared my window' fonts etc. to the Properties Palette in AutoCAD ie. I NETLOADed it and ran it.
I didn't use the Font setting in the constructor...Me neither, it totally messed up the layout.
Maybe it's time to seriously dive into WPF...I don't like to rush into these newfangled things ... ;) Yeah, next time. My current project suits the winforms look and feel... Right up until I change my mind.
I don't like to rush into these newfangled things ... ;) Yeah, next time. My current project suits the winforms look and feel... Right up until I change my mind.
There is no look and feel that you get in WinForms that you cannot get better in WPF. Write one WPF application, I suggest going ahead and adopting MVVM at the same time if you're not using it, and you'll never use WinForms again.
There is no look and feel that you get in WinForms that you cannot get better in WPF. Write one WPF application, I suggest going ahead and adopting MVVM at the same time if you're not using it, and you'll never use WinForms again.
Replacing it with WPF won't be particularly hard.So I did. Well, I'm still in the process of doing so. I wrote Windows.Forms extension method that goes through all your controls on a Windows form and vomits out some XAML that you can edit and get back to where you started. It's still a bit rough but it's at https://gist.github.com/CADbloke/0a3121af11c1d46f34c9
At a glance, if this is for more than converting this one project then your default container should be a Grid not a StackPanel. It's a neat idea but if you already have the look of the UI from your windows form. Then you can probably scratch this out manually in less time than it took to create this utility. Nice work though.
Besides, I'm getting faster at typing INotifyPropertyChanged;
At a glance, if this is for more than converting this one project then your default container should be a Grid not a StackPanel. It's a neat idea but if you already have the look of the UI from your windows form. Then you can probably scratch this out manually in less time than it took to create this utility. Nice work though.
Changing container types is an easy right-click in Blend so I wasn't overly concerned about the actual type. Also, a Grid needs row & columns defined and figured out which would involve figuring out exactly where the controls lie on the Windows.Form - boring! In a StackPanel or similar you can just drag them around in the Tree in Blend. You should have seen the mess when I tried using Canvas and placing everything absolutely. Don't go there.
The utility was a good exercise in why Windows.Forms doesn't translate directly into WPF. HTML + CSS is a close analogy.
For bonus point I managed to get Caliburn.Micro working in a Palette control. It works but I'm not sure I'll stick with it, the project isn't that big and the convention-driven indirection makes me think too much. Besides, I'm getting faster at typing INotifyPropertyChanged;
Cadbloke can you help me out with Caliburn micro I have a big WPF project trying to get into a tool paltete. For some reason I can't get the configure () proceedure to fire.