Why does my lookless form break my control? RRS feed

  • Question

  • When in doubt, ask questions, right?  Well, I've made a WPF application, and to make it look really spiffy, I took the took the border off of the window to give it that "lookless" effect, as it's called.  It looks great, and I set up a little function so that I can drag and move the window around on the screen:

    void wdwCARA_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)

    That works great, too.  So I wanted to add a knob to this control...I looked online for some examples and came up with this: http://blogs.msdn.com/expression/archive/2007/10/13/rotary-custom-control.aspx.  That's great, too...it's a knob that I can drag my mouse around on with the responsiveness of something like a radio knob, air conditioner knob, etc.  Anyway, it worked great when my form wasn't "lookless"...if I put the standard border back on the form, the knob works fine.  If I take the border off, suddenly I have a very badly behaving knob...it only turns in a rather weird fashion after I click on it with the mouse. 

    There seem to be some conflicting mouse events here, but I can't figure out why.  My green skills with both WPF and C# have left me scratching my head about this one...does anyone have any helpful answers, solutions, or advice for me?  I'm begining to think I need to start from scratch and make a brand new knob...but I really liked this one!

    Thursday, October 30, 2008 10:52 PM