zoukankan      html  css  js  c++  java
  • uwp 之多媒体开发

    xml code

    -----------------------------------------------------

    <Page

        x:Class="MyApp.MainPage"

        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

        xmlns:local="using:MyApp"

        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

        mc:Ignorable="d"

        Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

        <Grid>

            <MediaElement Source="wpa.mp4" AreTransportControlsEnabled="True"/>

        </Grid>

    </Page>

    C#   code

    ------------------------------------------------------------------------------------------------

     public sealed partial class MainPage : Page

        {

            public MainPage()

            {

                this.InitializeComponent();

                this.NavigationCacheMode = NavigationCacheMode.Required;

            }

            /// <summary>

            /// 在此页将要在 Frame 中显示时进行调用。

            /// </summary>

            /// <param name="e">描述如何访问此页的事件数据。

            /// 此参数通常用于配置页。</param>

            protected override void OnNavigatedTo(NavigationEventArgs e)

            {

                // TODO: 准备此处显示的页面。

                // TODO: 如果您的应用程序包含多个页面,请确保

                // 通过注册以下事件来处理硬件“后退”按钮:

                // Windows.Phone.UI.Input.HardwareButtons.BackPressed 事件。

                // 如果使用由某些模板提供的 NavigationHelper,

                // 则系统会为您处理该事件。

            }

        }

  • 相关阅读:
    switch statement
    Block statement
    Variable hoisting Global variables Constants
    How the Web works
    Discover browser developer tools
    Publishing via GitHub
    第十二节,OpenCV学习(一)图像的读取、显示、保存
    剑指Offer编程题3——从尾到头打印链表
    剑指Offer编程题2——替换空格
    剑指Offer编程题1——二维数组中的查找
  • 原文地址:https://www.cnblogs.com/bruce1992/p/14222737.html
Copyright © 2011-2022 走看看