Skip to content

Commit 0785559

Browse files
committed
Updated .gitignore, upgraded Roslynator.Analyzers version, and refactored MainPage.xaml
- Added "*.meteor/" to .gitignore - Upgraded Roslynator.Analyzers from version 4.5.0 to 4.12.4 in Directory.build.props - Refactored MainPage.xaml for better readability and added new features such as a switch toggle and button functionalities. - Updated the Microsoft.Maui.Controls package versions in WhatIsThisSheet.Sample.csproj. - Made significant changes to BottomSheet.cs including code cleanup, property updates, and method enhancements for better functionality.
1 parent 88c9ce6 commit 0785559

7 files changed

+354
-272
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -400,3 +400,5 @@ FodyWeavers.xsd
400400
*.DS_Store
401401

402402
.idea/
403+
404+
*.meteor/

Directory.build.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
Version="8.0.0"
2121
PrivateAssets="all" />
2222
<PackageReference Include="Roslynator.Analyzers"
23-
Version="4.5.0"
23+
Version="4.12.4"
2424
PrivateAssets="All" />
2525
</ItemGroup>
2626
<ItemGroup>

WhatIsThisSheet.Sample/MainPage.xaml

+43-22
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,57 @@
11
<?xml version="1.0" encoding="utf-8" ?>
2-
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
3-
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
4-
xmlns:wits="http://what.is.this.sheet/schemas/controls"
5-
x:Class="MauiDrawer.Sample.MainPage">
2+
<ContentPage
3+
x:Class="MauiDrawer.Sample.MainPage"
4+
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
5+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
6+
xmlns:wits="http://what.is.this.sheet/schemas/controls"
7+
BackgroundColor="LightYellow">
8+
9+
<Grid
10+
Padding="8"
11+
ColumnDefinitions="*"
12+
IgnoreSafeArea="True"
13+
RowDefinitions="auto,auto,auto,auto,auto,*"
14+
RowSpacing="8">
615

7-
<Grid ColumnDefinitions="*" RowDefinitions="auto,auto,auto,auto,auto,*" RowSpacing="8">
816
<Button
9-
Text="Tapped" TextColor="Blue" Clicked="Button_Clicked"
10-
VerticalOptions="Start" HorizontalOptions="Center"
11-
Grid.Row="0"/>
17+
Grid.Row="1"
18+
Clicked="Dismiss_Clicked"
19+
Text="Dismiss" />
1220

13-
<Button Text="Dismiss" Clicked="Dismiss_Clicked"
14-
Grid.Row="1" />
21+
<Switch
22+
x:Name="HideOnDismiss"
23+
Grid.Row="2"
24+
Toggled="Switch_Toggled" />
1525

16-
<Switch x:Name="HideOnDismiss" Toggled="Switch_Toggled"
17-
Grid.Row="2" />
18-
19-
<Button Text="Show" Clicked="Show_Clicked"
20-
Grid.Row="3" />
26+
<Button
27+
Grid.Row="3"
28+
Clicked="Show_Clicked"
29+
Text="Show" />
2130

22-
<Button Text="GetTapped" Clicked="GetTapped_Clicked"
23-
Grid.Row="4" />
31+
<Button
32+
Grid.Row="4"
33+
Clicked="GetTapped_Clicked"
34+
Text="GetTapped" />
2435

25-
<wits:BottomSheet x:Name="MainBottomSheet"
36+
<wits:BottomSheet
37+
x:Name="MainBottomSheet"
2638
Grid.Row="0"
27-
Grid.RowSpan="6">
39+
Grid.RowSpan="6"
40+
Margin="-8">
41+
<wits:BottomSheet.SheetStops>
42+
<wits:SheetStop Measurement="Fixed" Value="20" />
43+
<wits:SheetStop Measurement="Percentage" Value=".33" />
44+
<wits:SheetStop Measurement="Percentage" Value="0.0" />
45+
</wits:BottomSheet.SheetStops>
2846
<StackLayout Padding="8" Spacing="8">
29-
<Label Text="Let there be text..." HeightRequest="80" />
47+
<Label HeightRequest="80" Text="Let there be text..." />
3048
<Image Source="dotnet_bot.png" />
3149
<Label Text="This is a picture of a car" />
32-
<Button Text="Toggle Background Interaction" Clicked="ToggleBackgroundInteraction_Clicked" />
33-
<Button x:Name="LockPosition" Text="Lock Position" Clicked="LockPosition_Clicked" />
50+
<Button Clicked="ToggleBackgroundInteraction_Clicked" Text="Toggle Background Interaction" />
51+
<Button
52+
x:Name="LockPosition"
53+
Clicked="LockPosition_Clicked"
54+
Text="Lock Position" />
3455
</StackLayout>
3556
</wits:BottomSheet>
3657
</Grid>

WhatIsThisSheet.Sample/MainPage.xaml.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ private void Dismiss_Clicked(object sender, System.EventArgs e)
2424

2525
private void Switch_Toggled(object sender, Microsoft.Maui.Controls.ToggledEventArgs e)
2626
{
27-
MainBottomSheet.AllowDismiss = !MainBottomSheet.AllowDismiss;
27+
MainBottomSheet.AllowFullDismiss = !MainBottomSheet.AllowFullDismiss;
2828
}
2929

3030
private void Show_Clicked(object sender, System.EventArgs e)

WhatIsThisSheet.Sample/WhatIsThisSheet.Sample.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@
6060
</ItemGroup>
6161

6262
<ItemGroup>
63-
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
64-
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
63+
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.61" />
64+
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.61" />
6565
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
6666
</ItemGroup>
6767

0 commit comments

Comments
 (0)