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();
}
}