Skip to content

Commit

Permalink
Merge pull request #26 from BurkusCat/changelog
Browse files Browse the repository at this point in the history
Fix misc issues and update CHANGELOG.md
  • Loading branch information
BurkusCat authored Oct 13, 2023
2 parents d3ef9a6 + 8020525 commit 16e2f98
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 25 deletions.
21 changes: 14 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.1.0] - 2023-10-15

### Added
- Builder extensions and BurkusMvvmBuilder
- ResolveBindingContext markup extension
- Builder extensions and `BurkusMvvmBuilder`
- `ResolveBindingContext` markup extension
- Navigation parameters and reserved navigation parameters
- INavigatingEvents
- INavigatedEvents
- DialogService
- ServiceResolver
- Initial documentation
- `INavigatingEvents`
- `INavigatedEvents`
- `NavigationService`
- Basic abstractions of MAUI navigation methods such as: `.Push(...)`, `.Pop`, etc.
- Modal and animation options for navigation
- Convenient, advanced navigation methods such as: `.ReplaceTopPage(...)`, `.ResetStackAndPush(...)`, etc.
- URI Navigation using the `.Navigate(...)` method (unstable behavior)
- `NavigationUriBuilder`
- `DialogService` - abstractions over the native .NET MAUI alerts/pop-ups/prompts/action sheets
- `ServiceResolver`
- Initial documentation
- Demo app and unit tests
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
![Burkus.Mvvm.Maui](art/BurkusMvvmMauiLogo.png)
#### Navigation - Parameter Passing - Lifecycle Events - Native Dialogs - Testability

### Stable: [![NuGet Stable](https://img.shields.io/nuget/v/Burkus.Mvvm.Maui.svg?label=NuGet)](https://www.nuget.org/packages/Burkus.Mvvm.Maui/) Preview: [![NuGet Preview](https://img.shields.io/nuget/vpre/Burkus.Mvvm.Maui.svg?label=NuGet)](https://www.nuget.org/packages/Burkus.Mvvm.Maui/)

# Burkus.Mvvm.Maui (experimental)
`Burkus.Mvvm.Maui` is an MVVM (Model–view–viewmodel) framework for .NET MAUI. The library has some key aims it wants to provide:
- Be lightweight and only provide the parts of MVVM that MAUI needs 👟
Expand Down
18 changes: 9 additions & 9 deletions samples/DemoApp/DemoApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -97,31 +97,31 @@
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\ChangeUsernamePage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\HomePage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\UriTestPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\Tabs\CharlieTabPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\Tabs\BetaTabPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\Tabs\DemoTabsPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\RegisterPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\LoginPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\Tabs\AlphaTabPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
</ItemGroup>

Expand Down
3 changes: 2 additions & 1 deletion samples/DemoApp/Views/ChangeUsernamePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@
<Entry
Grid.Row="2"
MaximumWidthRequest="{StaticResource VeryWideControlWidth}"
Placeholder="{x:Static properties:Resources.ChangeUsername_UsernamePlaceholder}"
ReturnCommand="{Binding FinishCommand}"
ReturnType="Done"
Text="{x:Static properties:Resources.ChangeUsername_UsernamePlaceholder}" />
Text="{Binding Username}" />
<Button
Grid.Row="3"
Command="{Binding FinishCommand}"
Expand Down
16 changes: 8 additions & 8 deletions src/Extensions/ResolveBindingContext.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
namespace Burkus.Mvvm.Maui;

public class ResolveBindingContext<T> : IMarkupExtension<T>
where T : class
/// <summary>
/// This is a dummy MarkupExtension to workaround bug https://github.com/BurkusCat/Burkus.Mvvm.Maui/issues/13.
/// Please don't use this class.
/// </summary>
public class ResolveBindingContext : IMarkupExtension
{
public object ProvideValue(IServiceProvider serviceProvider)
{
return ServiceResolver.Resolve<T>();
}
public object TypeArguments { get; set; }

T IMarkupExtension<T>.ProvideValue(IServiceProvider serviceProvider)
public object ProvideValue(IServiceProvider serviceProvider)
{
return ServiceResolver.Resolve<T>();
return null;

Check warning on line 13 in src/Extensions/ResolveBindingContext.cs

View workflow job for this annotation

GitHub Actions / release-nuget

Possible null reference return.
}
}
15 changes: 15 additions & 0 deletions src/Extensions/ResolveBindingContextT.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace Burkus.Mvvm.Maui;

public class ResolveBindingContext<T> : IMarkupExtension<T>
where T : class
{
public object ProvideValue(IServiceProvider serviceProvider)
{
return ServiceResolver.Resolve<T>();
}

T IMarkupExtension<T>.ProvideValue(IServiceProvider serviceProvider)
{
return ServiceResolver.Resolve<T>();
}
}

0 comments on commit 16e2f98

Please sign in to comment.