Ejemplo n.º 1
0
        internal async void OnLoadLayoutAsync(object parameter = null)
        {
            App myApp = (App)Application.Current;

            LayoutLoaderResult LoaderResult = await myApp.LayoutLoaded.GetLayoutString(OnLayoutLoaded_Event);

            // Call this even with null to ensure standard initialization takes place
            this.OnLayoutLoaded_Event(null, (LoaderResult == null ? null : new LayoutLoadedEventArgs(LoaderResult)));
        }
Ejemplo n.º 2
0
        private async void OnLoadLayoutAsync(object parameter = null)
        {
            if (this.DataContext is WorkSpaceViewModel wspace)
            {
                wspace.CloseAllDocuments();
            }

            App myApp = (App)Application.Current;

            LayoutLoaderResult LoaderResult = await this.LayoutLoaded.GetLayoutString(OnLayoutLoaded_Event);

            // Call this even with null to ensure standard initialization takes place
            this.OnLayoutLoaded_Event(null, (LoaderResult == null ? null : new LayoutLoadedEventArgs(LoaderResult)));
        }