Skip to content

Commit d45a17c

Browse files
eirinsviVetle444Copilot
authored
Legg til sidenavigering i bottomsheet og legg til muligheten for stroke rundt checkmark (#881)
Co-authored-by: Vetle444 <vetle_96@live.no> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent fa52719 commit d45a17c

37 files changed

Lines changed: 1248 additions & 149 deletions

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## [60.3.0]
2+
- [Bottomsheet] Added page navigation inside bottomsheet
3+
- [Checkmark] Added `AddStrokeToCheckmark` property to display a visible stroke around the checkmark
4+
- [CheckmarkListItem] Added `AddStrokeToCheckmark` property to display a visible stroke around the checkmark icon
5+
16
## [60.2.15]
27
- [ImageCapture][iOS] Fixed full-screen gallery previews showing black images when opened from thumbnails.
38

src/app/Components/ComponentsSamples/BottomSheets/BottomSheetSamples.xaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@
2525
<dui:NavigationListItem Title="{x:Static localizedStrings:LocalizedStrings.BottomSheet}"
2626
Subtitle="{x:Static localizedStrings:LocalizedStrings.BottomSheet_OpenNotClosableInteracting}"
2727
Command="{dui:OpenBottomSheetCommand {x:Type sheets:BottomSheetNotClosableByInteracting}}"
28+
HasBottomDivider="True"
29+
VerticalOptions="Start" />
30+
31+
<dui:NavigationListItem Title="Bottom sheet with navigation"
32+
Subtitle="Navigate between pages inside a sheet"
33+
Command="{dui:OpenBottomSheetCommand {x:Type sheets:BottomSheetWithNavigation}}"
2834
VerticalOptions="Start" />
2935
</dui:VerticalStackLayout>
3036
</dui:ContentPage>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<dui:BottomSheet xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
2+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
3+
xmlns:dui="http://dips.com/mobile.ui"
4+
x:Class="Components.ComponentsSamples.BottomSheets.Sheets.BottomSheetWithNavigation"
5+
x:Name="Sheet"
6+
Positioning="Large"
7+
Title="Navigation"
8+
BackgroundColor="{dui:Colors color_surface_neutral}"
9+
ShowBottombarButtonsOnSubViews="True">
10+
11+
<dui:VerticalStackLayout Spacing="0"
12+
Margin="{dui:Thickness Left=content_margin_medium, Right=content_margin_medium, Top=content_margin_large}">
13+
<dui:Label Text="This is the root content of the bottom sheet. Tap one of the items below to navigate to a new page inside the sheet. The bottom bar buttons stay visible across pushed sub-views."
14+
Padding="{dui:Thickness size_4}"
15+
Style="{dui:Styles Label=UI200}" />
16+
17+
<dui:NavigationListItem Title="Page 1"
18+
Subtitle="Push a simple page"
19+
HasBottomDivider="True"
20+
Tapped="OnPage1Tapped" />
21+
22+
<dui:NavigationListItem Title="Page 2"
23+
Subtitle="Push another page with its own navigation"
24+
Tapped="OnPage2Tapped" />
25+
</dui:VerticalStackLayout>
26+
27+
<dui:BottomSheet.BottombarButtons>
28+
29+
<dui:Button Text="Reset"
30+
Style="{dui:Styles Button=GhostLarge}"
31+
VerticalOptions="End" />
32+
33+
<dui:Button Text="Apply"
34+
HorizontalOptions="Fill"
35+
VerticalOptions="End" />
36+
37+
</dui:BottomSheet.BottombarButtons>
38+
</dui:BottomSheet>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
namespace Components.ComponentsSamples.BottomSheets.Sheets;
2+
3+
public partial class BottomSheetWithNavigation
4+
{
5+
public BottomSheetWithNavigation()
6+
{
7+
InitializeComponent();
8+
}
9+
10+
private async void OnPage1Tapped(object? sender, EventArgs e)
11+
{
12+
await Sheet.PushAsync(new NavigationPage1(Sheet));
13+
}
14+
15+
private async void OnPage2Tapped(object? sender, EventArgs e)
16+
{
17+
await Sheet.PushAsync(new NavigationPage2(Sheet));
18+
}
19+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<dui:ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
5+
xmlns:dui="http://dips.com/mobile.ui"
6+
x:Class="Components.ComponentsSamples.BottomSheets.Sheets.NavigationPage1"
7+
Title="Page 1">
8+
9+
<dui:VerticalStackLayout Spacing="{dui:Sizes content_margin_medium}"
10+
Margin="{dui:Thickness Left=content_margin_medium, Right=content_margin_medium, Top=content_margin_large}">
11+
<dui:Label Text="This is page 1. You navigated here from the root."
12+
Padding="{dui:Thickness size_4}"
13+
Style="{dui:Styles Label=UI200}" />
14+
15+
<dui:Button Text="Pop to root"
16+
Clicked="OnPopToRootClicked" />
17+
</dui:VerticalStackLayout>
18+
19+
</dui:ContentPage>
20+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using DIPS.Mobile.UI.Components.BottomSheets;
2+
3+
namespace Components.ComponentsSamples.BottomSheets.Sheets;
4+
5+
public partial class NavigationPage1
6+
{
7+
private readonly BottomSheet m_sheet;
8+
9+
public NavigationPage1(BottomSheet sheet)
10+
{
11+
m_sheet = sheet;
12+
InitializeComponent();
13+
}
14+
15+
private async void OnPopToRootClicked(object? sender, EventArgs e)
16+
{
17+
await m_sheet.PopToRootAsync();
18+
}
19+
}
20+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<dui:ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
5+
xmlns:dui="http://dips.com/mobile.ui"
6+
x:Class="Components.ComponentsSamples.BottomSheets.Sheets.NavigationPage2"
7+
Title="Page 2">
8+
9+
<dui:VerticalStackLayout Spacing="{dui:Sizes content_margin_medium}"
10+
Margin="{dui:Thickness Left=content_margin_medium, Right=content_margin_medium, Top=content_margin_large}">
11+
<dui:Label Text="This is page 2. Tap the item below to push yet another page."
12+
Padding="{dui:Thickness size_4}"
13+
Style="{dui:Styles Label=UI200}" />
14+
15+
<dui:NavigationListItem Title="Go deeper"
16+
Subtitle="Push a third page from here"
17+
Tapped="OnGoDeeperTapped" />
18+
19+
<dui:Button Text="Pop to root"
20+
Clicked="OnPopToRootClicked" />
21+
</dui:VerticalStackLayout>
22+
23+
</dui:ContentPage>
24+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
using DIPS.Mobile.UI.Components.BottomSheets;
2+
3+
namespace Components.ComponentsSamples.BottomSheets.Sheets;
4+
5+
public partial class NavigationPage2
6+
{
7+
private readonly BottomSheet m_sheet;
8+
9+
public NavigationPage2(BottomSheet sheet)
10+
{
11+
m_sheet = sheet;
12+
InitializeComponent();
13+
}
14+
15+
private async void OnGoDeeperTapped(object? sender, EventArgs e)
16+
{
17+
await m_sheet.PushAsync(new NavigationPage3(m_sheet));
18+
}
19+
20+
private async void OnPopToRootClicked(object? sender, EventArgs e)
21+
{
22+
await m_sheet.PopToRootAsync();
23+
}
24+
}
25+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<dui:ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
5+
xmlns:dui="http://dips.com/mobile.ui"
6+
x:Class="Components.ComponentsSamples.BottomSheets.Sheets.NavigationPage3"
7+
Title="Page 3">
8+
9+
<dui:VerticalStackLayout Spacing="{dui:Sizes content_margin_medium}"
10+
Margin="{dui:Thickness Left=content_margin_medium, Right=content_margin_medium, Top=content_margin_large}">
11+
<dui:Label Text="This is the deepest page. Use the back button to go back, or jump straight to the root."
12+
Padding="{dui:Thickness size_4}"
13+
Style="{dui:Styles Label=UI200}" />
14+
15+
<dui:Button Text="Pop to root"
16+
Clicked="OnPopToRootClicked" />
17+
</dui:VerticalStackLayout>
18+
19+
</dui:ContentPage>
20+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using DIPS.Mobile.UI.Components.BottomSheets;
2+
3+
namespace Components.ComponentsSamples.BottomSheets.Sheets;
4+
5+
public partial class NavigationPage3
6+
{
7+
private readonly BottomSheet m_sheet;
8+
9+
public NavigationPage3(BottomSheet sheet)
10+
{
11+
m_sheet = sheet;
12+
InitializeComponent();
13+
}
14+
15+
private async void OnPopToRootClicked(object? sender, EventArgs e)
16+
{
17+
await m_sheet.PopToRootAsync();
18+
}
19+
}
20+

0 commit comments

Comments
 (0)