<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
<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>
<MediaElement x:Name="mediaEle" Height="225" Margin="10,0,20,0" Source="{Binding [Video]}" Width="300"></MediaElement>
<MediaElement x:Name="mediaEle" Height="225" Margin="10,0,20,0" Source="{Binding Attributes[Video]}" Width="300"></MediaElement>
<StackPanel Orientation="Horizontal"> <Button x:Name="btnShow" Click="btnShow_Click" Height="25" Width="50" Content="Load Media"></Button> <MediaElement x:Name="mediaEle" Height="150" Source="/Videos/halo.mp4" Width="150"></MediaElement> </StackPanel>
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.