How to disable windows sounds in WPF listbox?

430 views Asked by At

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?

2

There are 2 answers

0
Riki On BEST ANSWER

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.

0
Mahesh Malpani On

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