Plugin.Maui.CardView
1.0.7
dotnet add package Plugin.Maui.CardView --version 1.0.7
NuGet\Install-Package Plugin.Maui.CardView -Version 1.0.7
<PackageReference Include="Plugin.Maui.CardView" Version="1.0.7" />
<PackageVersion Include="Plugin.Maui.CardView" Version="1.0.7" />
<PackageReference Include="Plugin.Maui.CardView" />
paket add Plugin.Maui.CardView --version 1.0.7
#r "nuget: Plugin.Maui.CardView, 1.0.7"
#:package Plugin.Maui.CardView@1.0.7
#addin nuget:?package=Plugin.Maui.CardView&version=1.0.7
#tool nuget:?package=Plugin.Maui.CardView&version=1.0.7
Plugin.Maui.CardView
Plugin.Maui.CardView - is a cross-platform plugin for .NET MAUI , displays payment card information in a modern, stylized view. Supports card number, cardholder name, expiration date, and integrates with entry fields for seamless user input.
How To Use
Available on NuGet: https://www.nuget.org/packages/Plugin.Maui.CardView/1.0.6
Install this Plugin in your .NET MAUI Project
Now add following namespace to your content page
xmlns:cardView="clr-namespace:CardViewControl;assembly=CardViewControl"
How To Display CardView
Use following code in your content page to display CardView Control
CardViewDemo.xaml
<cardView:CardView CardNumber="{Binding CardNumber}"
x:Name="cardView"
ExpiryMonth="{Binding ExpiryMonth}"
ExpiryYear="{Binding ExpiryYear}"
FormattedCardNumber="{Binding FormattedCardNumber}"
CVC="{Binding Cvv}"
Zip="{Binding Zip}"
/>
Bind Card Number, Expiry Month, Expiry Year ... Property In ViewModel
Use following code in your ViewModel
CardViewDemoViewModel
public partial class AddCardPopupViewModel : ObservableObject
{
[ObservableProperty]
private string _cardNumber;
[ObservableProperty]
private string _cardHolderName;
[ObservableProperty]
private string _cvv;
[ObservableProperty]
private string _zip;
[ObservableProperty]
private int? _expiryMonth;
[ObservableProperty]
private int? _expiryYear;
[RelayCommand]
private void Submit()
{
var cardNumber = CardNumber;
var expiryMonth = ExpiryMonth;
var expiryYear = ExpiryYear;
var cvv = Cvv;
var zip = Zip;
}
}
Validating CardView Control
Use following code in your ViewModel
bool isValid = cardView.ValidateCardDetails()
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0-android35.0 is compatible. net9.0-ios18.0 is compatible. net9.0-maccatalyst18.0 is compatible. net9.0-windows10.0.19041 is compatible. net10.0-android was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-windows was computed. |
-
net9.0-android35.0
- Microsoft.Maui.Controls (>= 9.0.51)
-
net9.0-ios18.0
- Microsoft.Maui.Controls (>= 9.0.51)
-
net9.0-maccatalyst18.0
- Microsoft.Maui.Controls (>= 9.0.51)
-
net9.0-windows10.0.19041
- Microsoft.Maui.Controls (>= 9.0.51)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.