DialogMessaging.MvvmCross
0.1.0
See the version list below for details.
dotnet add package DialogMessaging.MvvmCross --version 0.1.0
NuGet\Install-Package DialogMessaging.MvvmCross -Version 0.1.0
<PackageReference Include="DialogMessaging.MvvmCross" Version="0.1.0" />
paket add DialogMessaging.MvvmCross --version 0.1.0
#r "nuget: DialogMessaging.MvvmCross, 0.1.0"
// Install DialogMessaging.MvvmCross as a Cake Addin #addin nuget:?package=DialogMessaging.MvvmCross&version=0.1.0 // Install DialogMessaging.MvvmCross as a Cake Tool #tool nuget:?package=DialogMessaging.MvvmCross&version=0.1.0
<div align="center">
</div>
DialogMessaging
Inspired by Acr.UserDialogs, DialogMessaging is a cross platform, customizable dialog messaging service.
Dialogs
- Alert*
- Confirm*
- Delete*
- Loading*
- Action sheet*
- Action sheet bottom*
- Login *
- Prompt*
- Toast
- Snackbar
*Synchronous and asynchronous methods are available.
Getting Started (MvvmCross)
Add a reference to DialogMessaging.Core
and DialogMessaging.MvvmCross
. At the entry point for your app call DialogMessaging.MessagingService.Init()
.
Additional Steps for Android
Inside the Init
method you must provide an Activity or Application reference.
Add the following to the BindView
method of your MvxAndroidViewBinder
:
public override void BindView(View view, Context context, IAttributeSet attrs)
{
...
MessagingService.OnViewInflated(view, attrs);
}
See Setup
and ViewBinder
.
Getting Started (non-MvvmCross)
DialogMessaging relies on ViewPump. Add a reference to the project and see the GitHub page for getting started. You should initialize the ViewPump service before StylingX to allow StylingX to register with ViewPump.
Add a reference to DialogMessaging.Core
and DialogMessaging
. At the entry point for your app call DialogMessaging.MessagingService.Init()
.
Additional Steps for Android
Inside the Init
method you must provide an Activity or Application reference.
Customization
You can access and set a custom IMessagingDelegate
via DialogMessaging.MessagingService.Delegate
. These delegate methods are called by their respective display methods and allow you to customize the display process. By returning true
or false
you can optionally cancel dialogs from being shown. If you set a custom IMessagingService
you are responsible for calling and handling delegate methods.
Android
You can set layout and style ID's on a dialog-by-dialog basis or you can assign default values. If no customization is provided the normal Android AlertDialog's and internal layouts will be used.
// Defaults.
IAlertConfig.DefaultLayoutID = Resource.Layout.MyCustomLayout;
IAlertConfig.DefaultStyleID = Resource.Style.MyAppTheme;
// Individual dialog.
var alertConfig = new AlertConfig
{
LayoutID = Resource.Layout.MyCustomLayout,
StyleID = Resource.Style.MyAppTheme
};
In your custom layouts, assign dialog elements using the app:DialogElement
tag. Any part of the layout that uses this tag will be hidden if the corresponding data inside of the configuration holds no value. For example: if Title
within the configuration object is null or empty any layout element that uses app:DialogElement="Title"
will be hidden. This can be customised using the app:HideWhenNotInUse
tag which by default is set to true
.
See DialogElement
for all usable dialog element values. Be aware that not all are available for every dialog. For example: ProgressDeterminate
isn't available when using Alert
.
iOS
You can set view types on a dialog-by-dialog basis or you can assign default values. If no customization is provided the normal iOS UIAlertController's and internal views will be used.
// Defaults.
IAlertConfig.DefaultViewType = typeof(CustomAlertView);
// Individual dialog.
var alertConfig = new AlertConfig
{
ViewType = typeof(CustomAlertView)
};
Your custom views must implement IShowable
which gives you the Show
and Dismiss
methods. This is where you control the presentation of your view such as animations. You should not interact with the view hierarchy as this is done for you. You can optionally assign DialogViewAttribute
to your view class if the view has an associated XIB/NIB file. To assign configuration values to your view, implement IValueAssigner
.
Samples
See samples for examples.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. monoandroid10.0 is compatible. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. xamarinios10 is compatible. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- DialogMessaging.Core (>= 0.1.0)
- MvvmCross (>= 7.1.2)
-
MonoAndroid 10.0
- DialogMessaging.Core (>= 0.1.0)
- MvvmCross (>= 7.1.2)
-
Xamarin.iOS 1.0
- DialogMessaging.Core (>= 0.1.0)
- MvvmCross (>= 7.1.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.3-alpha-e8f2459-e8f2459 | 620 | 2/1/2022 |
1.0.3-alpha-6 | 620 | 2/1/2022 |
1.0.3-alpha-5 | 610 | 2/1/2022 |
1.0.2 | 1,006 | 1/12/2022 |
1.0.2-alpha-e8f2459-e8f2459 | 650 | 2/1/2022 |
1.0.2-alpha-19a32ce-19a32ce | 621 | 1/28/2022 |
1.0.2-alpha-0c45202-0c45202 | 623 | 2/1/2022 |
1.0.1 | 806 | 10/15/2021 |
1.0.0 | 777 | 9/7/2021 |
0.99.23-alpha-75c849d | 678 | 8/23/2021 |
0.99.22-Cdd7d7b9 | 666 | 7/14/2021 |
0.99.21-working-4c6285b | 659 | 7/13/2021 |
0.99.20-C07546ac | 671 | 7/9/2021 |
0.99.19-C0f0acc3 | 645 | 7/9/2021 |
0.99.17-alpha | 655 | 7/2/2021 |
0.99.16-alpha | 648 | 7/2/2021 |
0.99.15-alpha | 683 | 6/25/2021 |
0.99.14-alpha | 682 | 6/21/2021 |
0.99.13-alpha | 668 | 6/15/2021 |
0.99.12-alpha | 650 | 6/7/2021 |
0.99.11-alpha | 683 | 6/7/2021 |
0.99.10-alpha | 659 | 6/7/2021 |
0.99.9-alpha | 686 | 6/4/2021 |
0.99.8-alpha | 670 | 5/20/2021 |
0.99.7-alpha | 653 | 5/10/2021 |
0.99.6-alpha | 680 | 5/8/2021 |
0.99.5-alpha | 739 | 5/7/2021 |
0.99.4-alpha | 719 | 5/7/2021 |
0.99.3-alpha | 659 | 4/30/2021 |
0.99.2-alpha | 690 | 4/20/2021 |
0.99.1-alpha | 628 | 4/2/2021 |
0.99.0-alpha | 689 | 3/4/2021 |
0.1.0 | 850 | 3/4/2021 |