Playing a sound in Silverlight with MediaElement and Caliburn Micro
问题 How can I play an MP3 in Silverlight using Caliburn Micro? The MediaElement's "play()" method needs to be executed based on a boolean variable in the ViewModel. Thanks in advance! 回答1: Use an IResult. sample code Edit: based on a Boolean value, if you describe the scenario of this I can alter the sample. View: <Grid> <MediaElement AutoPlay="False" Source="../Assests/Kalimba.mp3"></MediaElement> <Button x:Name="Play" Content="Play" Height="50" Width="150" /> </Grid> ViewModel: public class