3

I made a styled listbox in WPF, whenever someone clicks an element or presses an arrow key in my listbox, windows plays its "select sound".

This is not appropriate in this specific listbox, how can I disable it? Or how can I disable all the "default sounds" / system sounds that my WPF application makes?

Riki
  • 1,776
  • 1
  • 16
  • 31
  • 1
    I've never heard WPF play a sound when selecting an item in a listbox. – Lynn Crumbling Sep 05 '17 at 01:23
  • 1
    @LynnCrumbling its the normal windows selection sound. if you go to your sound settings you can turn them off there. I don't want to modify the users sound preferences though. I just dont want my own program to not play the sound in the first place if possible. – Riki Sep 05 '17 at 01:32
  • 1
    Please create a github/gist and share your XAML/C# code. We're shooting in the dark otherwise. – Alex Sep 05 '17 at 12:34

2 Answers2

1

After a lot of searching and trying to reproduce it in a test application; I figured out that it was actually a Frame control that caused the sound. I found an answer here Turn off navigation page sound in WPF Frame control

However that didn't work on all computers I tested it on. I'm replacing the Frame with a Border now since I don't need navigation.

Riki
  • 1,776
  • 1
  • 16
  • 31
0

Try using itemscontrol. That doesn't provided select item functionality. If you require that then select sound should be there by default.

Mahesh Malpani
  • 1,782
  • 16
  • 27