-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #155 from MartinZikmund/feature/windowshell
Start creating scoped WindowShell, port views
- Loading branch information
Showing
39 changed files
with
592 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | ||
|
||
<ResourceDictionary.MergedDictionaries> | ||
<!-- Load WinUI resources --> | ||
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" /> | ||
|
||
</ResourceDictionary.MergedDictionaries> | ||
<!-- Add resources here --> | ||
<ResourceDictionary.MergedDictionaries> | ||
<!-- Load WinUI resources --> | ||
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" /> | ||
<ResourceDictionary Source="ms-appx:///MZikmund/Resources/Colors.xaml" /> | ||
<ResourceDictionary Source="ms-appx:///MZikmund/Resources/Converters.xaml" /> | ||
<ResourceDictionary Source="ms-appx:///MZikmund/Resources/Fonts.xaml" /> | ||
</ResourceDictionary.MergedDictionaries> | ||
|
||
</ResourceDictionary> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
using MZikmund.ViewModels.Abstract; | ||
using MZikmund.ViewModels; | ||
|
||
namespace MZikmund.Dialogs; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,23 @@ | ||
namespace MZikmund.Services.Loading; | ||
using MZikmund.Services.Navigation; | ||
|
||
namespace MZikmund.Services.Loading; | ||
|
||
public class LoadingIndicator : ILoadingIndicator | ||
{ | ||
public IDisposable BeginLoading() => AppShell.GetForCurrentView().ViewModel.BeginLoading(); | ||
private readonly IWindowShellProvider _windowShellProvider; | ||
|
||
public LoadingIndicator(IWindowShellProvider windowShellProvider) | ||
{ | ||
_windowShellProvider = windowShellProvider; | ||
} | ||
|
||
public IDisposable BeginLoading() => _windowShellProvider.ViewModel.BeginLoading(); | ||
|
||
public bool IsLoading => AppShell.GetForCurrentView().ViewModel.IsLoading; | ||
public bool IsLoading => _windowShellProvider.ViewModel.IsLoading; | ||
|
||
public string StatusMessage | ||
{ | ||
get => AppShell.GetForCurrentView().ViewModel.LoadingStatusMessage; | ||
set => AppShell.GetForCurrentView().ViewModel.LoadingStatusMessage = value; | ||
get => _windowShellProvider.ViewModel.LoadingStatusMessage; | ||
set => _windowShellProvider.ViewModel.LoadingStatusMessage = value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/app/MZikmund/Services/Navigation/IWindowShellProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using MZikmund.ViewModels; | ||
|
||
namespace MZikmund.Services.Navigation; | ||
|
||
public interface IWindowShellProvider | ||
{ | ||
WindowShellViewModel ViewModel { get; } | ||
|
||
WindowShell WindowShell { get; } | ||
|
||
XamlRoot XamlRoot { get; } | ||
|
||
IServiceProvider ServiceProvider { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.