Sm.Maui.BottomSheet
0.1.6
dotnet add package Sm.Maui.BottomSheet --version 0.1.6
NuGet\Install-Package Sm.Maui.BottomSheet -Version 0.1.6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Sm.Maui.BottomSheet" Version="0.1.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Sm.Maui.BottomSheet --version 0.1.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Sm.Maui.BottomSheet, 0.1.6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Sm.Maui.BottomSheet as a Cake Addin #addin nuget:?package=Sm.Maui.BottomSheet&version=0.1.6 // Install Sm.Maui.BottomSheet as a Cake Tool #tool nuget:?package=Sm.Maui.BottomSheet&version=0.1.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
BottomSheet
ModalBottomSheet for .NET MAUI
Installation
First, install NuGet. Then, install Sm.Maui.BottomSheet from the package manager console:
PM> Install-Package Sm.Maui.BottomSheet
Usage - Implementation
In order to use this BottomSheet view, you must wrap page content into Grid and add there ModalBottomSheet
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:bottomSheet="clr-namespace:S1LV3Rman.BottomSheet;assembly=BottomSheet"
x:Class="BottomSheetDemo.MainPage">
<Grid>
<bottomSheet:ModalBottomSheet>
</bottomSheet:ModalBottomSheet>
</Grid>
</ContentPage>
Usage - Interaction
To open use ShowAsync()
, to close use HideAsync()
or you can toggle state with ToggleAsync()
<Grid>
<Button Text="Show"
VerticalOptions="Start"
Clicked="ShowButtonClicked"/>
<bottomSheet:ModalBottomSheet x:Name="bottomSheet">
<Button Text="Hide"
Clicked="HideButtonClicked"/>
</bottomSheet:ModalBottomSheet>
</Grid>
private void ShowButtonClicked(object sender, EventArgs e)
{
bottomSheet.ShowAsync();
}
private void HideButtonClicked(object sender, EventArgs e)
{
bottomSheet.HideAsync();
}
Usage - Available properties
CornersRadius
Sets top left and right corners radius
<bottomSheet:ModalBottomSheet CornersRadius="25">
</bottomSheet:ModalBottomSheet>
Color
Sets the color
<bottomSheet:ModalBottomSheet Color="White">
</bottomSheet:ModalBottomSheet>
BlockExpanding
Disables expanding to fullscreen
<bottomSheet:ModalBottomSheet BlockExpanding="True">
</bottomSheet:ModalBottomSheet>
IsOpened
Readonly. True
when opened, False
when closed
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-android31.0 is compatible. net6.0-ios was computed. net6.0-ios15.4 is compatible. net6.0-maccatalyst was computed. net6.0-maccatalyst15.4 is compatible. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net6.0-windows10.0.19041 is compatible. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- M.BindableProperty.Generator (>= 0.8.2)
-
net6.0-android31.0
- M.BindableProperty.Generator (>= 0.8.2)
-
net6.0-ios15.4
- M.BindableProperty.Generator (>= 0.8.2)
- System.Runtime.InteropServices.NFloat.Internal (>= 6.0.1)
-
net6.0-maccatalyst15.4
- M.BindableProperty.Generator (>= 0.8.2)
- System.Runtime.InteropServices.NFloat.Internal (>= 6.0.1)
-
net6.0-windows10.0.19041
- M.BindableProperty.Generator (>= 0.8.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.