Click here to Skip to main content
15,879,535 members
Home / Discussions / WPF
   

WPF

 
QuestionWpf button problem Pin
Eric Vonjacson21-Apr-09 2:00
Eric Vonjacson21-Apr-09 2:00 
AnswerRe: Wpf button problem Pin
Pauwels Bart21-Apr-09 2:47
Pauwels Bart21-Apr-09 2:47 
QuestionSplitContainer in WPF ? Pin
Mohammad Dayyan20-Apr-09 22:23
Mohammad Dayyan20-Apr-09 22:23 
AnswerRe: SplitContainer in WPF ? Pin
RugbyLeague21-Apr-09 2:01
RugbyLeague21-Apr-09 2:01 
GeneralRe: SplitContainer in WPF ? Pin
Mohammad Dayyan21-Apr-09 2:07
Mohammad Dayyan21-Apr-09 2:07 
AnswerRe: SplitContainer in WPF ? [modified] Pin
Weifen Luo10-Jul-09 13:28
Weifen Luo10-Jul-09 13:28 
Questionsount control slider Pin
yogesh_softworld12320-Apr-09 8:11
yogesh_softworld12320-Apr-09 8:11 
AnswerRe: sount control slider Pin
BlitzPackage22-Apr-09 5:33
BlitzPackage22-Apr-09 5:33 
Greetings,

Create a handler for the slider value changed event. Then in that event handler, set the sound volume of your player. Of course, make sure that whatever values you use in the slider correspond proportionately to the sound volume of your audio player.

I am doing the same thing in my project and here is the code I use:

<pre>
private void OnSliderMusicVolumeValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
if (myMusicManager != null)
{
myMusicManager.Volume = SliderMusicVolume.Value;
}
}
</pre>

myMusicManager is just the name I gave to a class that wraps the wpf media player. Below is where I get and set the volume using the appropriate conversions.

<pre>
public double Volume
{
get
{
return myMusicPlayer.Volume * 10; // myMusicPlayer is the actual wpf media player
}
set
{
myMusicPlayer.Volume = (value / 10);
}
}
</pre>

I hope this helps, let me know if you have any more questions.

Blitz
AnswerRe: sount control slider Pin
sivaddrahcir24-Apr-09 12:58
sivaddrahcir24-Apr-09 12:58 
QuestionChat application in wpf using TCp/IP Pin
JS 200820-Apr-09 5:22
JS 200820-Apr-09 5:22 
AnswerRe: Chat application in wpf using TCp/IP Pin
Ray Cassick20-Apr-09 5:42
Ray Cassick20-Apr-09 5:42 
GeneralRe: Chat application in wpf using TCp/IP Pin
JS 200820-Apr-09 17:48
JS 200820-Apr-09 17:48 
QuestionWPF ComboBox Pin
mark_w_20-Apr-09 5:02
mark_w_20-Apr-09 5:02 
AnswerRe: WPF ComboBox Pin
Insincere Dave20-Apr-09 16:30
Insincere Dave20-Apr-09 16:30 
GeneralRe: WPF ComboBox Pin
mark_w_20-Apr-09 22:11
mark_w_20-Apr-09 22:11 
GeneralRe: WPF ComboBox Pin
mark_w_21-Apr-09 0:08
mark_w_21-Apr-09 0:08 
AnswerRe: WPF ComboBox Pin
Mark Salsbery21-Apr-09 6:13
Mark Salsbery21-Apr-09 6:13 
GeneralRe: WPF ComboBox Pin
mark_w_21-Apr-09 22:33
mark_w_21-Apr-09 22:33 
QuestionAnalog CLock in WPF Pin
kiemchung20-Apr-09 0:57
kiemchung20-Apr-09 0:57 
AnswerRe: Analog CLock in WPF Pin
Pete O'Hanlon20-Apr-09 1:32
mvePete O'Hanlon20-Apr-09 1:32 
QuestionThrowing videos using Silverlight Pin
pavanip19-Apr-09 20:24
pavanip19-Apr-09 20:24 
AnswerRe: Throwing videos using Silverlight Pin
Michael Sync23-Jul-09 20:47
Michael Sync23-Jul-09 20:47 
QuestionCFormView in WPF Pin
Member 377636719-Apr-09 18:13
Member 377636719-Apr-09 18:13 
AnswerRe: CFormView in WPF Pin
Pete O'Hanlon19-Apr-09 21:52
mvePete O'Hanlon19-Apr-09 21:52 
QuestionPerformance - Memory Usage Pin
Jammer19-Apr-09 9:24
Jammer19-Apr-09 9:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.