Skip to content

Commit

Permalink
Merge pull request #55 from RadekVyM/dev
Browse files Browse the repository at this point in the history
Core 5.1.0
  • Loading branch information
RadekVyM authored Jul 11, 2024
2 parents 88fa33d + 852ff56 commit 23106da
Show file tree
Hide file tree
Showing 72 changed files with 479 additions and 440 deletions.
63 changes: 14 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

SimpleToolkit is a .NET MAUI library of helpers and simple, easily customizable controls.

The library consists of three NuGet packages:
The library consists of these NuGet packages:

- [SimpleToolkit.Core](#simpletoolkitcore) - set of simple .NET MAUI controls and helpers

Expand All @@ -12,10 +12,6 @@ The library consists of three NuGet packages:

[![NuGet](https://img.shields.io/nuget/v/SimpleToolkit.SimpleShell.svg?label=SimpleToolkit.SimpleShell)](https://www.nuget.org/packages/SimpleToolkit.SimpleShell/)

- [SimpleToolkit.SimpleShell.Controls](#simpletoolkitsimpleshellcontrols) - collection of ready-to-use, navigation-related controls

[![NuGet](https://img.shields.io/nuget/v/SimpleToolkit.SimpleShell.Controls.svg?label=SimpleToolkit.SimpleShell.Controls)](https://www.nuget.org/packages/SimpleToolkit.SimpleShell.Controls/)

I have split the content of this library into multiple NuGet packages because there may be people who want to use only the `SimpleShell` control, for example, and do not want to use other controls.

> [!CAUTION]
Expand All @@ -34,36 +30,42 @@ Here are some of my samples that were built using this library:
<a href="https://github.com/RadekVyM/MarvelousMAUI"><em>Marvelous .NET MAUI</em></a>
</p>
<p align="center">
<img src="https://raw.githubusercontent.com/RadekVyM/Gadgets-Store-App/main/samples/android_gadgets_store_app.gif" width="230" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<img src="https://raw.githubusercontent.com/RadekVyM/Gadgets-Store-App/main/samples/ios_gadgets_store_app.gif" width="239" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<img src="https://raw.githubusercontent.com/RadekVyM/Bet-App/main/Images/ios_betapp.webp" width="236" />
</p>
<p align="center">
<a href="https://github.com/RadekVyM/Gadgets-Store-App"><em>Gadget Store App</em></a>
&nbsp;|&nbsp;
<a href="https://github.com/RadekVyM/Bet-App"><em>Bet App</em></a>
</p>
<p align="center">
<img src="https://raw.githubusercontent.com/RadekVyM/Navbar-Animation-1/main/Images/navbaranimation%20gif%20720.gif" width="230" />
<img src="https://raw.githubusercontent.com/RadekVyM/Navbar-Animation-1/main/Images/android_navbaranimation1.webp" width="230" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<img src="https://raw.githubusercontent.com/RadekVyM/Navbar-Animation-1/main/Images/iphone_navbaranimation_1.png" width="245" />
<img src="https://raw.githubusercontent.com/RadekVyM/Navbar-Animation-2/main/images/iphone_navbaranimation_2.webp" width="236" />
</p>
<p align="center">
<a href="https://github.com/RadekVyM/Navbar-Animation-1"><em>Navbar Animation #1</em></a>
&nbsp;|&nbsp;
<a href="https://github.com/RadekVyM/Navbar-Animation-2"><em>Navbar Animation #2</em></a>
</p>
<p align="center">
<img src="https://raw.githubusercontent.com/RadekVyM/HamburgerMenuApp/main/images/android.gif" width="230" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<img src="https://raw.githubusercontent.com/RadekVyM/HamburgerMenuApp/main/images/ios.gif" width="239" />
<img src="https://raw.githubusercontent.com/RadekVyM/Waste-App/main/Images/ios_wasteapp.webp" width="236" />
</p>
<p align="center">
<a href="https://github.com/RadekVyM/HamburgerMenuApp"><em>Hamburger Menu App</em></a>
&nbsp;|&nbsp;
<a href="https://github.com/RadekVyM/Waste-App"><em>Waste App</em></a>
</p>

> [!TIP]
> Check out a list of all samples [here](./docs/Samples.md).
## Supported platforms

This library supports all these platforms:
This library is built for the following platforms:

- Android
- iOS/Mac Catalyst
Expand Down Expand Up @@ -119,41 +121,4 @@ builder.UseSimpleShell();
- A `SimpleShell`-based application may not have as good accessibility in some scenarios due to the lack of platform-specific navigation controls. .NET MAUI `Shell` should be accessible out of the box since it uses platform-specific controls.
- Maybe I have implemented something wrong that has a negative impact on the performance, stability, accessibility, or something like that.

See [documentation](./docs/SimpleToolkit.SimpleShell) for more information.

## SimpleToolkit.SimpleShell.Controls

[![SimpleToolkit.SimpleShell.Controls](https://img.shields.io/nuget/v/SimpleToolkit.SimpleShell.Controls.svg?label=SimpleToolkit.SimpleShell.Controls)](https://www.nuget.org/packages/SimpleToolkit.SimpleShell.Controls/)
[![Documentation](https://img.shields.io/badge/-Documentation%20-forestgreen)](./docs/SimpleToolkit.SimpleShell.Controls)

_SimpleToolkit.SimpleShell.Controls_ is a collection of ready-to-use, navigation-related controls (not only) for `SimpleShell`.

The package currently supports only two controls:

- `ListPopover` - popover containing a list of selectable text items
- `TabBar`

All controls can be styled using different design languages. These are currently supported:

- Material 3
- Cupertino
- Fluent (WinUI 3)

<p align="center">
<img width="350" src="./docs/images/listpopovers.png">
</p>

<p align="center">
<img width="350" src="./docs/images/tabbars.png">
</p>

<p align="center">
<a href="https://giphy.com/gifs/wiesemann1893-transparent-logo-wiesemann-dWa2rUaiahx1FB3jor">
<img width="250" src="https://media1.giphy.com/media/dWa2rUaiahx1FB3jor/giphy.gif?cid=790b7611041afeb62e8c51c2423440574e3473ff3a4cdd49&rid=giphy.gif&ct=g">
</a>
</p>

> [!CAUTION]
> I am still not decided if I want to continue and how to develop the `SimpleToolkit.SimpleShell.Controls` package. **The package API is likely to change in the future.** For this reason, this package is still in preview and has poor documentation.
See [documentation](./docs/SimpleToolkit.SimpleShell.Controls) for more information.
See [documentation](./docs/SimpleToolkit.SimpleShell) for more information.
42 changes: 21 additions & 21 deletions docs/Samples.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,44 @@

https://github.com/RadekVyM/MarvelousMAUI/assets/65116078/3a6b59a0-e48f-4af4-b168-2d0481df4b15

## [Hamburger Menu App](https://github.com/RadekVyM/HamburgerMenuApp)

**.NET MAUI** implementation of [Hamburger Menu with Landing Card Design](https://dribbble.com/shots/11101126-Hamburger-Menu-with-Landing-Card-Design) by [Sulai Man](https://dribbble.com/sully_man).

https://github.com/RadekVyM/HamburgerMenuApp/assets/65116078/e4db39c0-8c6f-4ff7-8495-ded04b77e7e7

## [Gadget Store App](https://github.com/RadekVyM/Gadgets-Store-App)

**.NET MAUI** implementation of [Gadgets Store App](https://dribbble.com/shots/6983164-Gadgets-Store-App) design by [Sajon](https://dribbble.com/sajon007):

https://github.com/RadekVyM/Gadgets-Store-App/assets/65116078/332aa779-861b-44b2-be1f-6a53dc730fae

# [Bet App](https://github.com/RadekVyM/Bet-App)

**.NET MAUI** implementation of [Bet App](https://dribbble.com/shots/14384464-Bet-App) design by [MindInventory UI/UX](https://dribbble.com/MindInventoryUIUX).

https://github.com/RadekVyM/Bet-App/assets/65116078/af3a3026-19d5-4519-840d-c44881ed1957

# [Waste App](https://github.com/RadekVyM/Waste-App)

**.NET MAUI** implementation of [Waste App](https://dribbble.com/shots/14433671-Waste-App) design by [Sara Salehi](https://dribbble.com/SaraSalehi).

https://github.com/RadekVyM/Waste-App/assets/65116078/423cf52d-dccc-4b11-93b5-47d66acaa705

## [Hamburger Menu App](https://github.com/RadekVyM/HamburgerMenuApp)

**.NET MAUI** implementation of [Hamburger Menu with Landing Card Design](https://dribbble.com/shots/11101126-Hamburger-Menu-with-Landing-Card-Design) by [Sulai Man](https://dribbble.com/sully_man).

https://github.com/RadekVyM/HamburgerMenuApp/assets/65116078/e4db39c0-8c6f-4ff7-8495-ded04b77e7e7

## [Navbar Animation #1](https://github.com/RadekVyM/Navbar-Animation-1)

**.NET MAUI** implementation of [Navbar Animation #1](https://dribbble.com/shots/9852644-Navbar-Animation-1) design by [Marie Bernard](https://dribbble.com/marie_brn):

<p align="center">
<img src="https://raw.githubusercontent.com/RadekVyM/Navbar-Animation-1/main/Images/navbaranimation%20gif%20720.gif" data-canonical-src="https://github.com/RadekVyM/Navbar-Animation-1" width="230" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<img src="https://raw.githubusercontent.com/RadekVyM/Navbar-Animation-1/main/Images/iphone_navbaranimation_1.png" data-canonical-src="https://github.com/RadekVyM/Navbar-Animation-1" width="245" />
</p>
https://github.com/RadekVyM/Navbar-Animation-1/assets/65116078/ea396db0-98b7-4412-9eaf-56203ffeb3ee

## [Navbar Animation #2](https://github.com/RadekVyM/Navbar-Animation-2)

**.NET MAUI** implementation of [Navbar Animation #2](https://dribbble.com/shots/14122275-Navbar-Animation-2) design by [Marie Bernard](https://dribbble.com/marie_brn):

<p align="center">
<img src="https://raw.githubusercontent.com/RadekVyM/Navbar-Animation-2/main/images/android_navbaranimation_2.gif" data-canonical-src="https://github.com/RadekVyM/Navbar-Animation-2" width="230" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<img src="https://raw.githubusercontent.com/RadekVyM/Navbar-Animation-2/main/images/iphone_navbaranimation_2.png" data-canonical-src="https://github.com/RadekVyM/Navbar-Animation-2" width="245" />
</p>
https://github.com/RadekVyM/Navbar-Animation-2/assets/65116078/28e3f2b3-4e61-4471-b7c4-2d6d6d89794d

## [Tab Bar Switches Interaction](https://github.com/RadekVyM/Tab-Bar-Switches-Interaction)

**.NET MAUI** implementation of [Tab Bar Switches Interaction](https://dribbble.com/shots/14028381-Tab-Bar-Switches-Interaction) design by [Ronas IT | UI/UX Team](https://dribbble.com/ronasit):

<p align="center">
<img src="https://raw.githubusercontent.com/RadekVyM/Tab-Bar-Switches-Interaction/main/images/android_tabbarswitches.gif" data-canonical-src="./images/android_tabbarswitches.gif" width="230" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<img src="https://raw.githubusercontent.com/RadekVyM/Tab-Bar-Switches-Interaction/main/images/ios_tabbarswitches.png" data-canonical-src="./images/android_tabbarswitches.gif" width="245" />
</p>
https://github.com/RadekVyM/Tab-Bar-Switches-Interaction/assets/65116078/047f33ff-80e2-4432-b142-05cffe6b59bc
7 changes: 6 additions & 1 deletion docs/SimpleToolkit.Core/Popover.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ button.HideAttachedPopover();
```

### `UseDefaultStyling`

Using the `UseDefaultStyling` boolean property, we can define whether the default platform-specific styling of the popover should be used. The default value is `false`. If we set the property to `true`, following results will be achieved:

<p align="center">
Expand Down Expand Up @@ -189,4 +190,8 @@ We can, for example, allow the arrow to point only upward or downward:

```csharp
popover.PermittedArrowDirections = PopoverArrowDirection.Up | PopoverArrowDirection.Down;
```
```

### `IsAnimated`

Show and hide animations of a popover can be disabled using the `IsAnimated` boolean property. If we set the property to `true`, animations are enabled, otherwise disabled.
8 changes: 4 additions & 4 deletions src/Playground/Playground.Original/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Playground.Original;

internal enum AppShellType
public enum AppShellType
{
Normal, Playground
}
Expand All @@ -11,12 +11,12 @@ public App()
{
InitializeComponent();

RefreshShell();
RefreshShell(MauiProgram.UsedAppShell);
}

public void RefreshShell()
public void RefreshShell(AppShellType type)
{
MainPage = MauiProgram.UsedAppShell switch
MainPage = type switch
{
AppShellType.Normal => new NormalAppShell(),
_ => new PlaygroundAppShell()
Expand Down
52 changes: 24 additions & 28 deletions src/Playground/Playground.Original/MauiProgram.cs
Original file line number Diff line number Diff line change
@@ -1,41 +1,37 @@
using SimpleToolkit.Core;
using SimpleToolkit.SimpleShell;
#if IOS || MACCATALYST
using CommunityToolkit.Maui.Views;
#endif

namespace Playground.Original
namespace Playground.Original;

public static class MauiProgram
{
public static class MauiProgram
{
internal const AppShellType UsedAppShell = AppShellType.Playground;
internal const AppShellType UsedAppShell = AppShellType.Playground;

public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();

builder.UseMauiApp<App>()
.UseSimpleToolkit()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
fonts.AddFont("Font-Awesome-Solid.otf", "FontAwesomeSolid");
});
builder.UseMauiApp<App>()
.UseSimpleToolkit()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
fonts.AddFont("Font-Awesome-Solid.otf", "FontAwesomeSolid");
});

if (UsedAppShell == AppShellType.Playground)
builder.DisplayContentBehindBars();
if (UsedAppShell == AppShellType.Playground)
builder.DisplayContentBehindBars();

#if ANDROID
builder.SetDefaultStatusBarAppearance(color: Colors.Transparent, lightElements: false);
builder.SetDefaultNavigationBarAppearance(color: Colors.Transparent, lightElements: false);
builder.SetDefaultStatusBarAppearance(color: Colors.Transparent, lightElements: false);
builder.SetDefaultNavigationBarAppearance(color: Colors.Transparent, lightElements: false);
#endif
if (UsedAppShell is not AppShellType.Normal)
{
builder.UseSimpleShell(true);
}

return builder.Build();
if (UsedAppShell is not AppShellType.Normal)
{
builder.UseSimpleShell(true);
}

return builder.Build();
}
}
43 changes: 17 additions & 26 deletions src/Playground/Playground.Original/NormalAppShell.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,47 +13,38 @@
<!--<Tab Title="Flame tab" Route="FirstTab"
Icon="flame_empty.png">-->
<ShellContent
Title="Green"
Title="Content Button"
Icon="bird_empty.png"
ContentTemplate="{DataTemplate pages:GreenPage}"
Route="GreenPage" />
ContentTemplate="{DataTemplate pages:ContentButtonPage}"
Route="ContentButtonPage" />
<ShellContent
Title="Yellow"
Icon="flame_empty.png"
ContentTemplate="{DataTemplate pages:YellowPage}"
Route="YellowPage" />
<!--</Tab>-->

<!--<Tab Title="Case tab" Route="SecondTab"
Icon="case_empty.png">-->
<ShellContent
Title="Blue"
Icon="case_empty.png"
ContentTemplate="{DataTemplate pages:BluePage}"
Route="BluePage" />
<ShellContent
Title="Red"
Icon="avatar_empty.png"
ContentTemplate="{DataTemplate pages:RedPage}"
Route="RedPage" />
<!--</Tab>-->
<Tab Title="Case tab" Route="SecondTab"
Icon="case_empty.png">
<ShellContent
Title="Blue"
Icon="case_empty.png"
ContentTemplate="{DataTemplate pages:BluePage}"
Route="BluePage" />
<ShellContent
Title="Red"
Icon="avatar_empty.png"
ContentTemplate="{DataTemplate pages:RedPage}"
Route="RedPage" />
</Tab>

<Tab Title="Purple"
Icon="avatar_empty.png">
Icon="avatar_empty.png">
<ShellContent
Title="Purple"
Icon="avatar_empty.png"
ContentTemplate="{DataTemplate pages:PurplePage}"
Route="PurplePage" />
</Tab>

<Tab Title="Gray"
Icon="flame_empty.png">
<ShellContent
Title="Gray"
Icon="flame_empty.png"
ContentTemplate="{DataTemplate pages:GrayPage}"
Route="GrayPage" />
</Tab>
</TabBar>
</Shell>
25 changes: 12 additions & 13 deletions src/Playground/Playground.Original/NormalAppShell.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
using Playground.Original.Views.Pages;

namespace Playground.Original
namespace Playground.Original;

public partial class NormalAppShell : Shell
{
public partial class NormalAppShell : Shell
public NormalAppShell()
{
public NormalAppShell()
{
InitializeComponent();
InitializeComponent();

Routing.RegisterRoute(nameof(ImagePage), typeof(ImagePage));
Routing.RegisterRoute(nameof(FirstYellowDetailPage), typeof(FirstYellowDetailPage));
Routing.RegisterRoute(nameof(SecondYellowDetailPage), typeof(SecondYellowDetailPage));
Routing.RegisterRoute(nameof(ThirdYellowDetailPage), typeof(ThirdYellowDetailPage));
Routing.RegisterRoute(nameof(FourthYellowDetailPage), typeof(FourthYellowDetailPage));
Routing.RegisterRoute(nameof(FirstGreenDetailPage), typeof(FirstGreenDetailPage));
}
Routing.RegisterRoute(nameof(ImagePage), typeof(ImagePage));
Routing.RegisterRoute(nameof(FirstYellowDetailPage), typeof(FirstYellowDetailPage));
Routing.RegisterRoute(nameof(SecondYellowDetailPage), typeof(SecondYellowDetailPage));
Routing.RegisterRoute(nameof(ThirdYellowDetailPage), typeof(ThirdYellowDetailPage));
Routing.RegisterRoute(nameof(FourthYellowDetailPage), typeof(FourthYellowDetailPage));
Routing.RegisterRoute(nameof(FirstGreenDetailPage), typeof(FirstGreenDetailPage));
}
}
}
Loading

0 comments on commit 23106da

Please sign in to comment.