I have made some good progress here...The below Code works great....it shows the video and has the pause, stop and play buttonBUT I want to move the code to a MapTip....As Soon AS I do that the video still plays BUT the code on the buttons NO Longer works....
<Grid>
<Canvas>
<MediaElement x:Name="mPlayer" Width="640" Height="480" Source="/Videos/halo.mp4" />
<Button x:Name="bPlay" Background="Green" Width="100" Height="45" Canvas.Left="8" Canvas.Top="497" Content="Play" Click="bPlay_Click" />
<Button x:Name="bPause" Background="Yellow" Width="100" Height="45" Canvas.Left="112" Canvas.Top="497" Content="Pause" Click="bPause_Click" />
<Button x:Name="bStop" Background="Red" Width="100" Height="45" Canvas.Left="216" Canvas.Top="497" Content="Stop" Click="bStop_Click" />
</Canvas>
</Grid>
Private Sub bPlay_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
MessageBox.Show("Playing")
mPlayer.Stop()
mPlayer.Play()
End Sub
Private Sub bPause_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
MessageBox.Show("Pausing")
If mPlayer.CurrentState = MediaElementState.Paused Then
mPlayer.Play()
Else
mPlayer.Pause()
End If
End Sub
Private Sub bStop_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
MessageBox.Show("Stoping")
mPlayer.Stop()
End Sub
Why does the code on the buttons below stop working when its placed in a Map Tip?The video still plays but the code that is on the buttons to pause, Stop and PLay no longer works...????????I get the messagebox returns in the VB code seen above....so I know that the button click is getting me there and reading the code, thus returing me an alert...but the action on the mPlayer is not working in the code....Maybe because its buried in the Map Tip?????
<esri:FeatureLayer ID="M_Stops" Visible="False"
Url="http://gi/arcgis/rest/services/MG_Test/MapServer/8"
Renderer="{StaticResource UniqueRenderer}">
<esri:FeatureLayer.OutFields>
<sys:String>ELEM_TEXT</sys:String>
<sys:String>Route</sys:String>
<sys:String>Location</sys:String>
</esri:FeatureLayer.OutFields>
<esri:FeatureLayer.MapTip >
<Border esri:GraphicsLayer.MapTipHideDelay="00:00:01.5" CornerRadius="10"
BorderBrush="#FF222957" BorderThickness="0" Margin="0,0,15,15">
<Border.Background>
<LinearGradientBrush EndPoint="1.038,1.136" StartPoint="0.015,0.188">
<GradientStop Color="#FFD1DFF2"/>
<GradientStop Color="#FF092959" Offset="0.946"/>
</LinearGradientBrush>
</Border.Background>
<Border.Effect>
<DropShadowEffect ShadowDepth="10" BlurRadius="14" Direction="300" />
</Border.Effect>
<Grid>
<StackPanel Orientation="Vertical" Margin="10,10,0,10" VerticalAlignment="Center">
<StackPanel Orientation="Vertical">
<!--<Grid>-->
<!--<Canvas>-->
<MediaElement x:Name="mPlayer" Width="225" Height="300" Source="/Videos/halo.mp4" />
<Button x:Name="bPlay" Background="Green" Width="100" Height="45" Canvas.Left="8" Canvas.Top="497" Content="Play" Click="bPlay_Click" />
<Button x:Name="bPause" Background="Yellow" Width="100" Height="45" Canvas.Left="112" Canvas.Top="497" Content="Pause" Click="bPause_Click" />
<Button x:Name="bStop" Background="Red" Width="100" Height="45" Canvas.Left="216" Canvas.Top="497" Content="Stop" Click="bStop_Click" />
<!--</Canvas>-->
<!--</Grid>-->
</StackPanel>
</StackPanel>
</Grid>
</Border>
</esri:FeatureLayer.MapTip>
</esri:FeatureLayer>