• windows8 后台传递下载


    后台传递下载示例
    这个示例演示了power-friendly,cost-aware和灵活的行为背景的传输API为Windows运行时应用程序
    void MainPage_Loaded(object sender, RoutedEventArgs e)
            {
                // Figure out what resolution and orientation we are in and respond appropriately
                CheckResolutionAndViewState();

                // Load the ScenarioList page into the proper frame
                ScenarioList.Navigate(Type.GetType(_rootNamespace + ".ScenarioList"), this);
            }

            #region Resolution and orientation code

            void DisplayProperties_LogicalDpiChanged(object sender)
            {
                CheckResolutionAndViewState();
            }

            void CheckResolutionAndViewState()
            {
                VisualStateManager.GoToState(this, ApplicationView.Value.ToString() + DisplayProperties.ResolutionScale.ToString(), false);
            }

            void MainPage_ViewStateChanged(ApplicationView sender, ApplicationViewStateChangedEventArgs args)
            {
                CheckResolutionAndViewState();
            }

            #endregion

            private void SetFeatureName(string str)
            {
                FeatureName.Text = str;
            }

            async void Footer_Click(object sender, RoutedEventArgs e)
            {
                await Windows.System.Launcher.LaunchUriAsync(new Uri(((HyperlinkButton)sender).Tag.ToString()));
            }

            public void NotifyUser(string strMessage, NotifyType type)
            {
                switch (type)
                {
                    case NotifyType.StatusMessage:
                        StatusBlock.Style = Resources["StatusStyle"as Style;
                        break;
                    case NotifyType.ErrorMessage:
                        StatusBlock.Style = Resources["ErrorStyle"as Style;
                        break;
                }
                StatusBlock.Text = strMessage;
            }

            public void DoNavigation(Type pageType, Frame frame)
            {
                frame.Navigate(pageType, this);
                if (pageType.Name.Contains("Input"))
                {
                    // Raise InputFrameLoaded so downstream pages know that the input frame content has been loaded.
                    if (InputFrameLoaded != null)
                    {
                        InputFrameLoaded(thisnew EventArgs());
                    }
                }
                else
                {
                    // Raise OutputFrameLoaded so downstream pages know that the output frame content has been loaded.
                    if (OutputFrameLoaded != null)
                    {
                        OutputFrameLoaded(thisnew EventArgs());
                    }
                }

            } 

     完整示例 /Files/risk/windows8/后台传递下载sample.rar

  • 相关阅读:
    ELK(ElasticSearch, Logstash, Kibana)搭建实时日志分析平台
    reportlab设置字体
    Ansible 配置文件详解
    Ansible 配置文件详解
    如何在 FineUIMvc 中引用第三方 JavaScript 库
    如何在 FineUIMvc 中引用第三方 JavaScript 库
    如何在 FineUIMvc 中引用第三方 JavaScript 库
    如何在 FineUIMvc 中引用第三方 JavaScript 库
    div和span显示在同一行
    div和span显示在同一行
  • 原文地址:https://www.cnblogs.com/risk/p/2495479.html
Copyright © 2020-2023  润新知