Wallace Kelly

writes about F#, WPF, async, and the like.

WPF menus that go up

I needed a menu docked to the bottom of an application's window. Docking to the bottom of the window is no problem. However, it did not work well, because by default, WPF menus drop down. I needed it to drop up.

I need behavior like the Windows Start menu when it is docked on the bottom of the Windows workspace. I looked for a PopupDirection or some such property -- no luck.

I found a solution.

Using Blender, edit a copy of a menu's ItemContainerStyle. The default style has two Popup elements with a Placement property. Placement = "Top" is a valid option.

MAGE.EXE and the Certificate Store

I need to sign a ClickOnce manifest using mage.exe. The certificate is in the Windows Certificate Store. How do I do that?

Read more...

WPF ViewModel of an F# Record

How does one expose an F# record in a WPF view model? My F# code uses immutable records. But, I need to bind those records to a WPF user interface in a view model. What is the right way to do that?

Read more...

Script for adding and removing the ClickOnce .deploy extension

I was recently debugging a ClickOnce deployment. I needed a way to quickly add and remove the *.deploy extension from all the files in a deployment folder. Well, not all the files. The *.manifest file is treated differently.

Read more...

Calculating nice chart axis ranges

I was working on a project that required calculating nice ranges for chart axes. I found a useful discussion here.

Here is what I used in C# and so far it is working adequately.

Read more...

WPF menus that go up

I needed a menu docked to the bottom of an application's window. Docking to the bottom of the window is no problem. However, it did not work well, because by default, WPF menus drop down. I needed it to drop up.

Read more...

Subscribe