Custom Title Bar Buttons in WPF - wpf

I'm completely new to WPF, and am currently learning how to use styles and templates. Today, I saw many projects that can tweak the title bar of the window. Most of them probably tweaked the window chrome to achieve that effect. However, I'm trying to create a title bar with Mac-like Close, Minimize and Maximize buttons. I want them rounded with 3-D Colored effects. I have scoured the internet for that style, but in vain. Could anyone tell me how to achieve that effect using WPF with VB.Net?
P.S. I am using VS2010, and don't have MS Blend.

Related

Which layout to use for desining UI in wpf components?

I'am learning wpf. As a part of learning I'm converting a winforms application into a wpf application using mvvm.
In winforms I just dragged and droped. After that I aligned based on my requirement.
But in WPF when i drag and drop a default grid is wrapping the components and I'm facing great difficulty in aligning the components.
On learning the tutorials on wpf https://www.tutorialspoint.com/wpf/wpf_layouts.htm
I tried to work with but I don't know which is suitable for my UI.
I want to create UI in wpf as below winform
I have used grid and stackpanel but I have issue with alignment. In grid I have issue with adding new elements in the existing row. In stackpanel I face issue with spacing between the components and aligning the compnent.
Can anyone help me on which panel to use for the above kind of UI.
In general you don't use editors for WPF, you edit the layout XAML by hand and use the visualizer as a guide to show whether or not you've done it right. The Visual Studio editor does let you do things like basic layout, but as soon as you start using ControlTemplates/DataTemplates/Behaviours etc you'll quickly find that it's useless (and believe me, that moment will come much sooner than you think). If you really want to use a graphical editor then Microsoft Blend is your best bet, but even that is generally designed for non-programmers. In fact, in the 10+ years I've been a professional WPF contractor I've yet to encounter a single company that actually uses Blend...or indeed any other GUI-driven XAML editor...for their product development.

What should I implement for a small popup control in a VSTO project?

In my VSTO projects (Office 2007 / 2010) I would like to use a small popup control (think Tooltip like features; fade animation and mouse interaction).
I would prefer to use WPF. If I were to do this in WPF I would create a custom Popup Control.
In VSTO, as far as I understand it, I must use a WPF window and then have 2 options, either I put this window in a Windows Form Container or I get the Hwnd of my office app and I add this Hwnd to the Owner property of a WPF Window. Am I correct here?
Creating a whole window, animating it on and off the screen etc to look like a ToolTip seems to be overkill.
So my question is how should I do this. I would prefer WPF.
I don't know if this would work but my first thought is to build a very tiny WPF window which is transparent and start it with the Office App. I can then build a Popup Control (which is a child of this tiny window) which I show and not show at a mouse position. Pretty sure a popup can appear outside the bounds of its parent window.
Just wanted to tidy up my own question with what I did. In the VSTO addin project I added a reference to WindowsBase, PresentationFramework and presentation core.
And then I just follow any tutorial or example that adds a WPF Popup. By popup I mean a System.Windows.Controls.Primitives.Popup. For the Placement I used PlacementMode.Absolute and then used a window point to set its position.
This pretty much answers my question. Of course this popup is literally floating above your office window so you will need to make sure that you control it for example if the office window moves, is minimized and the like.

How to get button default style under windows 10?

Looking to my first steps with WPF on Windows 7 I was very pleased. Seeing it on Windows 10 I was very surprised. The buttons didn`t looks like expected. Trying it with WinForms results in the expected look an feel.
Here my problem:
So my question:
How can I get the "normal" style of the default button (OK has IsDefault=true) with the expanded blue border for the button even when it has focus, without defining the button-style myself?
This is very important in case of setting the focus to the Cancel-button programmatically, because in this case the dotted border will not be displayed, so on Win 10 the user can not know witch button will be pressed by enter.
You can get similar button styles using Windows UWP.
In WPF, you can check out the Modern UI(MUI) in MSDN site.
It can produce similar results. I have been working with mui for a couple of months and it really helped me to satisfy my client who wanted to have a Windows 10 like UI experience. I had to create tiles like in start menu also. MUI did a great job for me.
Get the MUI from Github. Modern UI for WPF
Also I had tried devexpress and telerik controls. Have a look at them too.

Image Control disapear after it's dragged in Design

I'm a WPF newbie and, unlike WinForms, I have a hard time to setup things in the design window.
My first obstacle is the Image control. After I drag it in the Design window it disappears and there's no way for me to edit its properties (like with the button control for example). The only way to make changes is via the XAML code which isn't very visual and intuitive.
Is there a way to keep editing the Image control in design mode? (example, move it around, select it to view its property panel, etc.)
All you should need to do is give the image control a fixed height and width and it should stay in the designer.
The best thing about the XAML is which separated from code for better re usability like asp.net. It's best you to learn different layouts such as grid, wrappanel, stackpanel etc. Then, you will feel the power of xaml. Else, you can choose the XAML building tools.
Link to refer

Silverlight-like transition effects in WPF?

I have seen packages like MahApps (http://mahapps.com/MahApps.Metro/) which will allow WPF programs to have the look and feel of Metro.
I've also seen some pretty good looking Silverlight programs created with that Metro theme in mind. For example, when you click a button a panel will slide/transition out over the time span of about a quarter of a second (I don't mean just a simple fade in, I mean the panel physically moving across the screen until it is at full size). My understanding is that this is achieved with storyboards.
My question is whether it is possible in a WPF application to do these sort of transition / visual effects? Or is it something that is strictly in the realm of Silverlight?
Thanks
There is nothing to prevent you from doing these transitions in WPF.

Resources