Now that I have started WPF, I need to rebuild and revisit some of the helpers I have built over the years.
A long time ago, back in January 2009, I wrote an article titled A custom MessageBox showing how to customize the Windows Forms MessageBox.
A few days ago, I needed a custom WPF MessageBox. Therefore, here is something to start you with if you ever need to customize your own.
You can read this new article from http://emoreau.com/Entries/Articles/2015/02/Custom-MessageBox-in-WPF.aspx.
A new free 246-pages ebook is now available from Microsoft: Fundamentals of Azure - Microsoft Azure Essentials.
Get the book details and download it from http://blogs.msdn.com/b/microsoft_press/archive/2015/02/03/free-ebook-microsoft-azure-essentials-fundamentals-of-azure.aspx
I just noticed that menus of many applications are opening on the wrong side. Have a look at the Calculator on a system not configured for lefty!
It was disturbing to me and I found why it does that. Apparently, Microsoft decided to do that on touch-capable devices. Now that I know the reason, I may understand why.
If you want to change this behavior, you can change the value of the MenuDropAlignment from the Registry (HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows) by setting it to 0.
Or if you would just like to change the behavior in your application (which is a bit strange when you compare to other apps on the same computer), you can use a little snippet like this one (taken from a C# WPF application - App.xaml.cs):
private static readonly FieldInfo _menuDropAlignmentField;
_menuDropAlignmentField = typeof(SystemParameters).GetField("_menuDropAlignment", BindingFlags.NonPublic | BindingFlags.Static);
System.Diagnostics.Debug.Assert(_menuDropAlignmentField != null);
SystemParameters.StaticPropertyChanged += SystemParameters_StaticPropertyChanged;
private static void SystemParameters_StaticPropertyChanged(object sender, PropertyChangedEventArgs e)
private static void EnsureStandardPopupAlignment()
if (SystemParameters.MenuDropAlignment && _menuDropAlignmentField != null)
I just published a new article about one of my latest experience and deception.
How come legacy MDI style application are not easily available out of the box for a WPF application?
If you are interested in this scenario (and to find out solutions), have a look at http://emoreau.com/Entries/Articles/2015/01/MDI-Style-in-a-WPF-application.aspx.
I just watched a quick video made by the awesome Scott Hanselman.
This video is about properly using tabs in Word.
If you want to learn how to use them correctly, spend a little 18 minutes watching http://www.hanselman.com/blog/VIDEODoYouReallyKnowHowToUseMicrosoftWordThePowerOfTabsAndIndents.aspx
I have been running Windows 10 build 9879 (the first public preview version) for quite some time on a secondary laptop. It ran pretty well.
Lately, Microsoft made available build 9926. I went to my upgrade settings to get the new build. It installed correctly (takes very long time). It restarted automatically to complete the upgrade and I was able to see the new build version at the bottom left of my screen. I was an happy guy.
All of a sudden, without touching anything, there was a message on the screen that the laptop needed to reboot to finish the upgrade. After the restart, I was back to build 9879. A roll back occurred without even asking me!
A few days later, retried the upgrade. Same scenario happened. The upgrade ran correctly (takes very long time), restarted and boom, ... rolled back.
I finally found a way of having a stable latest build: I have downloaded the ISO from my MSDN account and everything now runs smoothly.
So don't loose your time and your patience trying the upgrade. Download the ISO and you will be another happy previewer!
On January 12 2015, I will be doing a session (in French) on building fluent interfaces for your own classes.
I you are in the Montréal area that night, come and see me.
More details at http://www.meetup.com/msdevmtl/events/219117273/
The MSDEVMTL community has set a full day event which will be held in Montréal on February 7, 2015.
The day will be on topics related on using SQL technologies with Azure.
The full day is free to regular members (and anybody can become a member by paying a small fee of 25$ covering all regular events of the community for a full year).
To register and for the complete schedule, visit http://www.meetup.com/msdevmtl/events/219284691/
Je vous souhaite mes meilleurs vœux pour l'année 2015.
I wish you all the best for the new year 2015.
I hope that you are aware that Christmas is just in a few days!
I also hope that you all know the Microsoft Virtual Academy (MVA).
So if you have some free days in the next weeks, why not use these days to get some training from this great source? MVA offers a wide collection of courses like these one: