Skip to main content

Microsoft Silverlight

Answered Question Silverlight 2.0 - NO AUDIORSS Feed

(0)

mebjen
mebjen

Member

Member

82 points

99 Posts

Silverlight 2.0 - NO AUDIO

I have just upgraded to Silverlight 2.0 and can't figure out why I can't get a simple .wma file to play either from a pageLoaded or buttonClick.

xaml code:

<Grid x:Name="LayoutRoot" Background="White">

<Button Height="48" HorizontalAlignment="Stretch" Margin="182,82,118,0" VerticalAlignment="Top" Content="My Button" x:Name="btnMine" FontSize="18" FontStyle="Italic" FontWeight="Bold" TextAlignment="Center" ToolTip="This is my Tip!!" RenderTransformOrigin="0.5,0.5">

</Button>

<MediaElement x:Name="fbAudio1" Source="audio1.wma">

</MediaElement>

</Grid>

vb.net code:

Private Sub Page_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded

fbAudio1.Play()

End Sub

 

Private Sub btnMine_Click(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnMine.Click

fbAudio1.Play()

End Sub

 

 Thanks
  mb

 

mb

mebjen
mebjen

Member

Member

82 points

99 Posts

Answered Question

Re: Silverlight 2.0 - NO AUDIO

I have figured out and corrected my problem...

 I had 'Added an Existing Item" (the wma file) to an incorrect file/folder within my project.

mb  

mb
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities