I am going to develop my own window where I'll have my own Caption Buttons
(Minimize, Maximize, Restore and Close) and all the properties related to these
buttons and can add any control at the title position of the window.
Suggest me the way how I’ll proceed for it please……
Thanks in advance
My suggestion is NOT to do it. This is not needed in WPF.
Simply change the Window template and you’ll get what you ask.
Edit:
Here is an example.
You need the 3 images for the min / max / normal / close buttons (referenced in the images as Images/min.png, Images/max.png, Images/normal.png, Images/close.png).
Compiling the resource dictionary gives a MyNamespace.StyleWindow class which you can complement with event handlers:
This resource should be globally available. You can reference it in XAML like this:
…
In my project, the designer tended to choke on this reference (maybe because it was a WinForms project with a main body made up of WPF elements). Because of this, we had to set the style programmatically, in the code-behind, in the window constructor:
Style = (Style) FindResource(Constants.DEFAULT_WINDOW_STYLE);
with a constant declaration with the value “WindowStyle”.
Here is the result (I apologize for the empty content, but it is confidential):

I did not say it was pretty…