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:
I cant seem to get a combobox to select a value using Binding. I have a small example that re-creates the issue, I want the combo to have selected Yellow (_colour is set to that on creation) when it first loads. Hope that makes sense
Code is below, just window1 and a class called ViewModel. TIA for any help
The way you have declared SelectedColour isn't right, you don't need a backing field as it that is done automatically. You can either call GetValue/SetValue in the property passing in SelectedColourProperty or implement INotifyPropertyChanged and raise the event in the setter (Then you wouldn't need to inherit from DependencyObject). There may be some other issues as I couldn't test the code atm.
Thanks for your reply, this was a test project and you are right i did not have the Selected Colour correct, i have changed it and it still does not work, so will look at INotifyPropertyChanged, and let you know.
That still does not do what i want, i am starting to think that i am going about this the wrong way
Put simply what i need is a combobox with a datasource of list of my objects (all the same type). Then when the form loads i want the combobox to have preselected an object of my choice (what ever was saved in xml/db)
I am new to wpf and the mvvm pattern, and this is getting a bit frustrating!!
ps for info i changed the colour class to the following as the other throw an exception
I am developing one application using silverlight and .Net.There are some videos to watch.There are some features like rotate,scaling video using silverlight.Now I want to develop feature Throw videos using silverlight like in the following site.
http://www.etsy.com/color.php?ref=fp_nav_colors.If u open that link there are some bubbles,if you click those bubles you will find some images.In that we can throw those images to anywhere. I want to develop that feature using silverlight in my site.Can please anyone help me how to do that task using silverlight and .Net.
I have a MFC dll, which one inherit the CFormView and I add a textbox in that FormView. I want to load that dll from WPF and display it in the window as a control. If anyone have an idea about this, please help me.
Why would you want to do this? It's easy enough (i.e. trivial) to do exactly this in WPF, so why would you want to go to all the trouble of adding in an external DLL to do this? BTW - I'm not the one who voted 1.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
I've just started looking into this in relation to an app I've made. It's a fairly simple app, most of the pages just have a handful of controls (the main one being Infragistics Grid) spread over a few pages. The app has been designed and implemented using Prism (Composite).
When I first launch the app I'm seeing nearly 60Mb of ram in use before the application has opened any data files. I'm currently going through the WPF Performance Suite tools to see what this shows up. Any tips would be good!
Anyone else experiencing anything like this with their apps?