locked
Pointer moved event RRS feed

  • Question

  • hi i am beginner in windows store app development . i am developing media player , windows default app video that mouse moved then slider and pause button showing and auto hiding  how that , which xaml control need to use (sample or related documentation )   .  my code is here
    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
            <MediaElement x:Name="VideoSource" HorizontalAlignment="Left" Height="768" VerticalAlignment="Top" Width="1366" AreTransportControlsEnabled="True" PointerMoved="VideoSource_PointerMoved"/>
            <AppBar Margin="0,0,0,648" Background="Transparent"  >
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <StackPanel Orientation="Horizontal"/>
                    <StackPanel Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal"/>
                    <AppBarButton x:Name="open" HorizontalAlignment="Left" Label="Open Local" VerticalAlignment="Top" Icon="OpenLocal" Margin="493,13,0,0" Grid.Column="1" Click="open_Click"/>
                </Grid>
            </AppBar>
     </Grid>

     public sealed partial class MainPage : Page
        {
            public MainPage()
            {
                this.InitializeComponent();
                this.Play();
                
                
            }
            public async void Play()
            {
                #region openfilelocation
                FileOpenPicker filePicker = new FileOpenPicker();
                filePicker.SuggestedStartLocation = PickerLocationId.VideosLibrary;
              
                filePicker.FileTypeFilter.Add(".wmv");
                filePicker.FileTypeFilter.Add(".mp4");
                filePicker.FileTypeFilter.Add(".wmv");
                filePicker.FileTypeFilter.Add(".avi");
                filePicker.FileTypeFilter.Add(".mkv");
                filePicker.FileTypeFilter.Add(".mov");
                filePicker.FileTypeFilter.Add(".mpg");
                filePicker.FileTypeFilter.Add(".3gp");
                
                filePicker.ViewMode = PickerViewMode.Thumbnail;
    
                StorageFile localVideo = await filePicker.PickSingleFileAsync();
                #endregion
                #region medialemetplay
                var stream = await localVideo.OpenAsync(FileAccessMode.Read);
                VideoSource.SetSource(stream, localVideo.ContentType);
                #endregion
            }
    
            private void open_Click(object sender, RoutedEventArgs e)
            {
                Play();
            }
    
        }

    Thursday, January 9, 2014 1:28 AM

All replies

  • Can you please explain again what you are looking for? I'm not sure what you're trying to do or where you need help.

    You can find a list of controls for different uses at Controls by function .

    Thursday, January 9, 2014 8:14 PM
    Moderator