Hi,
Over the past few weeks I have been learning WPF and messing around inside of Visual Studio writing XAML.
I have some questions as I am struggling to understand a few concepts, first I will explain my goal/objective.
I am looking to create a simple prototype user interface with all the generic offerings a usual user interface has. The prototype UI is for a game engine and I am only working on the prototype for the UI and not the actual tools or rendering technology. I have a list of things that I want to create for the user interface such as, top level menu (file, edit, etc). A custom caption bar (game engine's logo, minimize, maximize, shutdown buttons, etc.)
Here is a mock up I have create:
Now that I have explained my objective I will continue on with the questions :D
I am looking to create all the elements you can see in that above screenshot, I am pretty new with XAML but I do have experience with HTML and CSS and feel pretty comfortable with XAML.
I would like to ask about Control Templates as I have read over and over on MSDN about them and feel that I am not understanding the concept properly. I thought that a Control Template when used in a Style simply allows you access to a controls properties to give you the ability to change the look and feel of a control but still maintain it's core functionality. I must be missing something because each and every time I create a Control Template for a control it seems that I have to start from scratch and add all the elements that make that specific control functional.
I have been creating a Menu with MenuItem's using a Control Template in a Style which is in a Resource Dictionary and the Menu and MenuItem's do not work the way I would expect them to work and I keep getting advice on the forums about things I've missed out in my Control Template which is the reason my control isn't working. I don't really want to modify that deeply, all I want to be able to do is modify the Style of a control, things like the corner radius of a button, what color that button is, what color it changes to when you hover or click on it, same thing for a menu and the menu item's. The only complicated aspects to my user interface is the dockable windows you see in the mockup. I want the user to have the ability drag those and drop them around certain points of the screen and have the window stretch and scale to give a preview of what it would look like if the user did release the mouse and drop the window in that position (very similar if not exactly the same as how draggable windows work in Unreal Engine 4).
Firstly though I would like to get a better understanding on Control Templates and Styles, I have read the information available here on MSDN but when it comes to practically doing it I seem to be misunderstanding something. I want to be able to fully modify the look of a control but keep the functionality without having to add all the ItemPresenters or ContentPresenters or anything like that, if that is the only way to do though then I guess I have a lot of learning to do but, it would be great to have some clear direction on what I should be learning to achieve my objective.