From 5a57d6e63b94f54ff3bc6f07089193f57c51b404 Mon Sep 17 00:00:00 2001 From: Allan Ritchie Date: Wed, 25 May 2016 12:49:31 -0400 Subject: [PATCH] fix #175 toast position in readonly --- nuspec/Acr.UserDialogs.nuspec | 4 +++- src/Acr.UserDialogs.Interface/ToastConfig.cs | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/nuspec/Acr.UserDialogs.nuspec b/nuspec/Acr.UserDialogs.nuspec index 21d51d19..d63325c6 100644 --- a/nuspec/Acr.UserDialogs.nuspec +++ b/nuspec/Acr.UserDialogs.nuspec @@ -2,7 +2,7 @@ Acr.UserDialogs - 5.2.0 + 5.2.1 ACR User Dialogs Plugin for Xamarin and Windows Allows for messagebox style dialogs to be called from your shared/PCL/MVVM code @@ -65,6 +65,8 @@ Supported Platforms --> +5.2.1 +[fix] toastposition get/set 5.2 [feature] cancellable standard dialogs. use cancellationtokens or disposable pattern from sync versions [feature] date/time dialogs diff --git a/src/Acr.UserDialogs.Interface/ToastConfig.cs b/src/Acr.UserDialogs.Interface/ToastConfig.cs index 94186433..b55e9325 100644 --- a/src/Acr.UserDialogs.Interface/ToastConfig.cs +++ b/src/Acr.UserDialogs.Interface/ToastConfig.cs @@ -56,7 +56,7 @@ public class ToastConfig /// /// Only applies to iOS at the moment /// - public ToastPosition Position { get; } + public ToastPosition Position { get; set; } public Color BackgroundColor { get; set; } public IBitmap Icon { get; set; } public string Title { get; set; } @@ -123,6 +123,12 @@ public ToastConfig SetDuration(TimeSpan duration) } + public ToastConfig SetPosition(ToastPosition position) + { + this.Position = position; + return this; + } + public ToastConfig SetIcon(IBitmap bitmap) { this.Icon = bitmap;