see attachment.
in The Main window I can place a button, but I cannot add an event handler....
I Use custom chrome to remove the window borders but keep the resize option.
Also when I uncomment Initialisecomponents() I get a compile error
The problem is the class name in the xaml file doesn't include the namespace that is in the code behind.
You have:
Code:
x:Class="MainWindow"
instead of
Code:
x:Class="Shader.MainWindow"
You have several options to add a button handler, one is to press the space bar after clicking in a space inside the button declaration in the xaml file. When you press the spacebar, the intelli-sense will give you a list of items to choose from. Choose the Click item and then press the TAB key add a handler in the code behind.
Now keep in mind that this is the simple way to add a handler, but in WPF you probably really want to learn the MV-VM approach and use command bindings. You can get a great introduction to MV-VM pattern here: http://msdn.microsoft.com/en-us/magazine/dd419663.aspx
But honestly, learning WPF isn't something you can poke around in and pick up (or pick up correctly as you've found out). I'd suggest getting a book on WPF or at least spend time doing some online tutorials.
One thing to understand is the editor in VS for WPF is like going back in time as compared to the WinForms editor. If you expect that experience, then you will be disappointed. On the other hand, once you understand WPF, you will find its binding features and customization abilities to be way ahead than WinForms (so it's lack of great editor support isn't going to matter much).
The namespace issue did the trick, everything is working as it should.
But there is one little thing 'missing'.
The Dropshadow is not avail anymore, I'm unable to draw outside the window/client region.
So How can I make the drop shadow visible again? It can be done see the windows of VS2012 and outlook 2013.
The Dropshadow is not avail anymore, I'm unable to draw outside the window/client region.
So How can I make the drop shadow visible again?
If you started out with the drop shadow, what did you do to make it go away? Perhaps you removed it when you changed the code that caused the full namespace to change?
I do the custom window step by step.
I wanted a resizeable window and dragable without the standard windows borders.
It can be done with 9 routines. 1 for dragging and 8 for the resize that is 4 for the sides and 4 for the corners.
But that is like inventing the wheel, so with the use of the shell lib. we can achieve this.
So the next step is to implement the dropshadow or Glow, which one does not matter.
Just like the standard windows have.
If I add a dropshadow to the window in design view (blend) I can see it, as soon as I run the the app, it is gone.
If I look at the 'rules' of xaml windows I see that I'm not allowed to draw outside the client area.
But like the resize issue, there has to be a way, as office is using it. VS2012 and the game installer from Steam usses it.
The big question is what is the 'magic call'.
Most publications on XAML and/or WPF, if not all, do not cover this. As it is beyond scope
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.