Filed under .Net

WPF Radial Context Menu (Pie Menu)

I recently wanted to improve the boring context menu, a quick Google search found radial context menu (or pie menu). I couldn’t find a simple generic example so thought I would write one. Rather than write a menu I decided to write a generic radial panel that can be used to host any items, to … Continue reading

Disappearing Toolstrips

Recently I added a toolstrip that wasnt placed directly onto the main form, at runtime the toolstrip wasnt there. Everything was set to visible and docked correctly but it wasnt showing. In the end it turned out that it was a bug/feature related to the fact the toolstrip was added inside a tab control, when … Continue reading

Configuring Registry Access

Installing system wide settings under HKEY_LOCAL_MACHINE can be a problem if the user running the application has to modify the registry settings and is only a limited user (non-admin). The following code shows how a particular registry key can be configured to allow access to other permission groups. //Create an object for the registry key … Continue reading

Remote Debugging

Debugging your code using Visual Studio is an easy and useful thing to do, until you have to do it remotely, then its not so obvious what is required. After a lot of trial and error working around network access and firewalls etc these are the steps I took to get remote debugging working (using … Continue reading

Rotating Ellipses

On a recent problem I had to draw lines of ellipses across a background image, some at 45 degrees. The Graphics.FillEllipse method draws an ellipse at the specified x,y. While researching into how to rotate these using the RotateAt method I ended up not only rotating each ellipse but also the whole line of ellipses … Continue reading

ToolStrip Position Persistence

Until recently I had always added ToolStrips to a Form and set their docking property to Top, this was acceptable until I needed to move a ToolStrip. I then began using the ToolStripContainer which allows docking and the user to drag and drop the ToolStrips around the Form. This is well documented in MSDN however … Continue reading

Non-standard Toolstrip Controls

I recently had to add a .Net toolstrip I implemented a few years ago to a ToolStripContainer so it could be moved and docked, the ToolStrip had a horizontal scrollbar “placed” on it, i.e. a normal scrollbar control that has a fixed position on a certain place on the ToolStrip. This was done because the … Continue reading