zoukankan      html  css  js  c++  java
  • WPF——Application

    Application类处于WPF应用程序的最顶端,main函数就在这个类中。

    Application类的作用:
    截图连接 https://docs.microsoft.com/zh-cn/dotnet/api/system.windows.application?view=netframework-4.8

    https://docs.microsoft.com/zh-cn/dotnet/framework/wpf/app-development/application-management-overview

    #region Assembly PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    // C:Program Files (x86)Reference AssembliesMicrosoftFramework.NETFrameworkv4.5PresentationFramework.dll
    #endregion
    
    using System.Collections;
    using System.Reflection;
    using System.Security;
    using System.Windows.Markup;
    using System.Windows.Navigation;
    using System.Windows.Resources;
    using System.Windows.Threading;
    
    namespace System.Windows
    {
        public class Application : DispatcherObject, IHaveResources, IQueryAmbient
        {        
            [SecurityCritical]
            public Application();
    
            public static Assembly ResourceAssembly { get; set; }
            public static Application Current { get; }
            public WindowCollection Windows { get; }
            public Window MainWindow { get; set; }
            public ShutdownMode ShutdownMode { get; set; }
            [Ambient]
            public ResourceDictionary Resources { get; set; }
            public Uri StartupUri { get; set; }
            public IDictionary Properties { get; }
    
            public event StartupEventHandler Startup;
            public event ExitEventHandler Exit;
            public event EventHandler Deactivated;
            public event SessionEndingCancelEventHandler SessionEnding;
            public event DispatcherUnhandledExceptionEventHandler DispatcherUnhandledException;
            public event NavigatingCancelEventHandler Navigating;
            public event NavigatedEventHandler Navigated;
            public event NavigationProgressEventHandler NavigationProgress;
            public event NavigationFailedEventHandler NavigationFailed;
            public event LoadCompletedEventHandler LoadCompleted;
            public event EventHandler Activated;
            public event NavigationStoppedEventHandler NavigationStopped;
            public event FragmentNavigationEventHandler FragmentNavigation;
    
            [SecurityCritical]
            public static StreamResourceInfo GetContentStream(Uri uriContent);
            public static string GetCookie(Uri uri);
            [SecurityCritical]
            public static StreamResourceInfo GetRemoteStream(Uri uriRemote);
            [SecurityCritical]
            public static StreamResourceInfo GetResourceStream(Uri uriResource);
            public static object LoadComponent(Uri resourceLocator);
            [SecurityCritical]
            public static void LoadComponent(object component, Uri resourceLocator);
            public static void SetCookie(Uri uri, string value);
            public object FindResource(object resourceKey);
            [SecurityCritical]
            public int Run(Window window);
            public int Run();
            public void Shutdown();
            [SecurityCritical]
            public void Shutdown(int exitCode);
            public object TryFindResource(object resourceKey);
            protected virtual void OnActivated(EventArgs e);
            protected virtual void OnDeactivated(EventArgs e);
            protected virtual void OnExit(ExitEventArgs e);
            protected virtual void OnFragmentNavigation(FragmentNavigationEventArgs e);
            protected virtual void OnLoadCompleted(NavigationEventArgs e);
            protected virtual void OnNavigated(NavigationEventArgs e);
            protected virtual void OnNavigating(NavigatingCancelEventArgs e);
            protected virtual void OnNavigationFailed(NavigationFailedEventArgs e);
            protected virtual void OnNavigationProgress(NavigationProgressEventArgs e);
            protected virtual void OnNavigationStopped(NavigationEventArgs e);
            protected virtual void OnSessionEnding(SessionEndingCancelEventArgs e);
            protected virtual void OnStartup(StartupEventArgs e);
        }
    }
    

    在xml文件中指定启动的Page或者Windows就可启动窗体。

  • 相关阅读:
    在unity中内置一个查询物流信息功能
    socket 广播消息
    Socket通信
    用SecureCRT在windows和CentOS间上传下载文件
    Centos6.5下设置静态IP
    oracle 11g dataguard创建的简单方法
    linux下mysql安装、目录结构、配置
    dba诊断之lock
    oracle11G在linux环境下的卸载操作
    Ubuntu 14.04(32位)安装Oracle 11g(32位)全过程
  • 原文地址:https://www.cnblogs.com/feipeng8848/p/10985026.html
Copyright © 2011-2022 走看看