Stigma
Stigma

Reputation: 1736

Scroll wheel bugged in WPF applications

I have an issue that on one computer applications developed using the Windows Presentation Foundation have my scrollwheel all inverted. I scroll 'upwards' and the control in question will go down. And vice versa. Other programs are not affected and scroll just fine.

I have searched a lot, but I can't seem to figure out what might be causing it. I am using W7 64-bit.

Things I have tried or might be useful to know...

Anyone have any clue what setting is hiding where that's messing my WPF applications up like this?

Edit:

The following, when put on a populated listview, gives the correct message (down for down scroll, up for up scroll), yet it will still scroll in the wrong direction. What the hell?

private void listView1_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
{
    if (e.Delta < 0)
        textBox1.Text = "PREVIEW DOWN WE GO.";   // no we end up going up :(
    else
        textBox1.Text = "PREVIEW UP UP UP.";     // big letdown here.
}

(The plain MouseWheel event won't fire, hence the preview variety.)

Upvotes: 1

Views: 1147

Answers (2)

Stigma
Stigma

Reputation: 1736

Holy crap, I just figured it out. It suddenly hit me.

I have me Mouse wheel set to 'scroll one screen at a time'. I never thought anything of it despite going over that window a dozen times looking for an 'invert scroll direction' option I might have checked.

Setting the setting to scroll a given number of lines per notch on my wheel fixes the scrolling, although I don't get my expected paging.

This is plain buggy coding on Microsoft's part. First I spend half a day searching the internet for TextOptions.TextFormattingMode="Display" so my forms don't look like total crap, then I spend a small eternity on another issue which thankfully had a simple setting suffice as well. And now this. Am I just hitting all those little roadbumps nobody else seems to hit or care much about? :/

(Apologies for answering my own question again, kind people. I've done it the last few questions despite searching for answers on the matter for hours. Ugh.)

Upvotes: 2

basarat
basarat

Reputation: 276303

There is absolutely no reason for this to happen. Have you tried running the problematic application on other computers.

Upvotes: 1

Related Questions