diff options
author | Samantha Houts <samhouts@users.noreply.github.com> | 2017-04-07 00:47:33 -0700 |
---|---|---|
committer | Stephane Delcroix <stephane@delcroix.org> | 2017-04-07 09:47:33 +0200 |
commit | 5f2796e160f99bad31c1b06a2d1f328b5ed02ba3 (patch) | |
tree | 1be94941400ed554767836b588106b3f105cb21b /Xamarin.Forms.Core | |
parent | 45a6a80b4c2d9be199f7c61a89bbaa3e5f829564 (diff) | |
download | xamarin-forms-5f2796e160f99bad31c1b06a2d1f328b5ed02ba3.tar.gz xamarin-forms-5f2796e160f99bad31c1b06a2d1f328b5ed02ba3.tar.bz2 xamarin-forms-5f2796e160f99bad31c1b06a2d1f328b5ed02ba3.zip |
[Internal] Normalize Obsolete attributes (#860)
* [All] Normalize Obsolete attributes.
Make sure we include the version in which the member was deprecated and
consistent instructions for working around the deprecation, if
applicable.
* Update docs
Diffstat (limited to 'Xamarin.Forms.Core')
28 files changed, 55 insertions, 53 deletions
diff --git a/Xamarin.Forms.Core/AbsoluteLayout.cs b/Xamarin.Forms.Core/AbsoluteLayout.cs index 43924831..db69bdb7 100644 --- a/Xamarin.Forms.Core/AbsoluteLayout.cs +++ b/Xamarin.Forms.Core/AbsoluteLayout.cs @@ -74,7 +74,7 @@ namespace Xamarin.Forms base.OnChildRemoved(child); } - [Obsolete("Use OnMeasure")] + [Obsolete("OnSizeRequest is obsolete as of version 2.2.0. Please use OnMeasure instead.")] protected override SizeRequest OnSizeRequest(double widthConstraint, double heightConstraint) { var bestFitSize = new Size(); diff --git a/Xamarin.Forms.Core/BindableProperty.cs b/Xamarin.Forms.Core/BindableProperty.cs index e0cbbdd5..abe47256 100644 --- a/Xamarin.Forms.Core/BindableProperty.cs +++ b/Xamarin.Forms.Core/BindableProperty.cs @@ -115,7 +115,7 @@ namespace Xamarin.Forms internal ValidateValueDelegate ValidateValue { get; private set; } - [Obsolete("Generic versions of Create () are no longer supported and deprecated. They will be removed soon.")] + [Obsolete("Create<> (generic) is obsolete as of version 2.1.0 and is no longer supported.")] public static BindableProperty Create<TDeclarer, TPropertyType>(Expression<Func<TDeclarer, TPropertyType>> getter, TPropertyType defaultValue, BindingMode defaultBindingMode = BindingMode.OneWay, ValidateValueDelegate<TPropertyType> validateValue = null, BindingPropertyChangedDelegate<TPropertyType> propertyChanged = null, BindingPropertyChangingDelegate<TPropertyType> propertyChanging = null, CoerceValueDelegate<TPropertyType> coerceValue = null, @@ -132,7 +132,7 @@ namespace Xamarin.Forms defaultValueCreator: defaultValueCreator); } - [Obsolete("Generic versions of Create () are no longer supported and deprecated. They will be removed soon.")] + [Obsolete("CreateAttached<> (generic) is obsolete as of version 2.1.0 and is no longer supported.")] public static BindableProperty CreateAttached<TDeclarer, TPropertyType>(Expression<Func<BindableObject, TPropertyType>> staticgetter, TPropertyType defaultValue, BindingMode defaultBindingMode = BindingMode.OneWay, ValidateValueDelegate<TPropertyType> validateValue = null, BindingPropertyChangedDelegate<TPropertyType> propertyChanged = null, BindingPropertyChangingDelegate<TPropertyType> propertyChanging = null, CoerceValueDelegate<TPropertyType> coerceValue = null, @@ -149,7 +149,7 @@ namespace Xamarin.Forms return CreateAttached(propertyName, returnType, declaringType, defaultValue, defaultBindingMode, validateValue, propertyChanged, propertyChanging, coerceValue, null, false, defaultValueCreator); } - [Obsolete("Generic versions of Create () are no longer supported and deprecated. They will be removed soon.")] + [Obsolete("CreateAttachedReadOnly<> (generic) is obsolete as of version 2.1.0 and is no longer supported.")] public static BindablePropertyKey CreateAttachedReadOnly<TDeclarer, TPropertyType>(Expression<Func<BindableObject, TPropertyType>> staticgetter, TPropertyType defaultValue, BindingMode defaultBindingMode = BindingMode.OneWayToSource, ValidateValueDelegate<TPropertyType> validateValue = null, BindingPropertyChangedDelegate<TPropertyType> propertyChanged = null, BindingPropertyChangingDelegate<TPropertyType> propertyChanging = null, @@ -170,7 +170,7 @@ namespace Xamarin.Forms defaultValueCreator)); } - [Obsolete("Generic versions of Create () are no longer supported and deprecated. They will be removed soon.")] + [Obsolete("CreateReadOnly<> (generic) is obsolete as of version 2.1.0 and is no longer supported.")] public static BindablePropertyKey CreateReadOnly<TDeclarer, TPropertyType>(Expression<Func<TDeclarer, TPropertyType>> getter, TPropertyType defaultValue, BindingMode defaultBindingMode = BindingMode.OneWayToSource, ValidateValueDelegate<TPropertyType> validateValue = null, BindingPropertyChangedDelegate<TPropertyType> propertyChanged = null, BindingPropertyChangingDelegate<TPropertyType> propertyChanging = null, @@ -188,7 +188,7 @@ namespace Xamarin.Forms isReadOnly: true, defaultValueCreator: defaultValueCreator)); } - [Obsolete("Generic versions of Create () are no longer supported and deprecated. They will be removed soon.")] + [Obsolete("Create<> (generic) is obsolete as of version 2.1.0 and is no longer supported.")] internal static BindableProperty Create<TDeclarer, TPropertyType>(Expression<Func<TDeclarer, TPropertyType>> getter, TPropertyType defaultValue, BindingMode defaultBindingMode, ValidateValueDelegate<TPropertyType> validateValue, BindingPropertyChangedDelegate<TPropertyType> propertyChanged, BindingPropertyChangingDelegate<TPropertyType> propertyChanging, CoerceValueDelegate<TPropertyType> coerceValue, BindablePropertyBindingChanging bindingChanging, bool isReadOnly = false, @@ -237,7 +237,7 @@ namespace Xamarin.Forms defaultValueCreator: defaultValueCreator); } - [Obsolete("Generic versions of Create () are no longer supported and deprecated. They will be removed soon.")] + [Obsolete("CreateAttached<> (generic) is obsolete as of version 2.1.0 and is no longer supported.")] internal static BindableProperty CreateAttached<TDeclarer, TPropertyType>(Expression<Func<BindableObject, TPropertyType>> staticgetter, TPropertyType defaultValue, BindingMode defaultBindingMode, ValidateValueDelegate<TPropertyType> validateValue, BindingPropertyChangedDelegate<TPropertyType> propertyChanged, BindingPropertyChangingDelegate<TPropertyType> propertyChanging, CoerceValueDelegate<TPropertyType> coerceValue, BindablePropertyBindingChanging bindingChanging, bool isReadOnly = false, diff --git a/Xamarin.Forms.Core/BoxView.cs b/Xamarin.Forms.Core/BoxView.cs index 9a7a4f77..6725d998 100644 --- a/Xamarin.Forms.Core/BoxView.cs +++ b/Xamarin.Forms.Core/BoxView.cs @@ -26,7 +26,7 @@ namespace Xamarin.Forms return _platformConfigurationRegistry.Value.On<T>(); } - [Obsolete("Use OnMeasure")] + [Obsolete("OnSizeRequest is obsolete as of version 2.2.0. Please use OnMeasure instead.")] protected override SizeRequest OnSizeRequest(double widthConstraint, double heightConstraint) { return new SizeRequest(new Size(40, 40)); diff --git a/Xamarin.Forms.Core/Cells/EntryCell.cs b/Xamarin.Forms.Core/Cells/EntryCell.cs index b61f685f..2ec8730a 100644 --- a/Xamarin.Forms.Core/Cells/EntryCell.cs +++ b/Xamarin.Forms.Core/Cells/EntryCell.cs @@ -17,7 +17,8 @@ namespace Xamarin.Forms public static readonly BindableProperty HorizontalTextAlignmentProperty = BindableProperty.Create("HorizontalTextAlignment", typeof(TextAlignment), typeof(EntryCell), TextAlignment.Start, propertyChanged: OnHorizontalTextAlignmentPropertyChanged); - [Obsolete("XAlignProperty is obsolete. Please use HorizontalTextAlignmentProperty instead.")] public static readonly BindableProperty XAlignProperty = HorizontalTextAlignmentProperty; + [Obsolete("XAlignProperty is obsolete as of version 2.0.0. Please use HorizontalTextAlignmentProperty instead.")] + public static readonly BindableProperty XAlignProperty = HorizontalTextAlignmentProperty; public TextAlignment HorizontalTextAlignment { @@ -55,7 +56,7 @@ namespace Xamarin.Forms set { SetValue(TextProperty, value); } } - [Obsolete("XAlign is obsolete. Please use HorizontalTextAlignment instead.")] + [Obsolete("XAlign is obsolete as of version 2.0.0. Please use HorizontalTextAlignment instead.")] public TextAlignment XAlign { get { return (TextAlignment)GetValue(XAlignProperty); } diff --git a/Xamarin.Forms.Core/Color.cs b/Xamarin.Forms.Core/Color.cs index 227f2817..9d2bfcbd 100644 --- a/Xamarin.Forms.Core/Color.cs +++ b/Xamarin.Forms.Core/Color.cs @@ -405,7 +405,8 @@ namespace Xamarin.Forms public static readonly Color FloralWhite = FromRgb(255, 250, 240); public static readonly Color ForestGreen = FromRgb(34, 139, 34); public static readonly Color Fuchsia = FromRgb(255, 0, 255); - [Obsolete("Fuschia is obsolete as of version 1.3, please use the correct spelling of Fuchsia")] public static readonly Color Fuschia = FromRgb(255, 0, 255); + [Obsolete("Fuschia is obsolete as of version 1.3.0. Please use Fuchsia instead.")] + public static readonly Color Fuschia = FromRgb(255, 0, 255); public static readonly Color Gainsboro = FromRgb(220, 220, 220); public static readonly Color GhostWhite = FromRgb(248, 248, 255); public static readonly Color Gold = FromRgb(255, 215, 0); diff --git a/Xamarin.Forms.Core/ContentPresenter.cs b/Xamarin.Forms.Core/ContentPresenter.cs index 5dce2145..cde0f5de 100644 --- a/Xamarin.Forms.Core/ContentPresenter.cs +++ b/Xamarin.Forms.Core/ContentPresenter.cs @@ -28,7 +28,7 @@ namespace Xamarin.Forms } } - [Obsolete("Use OnMeasure")] + [Obsolete("OnSizeRequest is obsolete as of version 2.2.0. Please use OnMeasure instead.")] protected override SizeRequest OnSizeRequest(double widthConstraint, double heightConstraint) { double widthRequest = WidthRequest; diff --git a/Xamarin.Forms.Core/Device.cs b/Xamarin.Forms.Core/Device.cs index d7f293ff..cfeab5ae 100644 --- a/Xamarin.Forms.Core/Device.cs +++ b/Xamarin.Forms.Core/Device.cs @@ -29,7 +29,7 @@ namespace Xamarin.Forms [EditorBrowsable(EditorBrowsableState.Never)] public static void SetTargetIdiom(TargetIdiom value) => Idiom = value; - [Obsolete("Use RuntimePlatform instead.")] + [Obsolete("TargetPlatform is obsolete as of version 2.3.4. Please use RuntimePlatform instead.")] #pragma warning disable 0618 public static TargetPlatform OS { @@ -97,7 +97,7 @@ namespace Xamarin.Forms return GetNamedSize(size, targetElementType, false); } - [Obsolete("Use switch(RuntimePlatform) instead.")] + [Obsolete("OnPlatform is obsolete as of version 2.3.4. Please use switch(RuntimePlatform) instead.")] public static void OnPlatform(Action iOS = null, Action Android = null, Action WinPhone = null, Action Default = null) { switch (OS) @@ -128,7 +128,7 @@ namespace Xamarin.Forms } } - [Obsolete("Use switch(RuntimePlatform) instead.")] + [Obsolete("OnPlatform<> (generic) is obsolete as of version 2.3.4. Please use switch(RuntimePlatform) instead.")] public static T OnPlatform<T>(T iOS, T Android, T WinPhone) { switch (OS) diff --git a/Xamarin.Forms.Core/Element.cs b/Xamarin.Forms.Core/Element.cs index bb0199a0..1989f78a 100644 --- a/Xamarin.Forms.Core/Element.cs +++ b/Xamarin.Forms.Core/Element.cs @@ -76,7 +76,7 @@ namespace Xamarin.Forms } } - [Obsolete("Use Parent")] + [Obsolete("ParentView is obsolete as of version 2.1.0. Please use Parent instead.")] public VisualElement ParentView { get diff --git a/Xamarin.Forms.Core/Font.cs b/Xamarin.Forms.Core/Font.cs index bb6da4f4..c1283e09 100644 --- a/Xamarin.Forms.Core/Font.cs +++ b/Xamarin.Forms.Core/Font.cs @@ -82,14 +82,14 @@ namespace Xamarin.Forms return result; } - [Obsolete("BoldSystemFontOfSize is obsolete, please use SystemFontOfSize (double, FontAttributes)")] + [Obsolete("BoldSystemFontOfSize is obsolete as of version 1.2.0. Please use SystemFontOfSize (double, FontAttributes) instead.")] public static Font BoldSystemFontOfSize(double size) { var result = new Font { FontSize = size, FontAttributes = FontAttributes.Bold }; return result; } - [Obsolete("BoldSystemFontOfSize is obsolete, please use SystemFontOfSize (NamedSize, FontAttributes)")] + [Obsolete("BoldSystemFontOfSize is obsolete as of version 1.2.0. Please use SystemFontOfSize (NamedSize, FontAttributes) instead.")] public static Font BoldSystemFontOfSize(NamedSize size) { var result = new Font { NamedSize = size, FontAttributes = FontAttributes.Bold }; diff --git a/Xamarin.Forms.Core/FontSizeConverter.cs b/Xamarin.Forms.Core/FontSizeConverter.cs index 0d0a8865..be4d961e 100644 --- a/Xamarin.Forms.Core/FontSizeConverter.cs +++ b/Xamarin.Forms.Core/FontSizeConverter.cs @@ -6,7 +6,7 @@ namespace Xamarin.Forms { public class FontSizeConverter : TypeConverter, IExtendedTypeConverter { - [Obsolete("use ConvertFromInvariantString (string, IServiceProvider)")] + [Obsolete("IExtendedTypeConverter.ConvertFrom is obsolete as of version 2.2.0. Please use ConvertFromInvariantString (string, IServiceProvider) instead.")] object IExtendedTypeConverter.ConvertFrom(CultureInfo culture, object value, IServiceProvider serviceProvider) { return ((IExtendedTypeConverter)this).ConvertFromInvariantString(value as string, serviceProvider); diff --git a/Xamarin.Forms.Core/GridCalc.cs b/Xamarin.Forms.Core/GridCalc.cs index 778e188e..f04e356f 100644 --- a/Xamarin.Forms.Core/GridCalc.cs +++ b/Xamarin.Forms.Core/GridCalc.cs @@ -49,7 +49,7 @@ namespace Xamarin.Forms } } - [Obsolete("Use OnMeasure")] + [Obsolete("OnSizeRequest is obsolete as of version 2.2.0. Please use OnMeasure instead.")] protected override SizeRequest OnSizeRequest(double widthConstraint, double heightConstraint) { if (!InternalChildren.Any()) diff --git a/Xamarin.Forms.Core/IExtendedTypeConverter.cs b/Xamarin.Forms.Core/IExtendedTypeConverter.cs index e3b16b52..ca1ab7a1 100644 --- a/Xamarin.Forms.Core/IExtendedTypeConverter.cs +++ b/Xamarin.Forms.Core/IExtendedTypeConverter.cs @@ -5,7 +5,7 @@ namespace Xamarin.Forms { public interface IExtendedTypeConverter { - [Obsolete("use ConvertFromInvariantString (string, IServiceProvider)")] + [Obsolete("IExtendedTypeConverter.ConvertFrom is obsolete as of version 2.2.0. Please use ConvertFromInvariantString (string, IServiceProvider) instead.")] object ConvertFrom(CultureInfo culture, object value, IServiceProvider serviceProvider); object ConvertFromInvariantString(string value, IServiceProvider serviceProvider); diff --git a/Xamarin.Forms.Core/Image.cs b/Xamarin.Forms.Core/Image.cs index 5a9386c6..ca4c706e 100644 --- a/Xamarin.Forms.Core/Image.cs +++ b/Xamarin.Forms.Core/Image.cs @@ -59,7 +59,7 @@ namespace Xamarin.Forms base.OnBindingContextChanged(); } - [Obsolete("Use OnMeasure")] + [Obsolete("OnSizeRequest is obsolete as of version 2.2.0. Please use OnMeasure instead.")] protected override SizeRequest OnSizeRequest(double widthConstraint, double heightConstraint) { SizeRequest desiredSize = base.OnSizeRequest(double.PositiveInfinity, double.PositiveInfinity); diff --git a/Xamarin.Forms.Core/Label.cs b/Xamarin.Forms.Core/Label.cs index b9794118..f17093a1 100644 --- a/Xamarin.Forms.Core/Label.cs +++ b/Xamarin.Forms.Core/Label.cs @@ -12,13 +12,13 @@ namespace Xamarin.Forms public static readonly BindableProperty HorizontalTextAlignmentProperty = BindableProperty.Create("HorizontalTextAlignment", typeof(TextAlignment), typeof(Label), TextAlignment.Start, propertyChanged: OnHorizontalTextAlignmentPropertyChanged); - [Obsolete("XAlignProperty is obsolete. Please use HorizontalTextAlignmentProperty instead.")] + [Obsolete("XAlignProperty is obsolete as of version 2.0.0. Please use HorizontalTextAlignmentProperty instead.")] public static readonly BindableProperty XAlignProperty = HorizontalTextAlignmentProperty; public static readonly BindableProperty VerticalTextAlignmentProperty = BindableProperty.Create("VerticalTextAlignment", typeof(TextAlignment), typeof(Label), TextAlignment.Start, propertyChanged: OnVerticalTextAlignmentPropertyChanged); - [Obsolete("YAlignProperty is obsolete. Please use VerticalTextAlignmentProperty instead.")] + [Obsolete("YAlignProperty is obsolete as of version 2.0.0. Please use VerticalTextAlignmentProperty instead.")] public static readonly BindableProperty YAlignProperty = VerticalTextAlignmentProperty; public static readonly BindableProperty TextColorProperty = TextElement.TextColorProperty; @@ -57,7 +57,7 @@ namespace Xamarin.Forms _platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<Label>>(() => new PlatformConfigurationRegistry<Label>(this)); } - [Obsolete("Please use the Font attributes which are on the class itself. Obsoleted in v1.3.0")] + [Obsolete("Font is obsolete as of version 1.3.0. Please use the Font attributes which are on the class itself.")] public Font Font { get { return (Font)GetValue(FontProperty); } @@ -100,14 +100,14 @@ namespace Xamarin.Forms set { SetValue(VerticalTextAlignmentProperty, value); } } - [Obsolete("XAlign is obsolete. Please use HorizontalTextAlignment instead.")] + [Obsolete("XAlign is obsolete as of version 2.0.0. Please use HorizontalTextAlignment instead.")] public TextAlignment XAlign { get { return (TextAlignment)GetValue(XAlignProperty); } set { SetValue(XAlignProperty, value); } } - [Obsolete("YAlign is obsolete. Please use VerticalTextAlignment instead.")] + [Obsolete("YAlign is obsolete as of version 2.0.0. Please use VerticalTextAlignment instead.")] public TextAlignment YAlign { get { return (TextAlignment)GetValue(YAlignProperty); } diff --git a/Xamarin.Forms.Core/Layout.cs b/Xamarin.Forms.Core/Layout.cs index f5b71f3b..01049911 100644 --- a/Xamarin.Forms.Core/Layout.cs +++ b/Xamarin.Forms.Core/Layout.cs @@ -108,7 +108,7 @@ namespace Xamarin.Forms SizeAllocated(Width, Height); } - [Obsolete("Use Measure")] + [Obsolete("OnSizeRequest is obsolete as of version 2.2.0. Please use OnMeasure instead.")] public sealed override SizeRequest GetSizeRequest(double widthConstraint, double heightConstraint) { SizeRequest size = base.GetSizeRequest(widthConstraint - Padding.HorizontalThickness, heightConstraint - Padding.VerticalThickness); diff --git a/Xamarin.Forms.Core/ListView.cs b/Xamarin.Forms.Core/ListView.cs index fd173c73..d280387b 100644 --- a/Xamarin.Forms.Core/ListView.cs +++ b/Xamarin.Forms.Core/ListView.cs @@ -332,7 +332,7 @@ namespace Xamarin.Forms return new TextCell { Text = text }; } - [Obsolete("Use OnMeasure")] + [Obsolete("OnSizeRequest is obsolete as of version 2.2.0. Please use OnMeasure instead.")] protected override SizeRequest OnSizeRequest(double widthConstraint, double heightConstraint) { var minimumSize = new Size(40, 40); diff --git a/Xamarin.Forms.Core/NavigationPage.cs b/Xamarin.Forms.Core/NavigationPage.cs index 7663d1bf..ba88cf57 100644 --- a/Xamarin.Forms.Core/NavigationPage.cs +++ b/Xamarin.Forms.Core/NavigationPage.cs @@ -17,8 +17,8 @@ namespace Xamarin.Forms public static readonly BindableProperty HasBackButtonProperty = BindableProperty.CreateAttached("HasBackButton", typeof(bool), typeof(NavigationPage), true); - [Obsolete("Use BarBackgroundColorProperty and BarTextColorProperty to change NavigationPage bar color properties")] public static readonly BindableProperty TintProperty = - BindableProperty.Create("Tint", typeof(Color), typeof(NavigationPage), Color.Default); + [Obsolete("TintProperty is obsolete as of version 1.2.0. Please use BarBackgroundColorProperty and BarTextColorProperty to change NavigationPage bar color properties.")] + public static readonly BindableProperty TintProperty = BindableProperty.Create("Tint", typeof(Color), typeof(NavigationPage), Color.Default); public static readonly BindableProperty BarBackgroundColorProperty = BindableProperty.Create("BarBackgroundColor", typeof(Color), typeof(NavigationPage), Color.Default); @@ -56,7 +56,7 @@ namespace Xamarin.Forms set { SetValue(BarTextColorProperty, value); } } - [Obsolete("Use BarBackgroundColor and BarTextColor to change NavigationPage bar color properties")] + [Obsolete("Tint is obsolete as of version 1.2.0. Please use BarBackgroundColor and BarTextColor to change NavigationPage bar color properties.")] public Color Tint { get { return (Color)GetValue(TintProperty); } diff --git a/Xamarin.Forms.Core/RelativeLayout.cs b/Xamarin.Forms.Core/RelativeLayout.cs index 85c64d0c..2c55505b 100644 --- a/Xamarin.Forms.Core/RelativeLayout.cs +++ b/Xamarin.Forms.Core/RelativeLayout.cs @@ -169,7 +169,7 @@ namespace Xamarin.Forms base.OnRemoved(view); } - [Obsolete("Use OnMeasure")] + [Obsolete("OnSizeRequest is obsolete as of version 2.2.0. Please use OnMeasure instead.")] protected override SizeRequest OnSizeRequest(double widthConstraint, double heightConstraint) { double mockWidth = double.IsPositiveInfinity(widthConstraint) ? ParentView.Width : widthConstraint; diff --git a/Xamarin.Forms.Core/ScrollView.cs b/Xamarin.Forms.Core/ScrollView.cs index 711c2ce7..e77731d2 100644 --- a/Xamarin.Forms.Core/ScrollView.cs +++ b/Xamarin.Forms.Core/ScrollView.cs @@ -195,7 +195,7 @@ namespace Xamarin.Forms } } - [Obsolete("Use OnMeasure")] + [Obsolete("OnSizeRequest is obsolete as of version 2.2.0. Please use OnMeasure instead.")] protected override SizeRequest OnSizeRequest(double widthConstraint, double heightConstraint) { if (Content == null) diff --git a/Xamarin.Forms.Core/Span.cs b/Xamarin.Forms.Core/Span.cs index 6abffc62..724126be 100644 --- a/Xamarin.Forms.Core/Span.cs +++ b/Xamarin.Forms.Core/Span.cs @@ -84,7 +84,7 @@ namespace Xamarin.Forms } } - [Obsolete("Please use the Font properties directly. Obsolete in 1.3.0")] + [Obsolete("Font is obsolete as of version 1.3.0. Please use the Font properties directly.")] public Font Font { get { return (Font)_fontElement.GetValue(FontElement.FontProperty); } set { _fontElement.SetValue(FontElement.FontProperty, value); } diff --git a/Xamarin.Forms.Core/StackLayout.cs b/Xamarin.Forms.Core/StackLayout.cs index 9f1d6c5b..b8599806 100644 --- a/Xamarin.Forms.Core/StackLayout.cs +++ b/Xamarin.Forms.Core/StackLayout.cs @@ -55,7 +55,7 @@ namespace Xamarin.Forms } } - [Obsolete("Use OnMeasure")] + [Obsolete("OnSizeRequest is obsolete as of version 2.2.0. Please use OnMeasure instead.")] protected override SizeRequest OnSizeRequest(double widthConstraint, double heightConstraint) { if (!HasVisibileChildren()) diff --git a/Xamarin.Forms.Core/TableView.cs b/Xamarin.Forms.Core/TableView.cs index d0b925a9..be1c0b8e 100644 --- a/Xamarin.Forms.Core/TableView.cs +++ b/Xamarin.Forms.Core/TableView.cs @@ -114,7 +114,7 @@ namespace Xamarin.Forms ModelChanged(this, EventArgs.Empty); } - [Obsolete("Use OnMeasure")] + [Obsolete("OnSizeRequest is obsolete as of version 2.2.0. Please use OnMeasure instead.")] protected override SizeRequest OnSizeRequest(double widthConstraint, double heightConstraint) { var minimumSize = new Size(40, 40); diff --git a/Xamarin.Forms.Core/TapGestureRecognizer.cs b/Xamarin.Forms.Core/TapGestureRecognizer.cs index c5216d65..74100967 100644 --- a/Xamarin.Forms.Core/TapGestureRecognizer.cs +++ b/Xamarin.Forms.Core/TapGestureRecognizer.cs @@ -57,7 +57,7 @@ namespace Xamarin.Forms #region obsolete cruft // call empty constructor to hack around bug in mono where compiler generates invalid IL - [Obsolete("Obsolete in 1.0.2. Use Command instead")] + [Obsolete("TapGestureRecognizer(Action<View, object> tappedCallback) is obsolete as of version 1.0.2. Please use Command instead.")] public TapGestureRecognizer(Action<View, object> tappedCallback) : this() { if (tappedCallback == null) @@ -66,7 +66,7 @@ namespace Xamarin.Forms } // call empty constructor to hack around bug in mono where compiler generates invalid IL - [Obsolete("Obsolete in 1.0.2. Use Command instead")] + [Obsolete("TapGestureRecognizer(Action<View> tappedCallback) is obsolete as of version 1.0.2. Please use Command instead.")] public TapGestureRecognizer(Action<View> tappedCallback) : this() { if (tappedCallback == null) @@ -74,20 +74,20 @@ namespace Xamarin.Forms TappedCallback = (s, o) => tappedCallback(s); } - [Obsolete("Obsolete in 1.0.2. Use Command instead")] public static readonly BindableProperty TappedCallbackProperty = BindableProperty.Create("TappedCallback", typeof(Action<View, object>), - typeof(TapGestureRecognizer), null); + [Obsolete("TappedCallbackProperty is obsolete as of version 1.0.2. Please use Command instead.")] + public static readonly BindableProperty TappedCallbackProperty = BindableProperty.Create("TappedCallback", typeof(Action<View, object>), typeof(TapGestureRecognizer), null); - [Obsolete("Obsolete in 1.0.2. Use Command instead")] + [Obsolete("TappedCallback is obsolete as of version 1.0.2. Please use Command instead.")] public Action<View, object> TappedCallback { get { return (Action<View, object>)GetValue(TappedCallbackProperty); } set { SetValue(TappedCallbackProperty, value); } } - [Obsolete("Obsolete in 1.0.2. Use Command instead")] public static readonly BindableProperty TappedCallbackParameterProperty = BindableProperty.Create("TappedCallbackParameter", typeof(object), - typeof(TapGestureRecognizer), null); + [Obsolete("TappedCallbackParameterProperty is obsolete as of version 1.0.2. Please use Command instead.")] + public static readonly BindableProperty TappedCallbackParameterProperty = BindableProperty.Create("TappedCallbackParameter", typeof(object), typeof(TapGestureRecognizer), null); - [Obsolete("Obsolete in 1.0.2. Use Command instead")] + [Obsolete("TappedCallbackParameter is obsolete as of version 1.0.2. Please use Command instead.")] public object TappedCallbackParameter { get { return GetValue(TappedCallbackParameterProperty); } diff --git a/Xamarin.Forms.Core/TemplatedView.cs b/Xamarin.Forms.Core/TemplatedView.cs index 89543f2d..915ddb29 100644 --- a/Xamarin.Forms.Core/TemplatedView.cs +++ b/Xamarin.Forms.Core/TemplatedView.cs @@ -27,7 +27,7 @@ namespace Xamarin.Forms } } - [Obsolete("Use OnMeasure")] + [Obsolete("OnSizeRequest is obsolete as of version 2.2.0. Please use OnMeasure instead.")] protected override SizeRequest OnSizeRequest(double widthConstraint, double heightConstraint) { double widthRequest = WidthRequest; diff --git a/Xamarin.Forms.Core/ToolbarItem.cs b/Xamarin.Forms.Core/ToolbarItem.cs index 0a0a2e05..41cf1447 100644 --- a/Xamarin.Forms.Core/ToolbarItem.cs +++ b/Xamarin.Forms.Core/ToolbarItem.cs @@ -28,7 +28,7 @@ namespace Xamarin.Forms Priority = priority; } - [Obsolete("Now that ToolbarItem is based on MenuItem, .Text has replaced .Name")] + [Obsolete("Name is obsolete as of version 1.3.0. Please use Text instead.")] public string Name { get { return Text; } @@ -47,7 +47,7 @@ namespace Xamarin.Forms set { SetValue(PriorityProperty, value); } } - [Obsolete("Activated has been replaced by the more consistent 'Clicked'")] + [Obsolete("Activated is obsolete as of version 1.3.0. Please use Clicked instead.")] public event EventHandler Activated { add { Clicked += value; } diff --git a/Xamarin.Forms.Core/TypeConverter.cs b/Xamarin.Forms.Core/TypeConverter.cs index 52b14d4e..aba541d5 100644 --- a/Xamarin.Forms.Core/TypeConverter.cs +++ b/Xamarin.Forms.Core/TypeConverter.cs @@ -13,13 +13,13 @@ namespace Xamarin.Forms return sourceType == typeof(string); } - [Obsolete("use ConvertFromInvariantString (string)")] + [Obsolete("ConvertFrom is obsolete as of version 2.2.0. Please use ConvertFromInvariantString (string) instead.")] public virtual object ConvertFrom(object o) { return null; } - [Obsolete("use ConvertFromInvariantString (string)")] + [Obsolete("ConvertFrom is obsolete as of version 2.2.0. Please use ConvertFromInvariantString (string) instead.")] public virtual object ConvertFrom(CultureInfo culture, object o) { return null; diff --git a/Xamarin.Forms.Core/TypeTypeConverter.cs b/Xamarin.Forms.Core/TypeTypeConverter.cs index 1e0d76af..01b596bf 100644 --- a/Xamarin.Forms.Core/TypeTypeConverter.cs +++ b/Xamarin.Forms.Core/TypeTypeConverter.cs @@ -7,7 +7,7 @@ namespace Xamarin.Forms [Xaml.ProvideCompiled("Xamarin.Forms.Core.XamlC.TypeTypeConverter")] public sealed class TypeTypeConverter : TypeConverter, IExtendedTypeConverter { - [Obsolete("Use ConvertFromInvariantString (string, IServiceProvider)")] + [Obsolete("IExtendedTypeConverter.ConvertFrom is obsolete as of version 2.2.0. Please use ConvertFromInvariantString (string, IServiceProvider) instead.")] object IExtendedTypeConverter.ConvertFrom(CultureInfo culture, object value, IServiceProvider serviceProvider) { return ((IExtendedTypeConverter)this).ConvertFromInvariantString((string)value, serviceProvider); diff --git a/Xamarin.Forms.Core/VisualElement.cs b/Xamarin.Forms.Core/VisualElement.cs index 905771cd..bf9b1e32 100644 --- a/Xamarin.Forms.Core/VisualElement.cs +++ b/Xamarin.Forms.Core/VisualElement.cs @@ -456,7 +456,7 @@ namespace Xamarin.Forms public event EventHandler<FocusEventArgs> Focused; - [Obsolete("Use Measure")] + [Obsolete("OnSizeRequest is obsolete as of version 2.2.0. Please use OnMeasure instead.")] public virtual SizeRequest GetSizeRequest(double widthConstraint, double heightConstraint) { SizeRequest cachedResult; @@ -621,7 +621,7 @@ namespace Xamarin.Forms { } - [Obsolete("Use OnMeasure")] + [Obsolete("OnSizeRequest is obsolete as of version 2.2.0. Please use OnMeasure instead.")] protected virtual SizeRequest OnSizeRequest(double widthConstraint, double heightConstraint) { if (Platform == null || !IsPlatformEnabled) |