summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Core')
-rw-r--r--Xamarin.Forms.Core/ActionSheetArguments.cs4
-rw-r--r--Xamarin.Forms.Core/AlertArguments.cs4
-rw-r--r--Xamarin.Forms.Core/Application.cs34
-rw-r--r--Xamarin.Forms.Core/BindableObject.cs32
-rw-r--r--Xamarin.Forms.Core/BindableProperty.cs1
-rw-r--r--Xamarin.Forms.Core/BindablePropertyConverter.cs1
-rw-r--r--Xamarin.Forms.Core/Binding.cs5
-rw-r--r--Xamarin.Forms.Core/BindingExpression.cs3
-rw-r--r--Xamarin.Forms.Core/BoundsConstraint.cs1
-rw-r--r--Xamarin.Forms.Core/Color.cs7
-rw-r--r--Xamarin.Forms.Core/ColorTypeConverter.cs1
-rw-r--r--Xamarin.Forms.Core/Constraint.cs1
-rw-r--r--Xamarin.Forms.Core/CustomKeyboard.cs10
-rw-r--r--Xamarin.Forms.Core/DataTemplateExtensions.cs7
-rw-r--r--Xamarin.Forms.Core/DelegateLogListener.cs5
-rw-r--r--Xamarin.Forms.Core/DependencyService.cs1
-rw-r--r--Xamarin.Forms.Core/Device.cs25
-rw-r--r--Xamarin.Forms.Core/DeviceInfo.cs7
-rw-r--r--Xamarin.Forms.Core/DeviceOrientation.cs4
-rw-r--r--Xamarin.Forms.Core/DeviceOrientationExtensions.cs8
-rw-r--r--Xamarin.Forms.Core/Editor.cs1
-rw-r--r--Xamarin.Forms.Core/Effect.cs1
-rw-r--r--Xamarin.Forms.Core/Element.cs12
-rw-r--r--Xamarin.Forms.Core/Entry.cs1
-rw-r--r--Xamarin.Forms.Core/EnumerableExtensions.cs17
-rw-r--r--Xamarin.Forms.Core/EventArg.cs4
-rw-r--r--Xamarin.Forms.Core/ExpressionSearch.cs9
-rw-r--r--Xamarin.Forms.Core/FileAccess.cs4
-rw-r--r--Xamarin.Forms.Core/FileMode.cs4
-rw-r--r--Xamarin.Forms.Core/FileShare.cs4
-rw-r--r--Xamarin.Forms.Core/FontElement.cs2
-rw-r--r--Xamarin.Forms.Core/Grid.cs7
-rw-r--r--Xamarin.Forms.Core/HtmlWebViewSource.cs5
-rw-r--r--Xamarin.Forms.Core/IDeserializer.cs4
-rw-r--r--Xamarin.Forms.Core/IElement.cs1
-rw-r--r--Xamarin.Forms.Core/IElementController.cs7
-rw-r--r--Xamarin.Forms.Core/IExpressionSearch.cs4
-rw-r--r--Xamarin.Forms.Core/IFontElement.cs4
-rw-r--r--Xamarin.Forms.Core/IGridController.cs9
-rw-r--r--Xamarin.Forms.Core/IIsolatedStorageFile.cs4
-rw-r--r--Xamarin.Forms.Core/IMenuItemController.cs2
-rw-r--r--Xamarin.Forms.Core/IMultiPageController.cs7
-rw-r--r--Xamarin.Forms.Core/INativeBindingService.cs4
-rw-r--r--Xamarin.Forms.Core/INativeValueConverterService.cs4
-rw-r--r--Xamarin.Forms.Core/INavigationMenuController.cs7
-rw-r--r--Xamarin.Forms.Core/IPanGestureController.cs2
-rw-r--r--Xamarin.Forms.Core/IPinchGestureController.cs2
-rw-r--r--Xamarin.Forms.Core/IPlatform.cs4
-rw-r--r--Xamarin.Forms.Core/IPlatformServices.cs4
-rw-r--r--Xamarin.Forms.Core/IResourceDictionary.cs4
-rw-r--r--Xamarin.Forms.Core/ISystemResourcesProvider.cs4
-rw-r--r--Xamarin.Forms.Core/IVisualElementController.cs10
-rw-r--r--Xamarin.Forms.Core/IWebViewController.cs16
-rw-r--r--Xamarin.Forms.Core/ImageSource.cs1
-rw-r--r--Xamarin.Forms.Core/Interactivity/Behavior.cs1
-rw-r--r--Xamarin.Forms.Core/Interactivity/TriggerBase.cs1
-rw-r--r--Xamarin.Forms.Core/Internals/EffectUtilities.cs2
-rw-r--r--Xamarin.Forms.Core/Internals/Ticker.cs5
-rw-r--r--Xamarin.Forms.Core/ItemsView.cs4
-rw-r--r--Xamarin.Forms.Core/Keyboard.cs2
-rw-r--r--Xamarin.Forms.Core/KeyboardTypeConverter.cs1
-rw-r--r--Xamarin.Forms.Core/LayoutOptionsConverter.cs1
-rw-r--r--Xamarin.Forms.Core/ListView.cs5
-rw-r--r--Xamarin.Forms.Core/LockableObservableListWrapper.cs131
-rw-r--r--Xamarin.Forms.Core/Log.cs4
-rw-r--r--Xamarin.Forms.Core/LogListener.cs4
-rw-r--r--Xamarin.Forms.Core/MasterDetailPage.cs1
-rw-r--r--Xamarin.Forms.Core/MenuItem.cs15
-rw-r--r--Xamarin.Forms.Core/MultiPage.cs13
-rw-r--r--Xamarin.Forms.Core/NativeBindingHelpers.cs14
-rw-r--r--Xamarin.Forms.Core/NavigationMenu.cs11
-rw-r--r--Xamarin.Forms.Core/NavigationModel.cs4
-rw-r--r--Xamarin.Forms.Core/NavigationProxy.cs20
-rw-r--r--Xamarin.Forms.Core/NumericExtensions.cs8
-rw-r--r--Xamarin.Forms.Core/OrderedDictionary.cs1
-rw-r--r--Xamarin.Forms.Core/PanGestureRecognizer.cs1
-rw-r--r--Xamarin.Forms.Core/Performance.cs11
-rw-r--r--Xamarin.Forms.Core/Picker.cs120
-rw-r--r--Xamarin.Forms.Core/PinchGestureRecognizer.cs1
-rw-r--r--Xamarin.Forms.Core/PlatformEffect.cs6
-rw-r--r--Xamarin.Forms.Core/ProgressBar.cs1
-rw-r--r--Xamarin.Forms.Core/Properties/AssemblyInfo.cs18
-rw-r--r--Xamarin.Forms.Core/ReadOnlyListAdapter.cs1
-rw-r--r--Xamarin.Forms.Core/ReflectionExtensions.cs12
-rw-r--r--Xamarin.Forms.Core/Registrar.cs25
-rw-r--r--Xamarin.Forms.Core/RelativeLayout.cs1
-rw-r--r--Xamarin.Forms.Core/ResourceDictionary.cs1
-rw-r--r--Xamarin.Forms.Core/ResourcesChangedEventArgs.cs4
-rw-r--r--Xamarin.Forms.Core/ScrollView.cs1
-rw-r--r--Xamarin.Forms.Core/SearchBar.cs1
-rw-r--r--Xamarin.Forms.Core/Slider.cs1
-rw-r--r--Xamarin.Forms.Core/Span.cs1
-rw-r--r--Xamarin.Forms.Core/StackLayout.cs1
-rw-r--r--Xamarin.Forms.Core/Stepper.cs1
-rw-r--r--Xamarin.Forms.Core/Style.cs1
-rw-r--r--Xamarin.Forms.Core/TableModel.cs19
-rw-r--r--Xamarin.Forms.Core/TableSection.cs1
-rw-r--r--Xamarin.Forms.Core/TableView.cs3
-rw-r--r--Xamarin.Forms.Core/TapGestureRecognizer.cs4
-rw-r--r--Xamarin.Forms.Core/TemplatedItemsList.cs35
-rw-r--r--Xamarin.Forms.Core/TypedBinding.cs3
-rw-r--r--Xamarin.Forms.Core/UriImageSource.cs5
-rw-r--r--Xamarin.Forms.Core/UrlWebViewSource.cs5
-rw-r--r--Xamarin.Forms.Core/VisualElement.cs35
-rw-r--r--Xamarin.Forms.Core/WebView.cs47
-rw-r--r--Xamarin.Forms.Core/WebViewSource.cs4
-rw-r--r--Xamarin.Forms.Core/Xamarin.Forms.Core.csproj11
-rw-r--r--Xamarin.Forms.Core/XmlnsDefinitionAttribute.cs1
108 files changed, 647 insertions, 319 deletions
diff --git a/Xamarin.Forms.Core/ActionSheetArguments.cs b/Xamarin.Forms.Core/ActionSheetArguments.cs
index 3417ed6..a733602 100644
--- a/Xamarin.Forms.Core/ActionSheetArguments.cs
+++ b/Xamarin.Forms.Core/ActionSheetArguments.cs
@@ -1,9 +1,9 @@
using System.Collections.Generic;
using System.Threading.Tasks;
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal class ActionSheetArguments
+ public class ActionSheetArguments
{
public ActionSheetArguments(string title, string cancel, string destruction, IEnumerable<string> buttons)
{
diff --git a/Xamarin.Forms.Core/AlertArguments.cs b/Xamarin.Forms.Core/AlertArguments.cs
index 87224cb..4e17253 100644
--- a/Xamarin.Forms.Core/AlertArguments.cs
+++ b/Xamarin.Forms.Core/AlertArguments.cs
@@ -1,8 +1,8 @@
using System.Threading.Tasks;
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal class AlertArguments
+ public class AlertArguments
{
public AlertArguments(string title, string message, string accept, string cancel)
{
diff --git a/Xamarin.Forms.Core/Application.cs b/Xamarin.Forms.Core/Application.cs
index e089cf8..38333bf 100644
--- a/Xamarin.Forms.Core/Application.cs
+++ b/Xamarin.Forms.Core/Application.cs
@@ -1,8 +1,9 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
-
+using System.ComponentModel;
using System.Threading.Tasks;
+using Xamarin.Forms.Internals;
using Xamarin.Forms.Platform;
namespace Xamarin.Forms
@@ -29,7 +30,7 @@ namespace Xamarin.Forms
if (f)
Loader.Load();
NavigationProxy = new NavigationImpl(this);
- Current = this;
+ SetCurrentApplication(this);
SystemResources = DependencyService.Get<ISystemResourcesProvider>().GetSystemResources();
SystemResources.ValuesChanged += OnParentResourcesChanged;
@@ -48,10 +49,13 @@ namespace Xamarin.Forms
}
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void SetCurrentApplication(Application value) => Current = value;
+
public static Application Current
{
get { return s_current; }
- internal set
+ set
{
if (s_current == value)
return;
@@ -109,9 +113,11 @@ namespace Xamarin.Forms
get { return _logicalChildren ?? (_logicalChildren = new ReadOnlyCollection<Element>(InternalChildren)); }
}
- internal NavigationProxy NavigationProxy { get; }
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public NavigationProxy NavigationProxy { get; }
- internal int PanGestureId { get; set; }
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public int PanGestureId { get; set; }
internal IResourceDictionary SystemResources { get; }
@@ -182,12 +188,14 @@ namespace Xamarin.Forms
{
}
- internal static void ClearCurrent()
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void ClearCurrent()
{
s_current = null;
}
- internal static bool IsApplicationOrNull(Element element)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static bool IsApplicationOrNull(Element element)
{
return element == null || element is Application;
}
@@ -214,24 +222,28 @@ namespace Xamarin.Forms
internal event EventHandler PopCanceled;
- internal void SendOnAppLinkRequestReceived(Uri uri)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendOnAppLinkRequestReceived(Uri uri)
{
OnAppLinkRequestReceived(uri);
}
- internal void SendResume()
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendResume()
{
s_current = this;
OnResume();
}
- internal Task SendSleepAsync()
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Task SendSleepAsync()
{
OnSleep();
return SavePropertiesAsync();
}
- internal void SendStart()
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendStart()
{
OnStart();
}
diff --git a/Xamarin.Forms.Core/BindableObject.cs b/Xamarin.Forms.Core/BindableObject.cs
index b5e4145..8ce583c 100644
--- a/Xamarin.Forms.Core/BindableObject.cs
+++ b/Xamarin.Forms.Core/BindableObject.cs
@@ -91,7 +91,8 @@ namespace Xamarin.Forms
SetValue(propertyKey.BindableProperty, value, false, false);
}
- protected internal static void SetInheritedBindingContext(BindableObject bindable, object value)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void SetInheritedBindingContext(BindableObject bindable, object value)
{
BindablePropertyContext bpContext = bindable.GetContext(BindingContextProperty);
if (bpContext != null && ((bpContext.Attributes & BindableContextAttributes.IsManuallySet) != 0))
@@ -202,7 +203,8 @@ namespace Xamarin.Forms
return values;
}
- internal object[] GetValues(BindableProperty property0, BindableProperty property1, BindableProperty property2)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public object[] GetValues(BindableProperty property0, BindableProperty property1, BindableProperty property2)
{
var values = new object[3];
@@ -326,7 +328,8 @@ namespace Xamarin.Forms
SetValueCore(propertyKey.BindableProperty, value, attributes, SetValuePrivateFlags.None);
}
- internal void SetValueCore(BindableProperty property, object value, SetValueFlags attributes = SetValueFlags.None)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetValueCore(BindableProperty property, object value, SetValueFlags attributes = SetValueFlags.None)
{
SetValueCore(property, value, attributes, SetValuePrivateFlags.Default);
}
@@ -612,16 +615,6 @@ namespace Xamarin.Forms
}
[Flags]
- internal enum SetValueFlags
- {
- None = 0,
- ClearOneWayBindings = 1 << 0,
- ClearTwoWayBindings = 1 << 1,
- ClearDynamicResource = 1 << 2,
- RaiseOnEqual = 1 << 3
- }
-
- [Flags]
internal enum SetValuePrivateFlags
{
None = 0,
@@ -651,4 +644,17 @@ namespace Xamarin.Forms
}
}
}
+
+ namespace Internals
+ {
+ [Flags]
+ public enum SetValueFlags
+ {
+ None = 0,
+ ClearOneWayBindings = 1 << 0,
+ ClearTwoWayBindings = 1 << 1,
+ ClearDynamicResource = 1 << 2,
+ RaiseOnEqual = 1 << 3
+ }
+ }
} \ No newline at end of file
diff --git a/Xamarin.Forms.Core/BindableProperty.cs b/Xamarin.Forms.Core/BindableProperty.cs
index 5eb330f..e0cbbdd 100644
--- a/Xamarin.Forms.Core/BindableProperty.cs
+++ b/Xamarin.Forms.Core/BindableProperty.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.Linq.Expressions;
using System.Reflection;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
diff --git a/Xamarin.Forms.Core/BindablePropertyConverter.cs b/Xamarin.Forms.Core/BindablePropertyConverter.cs
index 08201b0..ee69ef2 100644
--- a/Xamarin.Forms.Core/BindablePropertyConverter.cs
+++ b/Xamarin.Forms.Core/BindablePropertyConverter.cs
@@ -3,6 +3,7 @@ using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Xml;
+using Xamarin.Forms.Internals;
using Xamarin.Forms.Xaml;
namespace Xamarin.Forms
diff --git a/Xamarin.Forms.Core/Binding.cs b/Xamarin.Forms.Core/Binding.cs
index 71a2996..e980fc9 100644
--- a/Xamarin.Forms.Core/Binding.cs
+++ b/Xamarin.Forms.Core/Binding.cs
@@ -1,10 +1,12 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Globalization;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
@@ -82,7 +84,8 @@ namespace Xamarin.Forms
}
}
- internal string UpdateSourceEventName {
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public string UpdateSourceEventName {
get { return _updateSourceEventName; }
set {
ThrowIfApplied();
diff --git a/Xamarin.Forms.Core/BindingExpression.cs b/Xamarin.Forms.Core/BindingExpression.cs
index 204b171..e37370d 100644
--- a/Xamarin.Forms.Core/BindingExpression.cs
+++ b/Xamarin.Forms.Core/BindingExpression.cs
@@ -5,6 +5,7 @@ using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Reflection;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
@@ -170,7 +171,7 @@ namespace Xamarin.Forms
return;
}
- target.SetValueCore(property, value, BindableObject.SetValueFlags.ClearDynamicResource, BindableObject.SetValuePrivateFlags.Default | BindableObject.SetValuePrivateFlags.Converted);
+ target.SetValueCore(property, value, SetValueFlags.ClearDynamicResource, BindableObject.SetValuePrivateFlags.Default | BindableObject.SetValuePrivateFlags.Converted);
}
else if (needsSetter && part.LastSetter != null && current != null)
{
diff --git a/Xamarin.Forms.Core/BoundsConstraint.cs b/Xamarin.Forms.Core/BoundsConstraint.cs
index 43be86e..2d9bb40 100644
--- a/Xamarin.Forms.Core/BoundsConstraint.cs
+++ b/Xamarin.Forms.Core/BoundsConstraint.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
diff --git a/Xamarin.Forms.Core/Color.cs b/Xamarin.Forms.Core/Color.cs
index 2b19e58..227f281 100644
--- a/Xamarin.Forms.Core/Color.cs
+++ b/Xamarin.Forms.Core/Color.cs
@@ -1,6 +1,8 @@
using System;
+using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
@@ -22,11 +24,14 @@ namespace Xamarin.Forms
get { return new Color(-1d, -1d, -1d, -1d, Mode.Default); }
}
- internal bool IsDefault
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool IsDefault
{
get { return _mode == Mode.Default; }
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void SetAccent(Color value) => Accent = value;
public static Color Accent { get; internal set; }
readonly float _a;
diff --git a/Xamarin.Forms.Core/ColorTypeConverter.cs b/Xamarin.Forms.Core/ColorTypeConverter.cs
index 2b7efa7..3e22bdd 100644
--- a/Xamarin.Forms.Core/ColorTypeConverter.cs
+++ b/Xamarin.Forms.Core/ColorTypeConverter.cs
@@ -1,6 +1,7 @@
using System;
using System.Linq;
using System.Globalization;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
diff --git a/Xamarin.Forms.Core/Constraint.cs b/Xamarin.Forms.Core/Constraint.cs
index bd219f0..42d217b 100644
--- a/Xamarin.Forms.Core/Constraint.cs
+++ b/Xamarin.Forms.Core/Constraint.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
diff --git a/Xamarin.Forms.Core/CustomKeyboard.cs b/Xamarin.Forms.Core/CustomKeyboard.cs
index 422198c..daf0d24 100644
--- a/Xamarin.Forms.Core/CustomKeyboard.cs
+++ b/Xamarin.Forms.Core/CustomKeyboard.cs
@@ -1,12 +1,16 @@
-namespace Xamarin.Forms
+using System.ComponentModel;
+
+namespace Xamarin.Forms.Internals
{
- internal sealed class CustomKeyboard : Keyboard
+ public sealed class CustomKeyboard : Keyboard
{
internal CustomKeyboard(KeyboardFlags flags)
{
Flags = flags;
}
- internal KeyboardFlags Flags { get; private set; }
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public KeyboardFlags Flags { get; private set; }
}
} \ No newline at end of file
diff --git a/Xamarin.Forms.Core/DataTemplateExtensions.cs b/Xamarin.Forms.Core/DataTemplateExtensions.cs
index ffa0ffd..0666755 100644
--- a/Xamarin.Forms.Core/DataTemplateExtensions.cs
+++ b/Xamarin.Forms.Core/DataTemplateExtensions.cs
@@ -1,7 +1,10 @@
-namespace Xamarin.Forms
+using System.ComponentModel;
+
+namespace Xamarin.Forms.Internals
{
- internal static class DataTemplateExtensions
+ public static class DataTemplateExtensions
{
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static object CreateContent(this DataTemplate self, object item, BindableObject container)
{
var selector = self as DataTemplateSelector;
diff --git a/Xamarin.Forms.Core/DelegateLogListener.cs b/Xamarin.Forms.Core/DelegateLogListener.cs
index 20a0ab7..ba0e9d1 100644
--- a/Xamarin.Forms.Core/DelegateLogListener.cs
+++ b/Xamarin.Forms.Core/DelegateLogListener.cs
@@ -1,8 +1,9 @@
using System;
+using Xamarin.Forms.Internals;
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal class DelegateLogListener : LogListener
+ public class DelegateLogListener : LogListener
{
readonly Action<string, string> _log;
diff --git a/Xamarin.Forms.Core/DependencyService.cs b/Xamarin.Forms.Core/DependencyService.cs
index 2e0ae05..803a951 100644
--- a/Xamarin.Forms.Core/DependencyService.cs
+++ b/Xamarin.Forms.Core/DependencyService.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
diff --git a/Xamarin.Forms.Core/Device.cs b/Xamarin.Forms.Core/Device.cs
index 755a8e2..d7f293f 100644
--- a/Xamarin.Forms.Core/Device.cs
+++ b/Xamarin.Forms.Core/Device.cs
@@ -1,8 +1,10 @@
using System;
+using System.ComponentModel;
using System.IO;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
@@ -15,12 +17,18 @@ namespace Xamarin.Forms
public const string WinRT = "WinRT";
public const string macOS = "macOS";
- internal static DeviceInfo info;
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static DeviceInfo info;
static IPlatformServices s_platformServices;
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void SetIdiom(TargetIdiom value) => Idiom = value;
public static TargetIdiom Idiom { get; internal set; }
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void SetTargetIdiom(TargetIdiom value) => Idiom = value;
+
[Obsolete("Use RuntimePlatform instead.")]
#pragma warning disable 0618
public static TargetPlatform OS
@@ -44,7 +52,8 @@ namespace Xamarin.Forms
public static string RuntimePlatform => PlatformServices.RuntimePlatform;
- internal static DeviceInfo Info
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static DeviceInfo Info
{
get
{
@@ -55,12 +64,14 @@ namespace Xamarin.Forms
set { info = value; }
}
- internal static bool IsInvokeRequired
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static bool IsInvokeRequired
{
get { return PlatformServices.IsInvokeRequired; }
}
- internal static IPlatformServices PlatformServices
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static IPlatformServices PlatformServices
{
get
{
@@ -144,12 +155,14 @@ namespace Xamarin.Forms
PlatformServices.StartTimer(interval, callback);
}
- internal static Assembly[] GetAssemblies()
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static Assembly[] GetAssemblies()
{
return PlatformServices.GetAssemblies();
}
- internal static double GetNamedSize(NamedSize size, Type targetElementType, bool useOldSizes)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static double GetNamedSize(NamedSize size, Type targetElementType, bool useOldSizes)
{
return PlatformServices.GetNamedSize(size, targetElementType, useOldSizes);
}
diff --git a/Xamarin.Forms.Core/DeviceInfo.cs b/Xamarin.Forms.Core/DeviceInfo.cs
index dc83075..722ef50 100644
--- a/Xamarin.Forms.Core/DeviceInfo.cs
+++ b/Xamarin.Forms.Core/DeviceInfo.cs
@@ -2,17 +2,18 @@
using System.ComponentModel;
using System.Runtime.CompilerServices;
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal abstract class DeviceInfo : INotifyPropertyChanged, IDisposable
+ public abstract class DeviceInfo : INotifyPropertyChanged, IDisposable
{
DeviceOrientation _currentOrientation;
bool _disposed;
+ [EditorBrowsable(EditorBrowsableState.Never)]
public DeviceOrientation CurrentOrientation
{
get { return _currentOrientation; }
- internal set
+ set
{
if (Equals(_currentOrientation, value))
return;
diff --git a/Xamarin.Forms.Core/DeviceOrientation.cs b/Xamarin.Forms.Core/DeviceOrientation.cs
index 53a03f2..58385af 100644
--- a/Xamarin.Forms.Core/DeviceOrientation.cs
+++ b/Xamarin.Forms.Core/DeviceOrientation.cs
@@ -1,6 +1,6 @@
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal enum DeviceOrientation
+ public enum DeviceOrientation
{
Portrait,
Landscape,
diff --git a/Xamarin.Forms.Core/DeviceOrientationExtensions.cs b/Xamarin.Forms.Core/DeviceOrientationExtensions.cs
index 8dbaaa8..9dc9769 100644
--- a/Xamarin.Forms.Core/DeviceOrientationExtensions.cs
+++ b/Xamarin.Forms.Core/DeviceOrientationExtensions.cs
@@ -1,12 +1,16 @@
-namespace Xamarin.Forms
+using System.ComponentModel;
+
+namespace Xamarin.Forms.Internals
{
- internal static class DeviceOrientationExtensions
+ public static class DeviceOrientationExtensions
{
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static bool IsLandscape(this DeviceOrientation orientation)
{
return orientation == DeviceOrientation.Landscape || orientation == DeviceOrientation.LandscapeLeft || orientation == DeviceOrientation.LandscapeRight;
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static bool IsPortrait(this DeviceOrientation orientation)
{
return orientation == DeviceOrientation.Portrait || orientation == DeviceOrientation.PortraitDown || orientation == DeviceOrientation.PortraitUp;
diff --git a/Xamarin.Forms.Core/Editor.cs b/Xamarin.Forms.Core/Editor.cs
index 35aaf43..16a97f6 100644
--- a/Xamarin.Forms.Core/Editor.cs
+++ b/Xamarin.Forms.Core/Editor.cs
@@ -1,4 +1,5 @@
using System;
+using Xamarin.Forms.Internals;
using Xamarin.Forms.Platform;
namespace Xamarin.Forms
diff --git a/Xamarin.Forms.Core/Effect.cs b/Xamarin.Forms.Core/Effect.cs
index 9e26911..8952844 100644
--- a/Xamarin.Forms.Core/Effect.cs
+++ b/Xamarin.Forms.Core/Effect.cs
@@ -1,5 +1,6 @@
using System;
using System.ComponentModel;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
diff --git a/Xamarin.Forms.Core/Element.cs b/Xamarin.Forms.Core/Element.cs
index d0f713e..016468a 100644
--- a/Xamarin.Forms.Core/Element.cs
+++ b/Xamarin.Forms.Core/Element.cs
@@ -133,7 +133,8 @@ namespace Xamarin.Forms
}
}
- internal IPlatform Platform
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public IPlatform Platform
{
get
{
@@ -158,7 +159,8 @@ namespace Xamarin.Forms
}
// you're not my real dad
- internal Element RealParent { get; private set; }
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Element RealParent { get; private set; }
List<KeyValuePair<string, BindableProperty>> DynamicResources
{
@@ -389,7 +391,8 @@ namespace Xamarin.Forms
}
}
- internal IEnumerable<Element> Descendants()
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public IEnumerable<Element> Descendants()
{
var queue = new Queue<Element>(16);
queue.Enqueue(this);
@@ -476,7 +479,8 @@ namespace Xamarin.Forms
internal event EventHandler ParentSet;
- internal event EventHandler PlatformSet;
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler PlatformSet;
internal virtual void SetChildInheritedBindingContext(Element child, object context)
{
diff --git a/Xamarin.Forms.Core/Entry.cs b/Xamarin.Forms.Core/Entry.cs
index 3c63c13..63ba5f1 100644
--- a/Xamarin.Forms.Core/Entry.cs
+++ b/Xamarin.Forms.Core/Entry.cs
@@ -1,4 +1,5 @@
using System;
+using Xamarin.Forms.Internals;
using Xamarin.Forms.Platform;
namespace Xamarin.Forms
diff --git a/Xamarin.Forms.Core/EnumerableExtensions.cs b/Xamarin.Forms.Core/EnumerableExtensions.cs
index 066e7e9..db9f8c9 100644
--- a/Xamarin.Forms.Core/EnumerableExtensions.cs
+++ b/Xamarin.Forms.Core/EnumerableExtensions.cs
@@ -1,9 +1,10 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal static class EnumerableExtensions
+ public static class EnumerableExtensions
{
public static IEnumerable<T> GetGesturesFor<T>(this IEnumerable<IGestureRecognizer> gestures, Func<T, bool> predicate = null) where T : GestureRecognizer
{
@@ -31,7 +32,8 @@ namespace Xamarin.Forms
yield return item;
}
- internal static void ForEach<T>(this IEnumerable<T> enumeration, Action<T> action)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void ForEach<T>(this IEnumerable<T> enumeration, Action<T> action)
{
foreach (T item in enumeration)
{
@@ -39,7 +41,8 @@ namespace Xamarin.Forms
}
}
- internal static int IndexOf<T>(this IEnumerable<T> enumerable, T item)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static int IndexOf<T>(this IEnumerable<T> enumerable, T item)
{
if (enumerable == null)
throw new ArgumentNullException("enumerable");
@@ -56,7 +59,8 @@ namespace Xamarin.Forms
return -1;
}
- internal static int IndexOf<T>(this IEnumerable<T> enumerable, Func<T, bool> predicate)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static int IndexOf<T>(this IEnumerable<T> enumerable, Func<T, bool> predicate)
{
var i = 0;
foreach (T element in enumerable)
@@ -70,7 +74,8 @@ namespace Xamarin.Forms
return -1;
}
- internal static IEnumerable<T> Prepend<T>(this IEnumerable<T> enumerable, T item)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static IEnumerable<T> Prepend<T>(this IEnumerable<T> enumerable, T item)
{
yield return item;
diff --git a/Xamarin.Forms.Core/EventArg.cs b/Xamarin.Forms.Core/EventArg.cs
index 9b9ea0a..6413634 100644
--- a/Xamarin.Forms.Core/EventArg.cs
+++ b/Xamarin.Forms.Core/EventArg.cs
@@ -1,8 +1,8 @@
using System;
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal class EventArg<T> : EventArgs
+ public class EventArg<T> : EventArgs
{
// Property variable
diff --git a/Xamarin.Forms.Core/ExpressionSearch.cs b/Xamarin.Forms.Core/ExpressionSearch.cs
index fbbe80a..002f654 100644
--- a/Xamarin.Forms.Core/ExpressionSearch.cs
+++ b/Xamarin.Forms.Core/ExpressionSearch.cs
@@ -1,7 +1,10 @@
-namespace Xamarin.Forms
+using System.ComponentModel;
+
+namespace Xamarin.Forms.Internals
{
- internal abstract class ExpressionSearch
+ public abstract class ExpressionSearch
{
- internal static IExpressionSearch Default { get; set; }
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static IExpressionSearch Default { get; set; }
}
} \ No newline at end of file
diff --git a/Xamarin.Forms.Core/FileAccess.cs b/Xamarin.Forms.Core/FileAccess.cs
index 3636b73..e6c40fb 100644
--- a/Xamarin.Forms.Core/FileAccess.cs
+++ b/Xamarin.Forms.Core/FileAccess.cs
@@ -1,6 +1,6 @@
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal enum FileAccess
+ public enum FileAccess
{
Read = 0x00000001,
Write = 0x00000002,
diff --git a/Xamarin.Forms.Core/FileMode.cs b/Xamarin.Forms.Core/FileMode.cs
index 3136987..b83861d 100644
--- a/Xamarin.Forms.Core/FileMode.cs
+++ b/Xamarin.Forms.Core/FileMode.cs
@@ -1,6 +1,6 @@
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal enum FileMode
+ public enum FileMode
{
CreateNew = 1,
Create = 2,
diff --git a/Xamarin.Forms.Core/FileShare.cs b/Xamarin.Forms.Core/FileShare.cs
index bf9fc71..a23832b 100644
--- a/Xamarin.Forms.Core/FileShare.cs
+++ b/Xamarin.Forms.Core/FileShare.cs
@@ -1,9 +1,9 @@
using System;
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
[Flags]
- internal enum FileShare
+ public enum FileShare
{
None = 0,
Read = 1,
diff --git a/Xamarin.Forms.Core/FontElement.cs b/Xamarin.Forms.Core/FontElement.cs
index 7c15a48..6963ad0 100644
--- a/Xamarin.Forms.Core/FontElement.cs
+++ b/Xamarin.Forms.Core/FontElement.cs
@@ -1,3 +1,5 @@
+using Xamarin.Forms.Internals;
+
namespace Xamarin.Forms
{
static class FontElement
diff --git a/Xamarin.Forms.Core/Grid.cs b/Xamarin.Forms.Core/Grid.cs
index a0460af..adc239e 100644
--- a/Xamarin.Forms.Core/Grid.cs
+++ b/Xamarin.Forms.Core/Grid.cs
@@ -7,7 +7,7 @@ using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
- public partial class Grid : Layout<View>
+ public partial class Grid : Layout<View>, IGridController
{
public static readonly BindableProperty RowProperty = BindableProperty.CreateAttached("Row", typeof(int), typeof(Grid), default(int), validateValue: (bindable, value) => (int)value >= 0);
@@ -212,6 +212,11 @@ namespace Xamarin.Forms
view.ComputedConstraint = result;
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void InvalidateMeasureInernalNonVirtual(InvalidationTrigger trigger)
+ {
+ InvalidateMeasureInternal(trigger);
+ }
internal override void InvalidateMeasureInternal(InvalidationTrigger trigger)
{
base.InvalidateMeasureInternal(trigger);
diff --git a/Xamarin.Forms.Core/HtmlWebViewSource.cs b/Xamarin.Forms.Core/HtmlWebViewSource.cs
index a5eccc9..cbc94fe 100644
--- a/Xamarin.Forms.Core/HtmlWebViewSource.cs
+++ b/Xamarin.Forms.Core/HtmlWebViewSource.cs
@@ -1,3 +1,5 @@
+using System.ComponentModel;
+
namespace Xamarin.Forms
{
public class HtmlWebViewSource : WebViewSource
@@ -20,7 +22,8 @@ namespace Xamarin.Forms
set { SetValue(HtmlProperty, value); }
}
- internal override void Load(IWebViewDelegate renderer)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override void Load(IWebViewDelegate renderer)
{
renderer.LoadHtml(Html, BaseUrl);
}
diff --git a/Xamarin.Forms.Core/IDeserializer.cs b/Xamarin.Forms.Core/IDeserializer.cs
index 60478e1..e138017 100644
--- a/Xamarin.Forms.Core/IDeserializer.cs
+++ b/Xamarin.Forms.Core/IDeserializer.cs
@@ -1,9 +1,9 @@
using System.Collections.Generic;
using System.Threading.Tasks;
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal interface IDeserializer
+ public interface IDeserializer
{
Task<IDictionary<string, object>> DeserializePropertiesAsync();
Task SerializePropertiesAsync(IDictionary<string, object> properties);
diff --git a/Xamarin.Forms.Core/IElement.cs b/Xamarin.Forms.Core/IElement.cs
index ee302b5..1e13930 100644
--- a/Xamarin.Forms.Core/IElement.cs
+++ b/Xamarin.Forms.Core/IElement.cs
@@ -1,4 +1,5 @@
using System;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
diff --git a/Xamarin.Forms.Core/IElementController.cs b/Xamarin.Forms.Core/IElementController.cs
index 24713b0..090f4c2 100644
--- a/Xamarin.Forms.Core/IElementController.cs
+++ b/Xamarin.Forms.Core/IElementController.cs
@@ -1,4 +1,7 @@
+using System;
+using System.Collections.Generic;
using System.Collections.ObjectModel;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
@@ -11,5 +14,9 @@ namespace Xamarin.Forms
void SetValueFromRenderer(BindableProperty property, object value);
void SetValueFromRenderer(BindablePropertyKey propertyKey, object value);
ReadOnlyCollection<Element> LogicalChildren { get; }
+ IPlatform Platform { get; set; }
+ Element RealParent { get; }
+ IEnumerable<Element> Descendants();
+ event EventHandler PlatformSet;
}
} \ No newline at end of file
diff --git a/Xamarin.Forms.Core/IExpressionSearch.cs b/Xamarin.Forms.Core/IExpressionSearch.cs
index e5d4c26..f4ee871 100644
--- a/Xamarin.Forms.Core/IExpressionSearch.cs
+++ b/Xamarin.Forms.Core/IExpressionSearch.cs
@@ -1,9 +1,9 @@
using System.Collections.Generic;
using System.Linq.Expressions;
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal interface IExpressionSearch
+ public interface IExpressionSearch
{
List<T> FindObjects<T>(Expression expression) where T : class;
}
diff --git a/Xamarin.Forms.Core/IFontElement.cs b/Xamarin.Forms.Core/IFontElement.cs
index 0444974..39a618e 100644
--- a/Xamarin.Forms.Core/IFontElement.cs
+++ b/Xamarin.Forms.Core/IFontElement.cs
@@ -1,6 +1,6 @@
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- interface IFontElement
+ public interface IFontElement
{
//note to implementor: implement the properties publicly
FontAttributes FontAttributes { get; }
diff --git a/Xamarin.Forms.Core/IGridController.cs b/Xamarin.Forms.Core/IGridController.cs
new file mode 100644
index 0000000..38f2b93
--- /dev/null
+++ b/Xamarin.Forms.Core/IGridController.cs
@@ -0,0 +1,9 @@
+using Xamarin.Forms.Internals;
+
+namespace Xamarin.Forms
+{
+ public interface IGridController
+ {
+ void InvalidateMeasureInernalNonVirtual(InvalidationTrigger trigger);
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core/IIsolatedStorageFile.cs b/Xamarin.Forms.Core/IIsolatedStorageFile.cs
index 5089902..684d402 100644
--- a/Xamarin.Forms.Core/IIsolatedStorageFile.cs
+++ b/Xamarin.Forms.Core/IIsolatedStorageFile.cs
@@ -2,9 +2,9 @@ using System;
using System.IO;
using System.Threading.Tasks;
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal interface IIsolatedStorageFile
+ public interface IIsolatedStorageFile
{
Task CreateDirectoryAsync(string path);
Task<bool> GetDirectoryExistsAsync(string path);
diff --git a/Xamarin.Forms.Core/IMenuItemController.cs b/Xamarin.Forms.Core/IMenuItemController.cs
index 4737b17..33bcfc2 100644
--- a/Xamarin.Forms.Core/IMenuItemController.cs
+++ b/Xamarin.Forms.Core/IMenuItemController.cs
@@ -2,7 +2,7 @@ namespace Xamarin.Forms
{
public interface IMenuItemController
{
- bool IsEnabled { get; }
+ bool IsEnabled { get; set; }
string IsEnabledPropertyName { get; }
void Activate();
diff --git a/Xamarin.Forms.Core/IMultiPageController.cs b/Xamarin.Forms.Core/IMultiPageController.cs
new file mode 100644
index 0000000..45a5cb7
--- /dev/null
+++ b/Xamarin.Forms.Core/IMultiPageController.cs
@@ -0,0 +1,7 @@
+namespace Xamarin.Forms
+{
+ public interface IMultiPageController<T>
+ {
+ T GetPageByIndex(int index);
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core/INativeBindingService.cs b/Xamarin.Forms.Core/INativeBindingService.cs
index d926dae..fc41dc6 100644
--- a/Xamarin.Forms.Core/INativeBindingService.cs
+++ b/Xamarin.Forms.Core/INativeBindingService.cs
@@ -1,7 +1,7 @@
-namespace Xamarin.Forms.Xaml
+namespace Xamarin.Forms.Xaml.Internals
{
- interface INativeBindingService
+ public interface INativeBindingService
{
bool TrySetBinding(object target, string propertyName, BindingBase binding);
bool TrySetBinding(object target, BindableProperty property, BindingBase binding);
diff --git a/Xamarin.Forms.Core/INativeValueConverterService.cs b/Xamarin.Forms.Core/INativeValueConverterService.cs
index 4309be9..d89b5c1 100644
--- a/Xamarin.Forms.Core/INativeValueConverterService.cs
+++ b/Xamarin.Forms.Core/INativeValueConverterService.cs
@@ -1,8 +1,8 @@
using System;
-namespace Xamarin.Forms.Xaml
+namespace Xamarin.Forms.Xaml.Internals
{
- interface INativeValueConverterService
+ public interface INativeValueConverterService
{
bool ConvertTo(object value, Type toType, out object nativeValue);
}
diff --git a/Xamarin.Forms.Core/INavigationMenuController.cs b/Xamarin.Forms.Core/INavigationMenuController.cs
new file mode 100644
index 0000000..df33b69
--- /dev/null
+++ b/Xamarin.Forms.Core/INavigationMenuController.cs
@@ -0,0 +1,7 @@
+namespace Xamarin.Forms
+{
+ public interface INavigationMenuController : IViewController
+ {
+ void SendTargetSelected(Page target);
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core/IPanGestureController.cs b/Xamarin.Forms.Core/IPanGestureController.cs
index 9628309..60ebbad 100644
--- a/Xamarin.Forms.Core/IPanGestureController.cs
+++ b/Xamarin.Forms.Core/IPanGestureController.cs
@@ -1,6 +1,6 @@
namespace Xamarin.Forms
{
- internal interface IPanGestureController
+ public interface IPanGestureController
{
void SendPan(Element sender, double totalX, double totalY, int gestureId);
diff --git a/Xamarin.Forms.Core/IPinchGestureController.cs b/Xamarin.Forms.Core/IPinchGestureController.cs
index 9848fa7..5528f66 100644
--- a/Xamarin.Forms.Core/IPinchGestureController.cs
+++ b/Xamarin.Forms.Core/IPinchGestureController.cs
@@ -1,6 +1,6 @@
namespace Xamarin.Forms
{
- internal interface IPinchGestureController
+ public interface IPinchGestureController
{
bool IsPinching { get; set; }
diff --git a/Xamarin.Forms.Core/IPlatform.cs b/Xamarin.Forms.Core/IPlatform.cs
index 507abcf..39c6423 100644
--- a/Xamarin.Forms.Core/IPlatform.cs
+++ b/Xamarin.Forms.Core/IPlatform.cs
@@ -1,6 +1,6 @@
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal interface IPlatform
+ public interface IPlatform
{
SizeRequest GetNativeSize(VisualElement view, double widthConstraint, double heightConstraint);
}
diff --git a/Xamarin.Forms.Core/IPlatformServices.cs b/Xamarin.Forms.Core/IPlatformServices.cs
index 39f0073..89465eb 100644
--- a/Xamarin.Forms.Core/IPlatformServices.cs
+++ b/Xamarin.Forms.Core/IPlatformServices.cs
@@ -5,9 +5,9 @@ using System.Threading;
using System.Threading.Tasks;
using Xamarin.Forms.Internals;
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal interface IPlatformServices
+ public interface IPlatformServices
{
bool IsInvokeRequired { get; }
diff --git a/Xamarin.Forms.Core/IResourceDictionary.cs b/Xamarin.Forms.Core/IResourceDictionary.cs
index 5fccb9d..6a145b0 100644
--- a/Xamarin.Forms.Core/IResourceDictionary.cs
+++ b/Xamarin.Forms.Core/IResourceDictionary.cs
@@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal interface IResourceDictionary : IEnumerable<KeyValuePair<string, object>>
+ public interface IResourceDictionary : IEnumerable<KeyValuePair<string, object>>
{
bool TryGetValue(string key, out object value);
diff --git a/Xamarin.Forms.Core/ISystemResourcesProvider.cs b/Xamarin.Forms.Core/ISystemResourcesProvider.cs
index 9f0e577..77a5841 100644
--- a/Xamarin.Forms.Core/ISystemResourcesProvider.cs
+++ b/Xamarin.Forms.Core/ISystemResourcesProvider.cs
@@ -1,6 +1,6 @@
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal interface ISystemResourcesProvider
+ public interface ISystemResourcesProvider
{
IResourceDictionary GetSystemResources();
}
diff --git a/Xamarin.Forms.Core/IVisualElementController.cs b/Xamarin.Forms.Core/IVisualElementController.cs
index 672f47d..b145037 100644
--- a/Xamarin.Forms.Core/IVisualElementController.cs
+++ b/Xamarin.Forms.Core/IVisualElementController.cs
@@ -1,4 +1,6 @@
+using System;
using Xamarin.Forms.Internals;
+using static Xamarin.Forms.VisualElement;
namespace Xamarin.Forms
{
@@ -6,5 +8,13 @@ namespace Xamarin.Forms
{
void NativeSizeChanged();
void InvalidateMeasure(InvalidationTrigger trigger);
+ bool Batched { get; }
+ bool DisableLayout { get; set; }
+ bool IsInNativeLayout { get; set; }
+ bool IsNativeStateConsistent { get; set; }
+ bool IsPlatformEnabled { get; set; }
+ NavigationProxy NavigationProxy { get; }
+ event EventHandler<EventArg<VisualElement>> BatchCommitted;
+ event EventHandler<FocusRequestArgs> FocusChangeRequested;
}
} \ No newline at end of file
diff --git a/Xamarin.Forms.Core/IWebViewController.cs b/Xamarin.Forms.Core/IWebViewController.cs
new file mode 100644
index 0000000..3e149fc
--- /dev/null
+++ b/Xamarin.Forms.Core/IWebViewController.cs
@@ -0,0 +1,16 @@
+using System;
+using Xamarin.Forms.Internals;
+
+namespace Xamarin.Forms
+{
+ public interface IWebViewController : IViewController
+ {
+ bool CanGoBack { get; set; }
+ bool CanGoForward { get; set; }
+ event EventHandler<EvalRequested> EvalRequested;
+ event EventHandler GoBackRequested;
+ event EventHandler GoForwardRequested;
+ void SendNavigated(WebNavigatedEventArgs args);
+ void SendNavigating(WebNavigatingEventArgs args);
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core/ImageSource.cs b/Xamarin.Forms.Core/ImageSource.cs
index 3b59f7f..588c07b 100644
--- a/Xamarin.Forms.Core/ImageSource.cs
+++ b/Xamarin.Forms.Core/ImageSource.cs
@@ -3,6 +3,7 @@ using System.IO;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
diff --git a/Xamarin.Forms.Core/Interactivity/Behavior.cs b/Xamarin.Forms.Core/Interactivity/Behavior.cs
index f868904..7a126b8 100644
--- a/Xamarin.Forms.Core/Interactivity/Behavior.cs
+++ b/Xamarin.Forms.Core/Interactivity/Behavior.cs
@@ -1,4 +1,5 @@
using System;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
diff --git a/Xamarin.Forms.Core/Interactivity/TriggerBase.cs b/Xamarin.Forms.Core/Interactivity/TriggerBase.cs
index 9418c7a..8adb49d 100644
--- a/Xamarin.Forms.Core/Interactivity/TriggerBase.cs
+++ b/Xamarin.Forms.Core/Interactivity/TriggerBase.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
diff --git a/Xamarin.Forms.Core/Internals/EffectUtilities.cs b/Xamarin.Forms.Core/Internals/EffectUtilities.cs
index f4fe832..4fd1b73 100644
--- a/Xamarin.Forms.Core/Internals/EffectUtilities.cs
+++ b/Xamarin.Forms.Core/Internals/EffectUtilities.cs
@@ -1,6 +1,6 @@
namespace Xamarin.Forms.Internals
{
- internal static class EffectUtilities
+ public static class EffectUtilities
{
public static void RegisterEffectControlProvider(IEffectControlProvider self, IElementController oldElement, IElementController newElement)
{
diff --git a/Xamarin.Forms.Core/Internals/Ticker.cs b/Xamarin.Forms.Core/Internals/Ticker.cs
index 7fe60cc..9b7c575 100644
--- a/Xamarin.Forms.Core/Internals/Ticker.cs
+++ b/Xamarin.Forms.Core/Internals/Ticker.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
@@ -14,7 +15,7 @@ namespace Xamarin.Forms.Internals
int _count;
bool _enabled;
- internal Ticker()
+ protected Ticker()
{
_count = 0;
_timeouts = new List<Tuple<int, Func<long, bool>>>();
@@ -22,6 +23,8 @@ namespace Xamarin.Forms.Internals
_stopwatch = new Stopwatch();
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void SetDefault(Ticker ticker) => Default = ticker;
public static Ticker Default
{
internal set { s_ticker = value; }
diff --git a/Xamarin.Forms.Core/ItemsView.cs b/Xamarin.Forms.Core/ItemsView.cs
index b99fdf0..33114f3 100644
--- a/Xamarin.Forms.Core/ItemsView.cs
+++ b/Xamarin.Forms.Core/ItemsView.cs
@@ -1,4 +1,5 @@
using System.Collections;
+using System.ComponentModel;
using Xamarin.Forms.Internals;
namespace Xamarin.Forms
@@ -49,7 +50,8 @@ namespace Xamarin.Forms
ITemplatedItemsList<TVisual> ITemplatedItemsView<TVisual>.TemplatedItems { get { return TemplatedItems; } }
- internal TemplatedItemsList<ItemsView<TVisual>, TVisual> TemplatedItems { get; }
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public TemplatedItemsList<ItemsView<TVisual>, TVisual> TemplatedItems { get; }
TVisual IItemsView<TVisual>.CreateDefault(object item)
{
diff --git a/Xamarin.Forms.Core/Keyboard.cs b/Xamarin.Forms.Core/Keyboard.cs
index ac07a0b..94b2684 100644
--- a/Xamarin.Forms.Core/Keyboard.cs
+++ b/Xamarin.Forms.Core/Keyboard.cs
@@ -1,3 +1,5 @@
+using Xamarin.Forms.Internals;
+
namespace Xamarin.Forms
{
[TypeConverter(typeof(KeyboardTypeConverter))]
diff --git a/Xamarin.Forms.Core/KeyboardTypeConverter.cs b/Xamarin.Forms.Core/KeyboardTypeConverter.cs
index 4a93010..50074bd 100644
--- a/Xamarin.Forms.Core/KeyboardTypeConverter.cs
+++ b/Xamarin.Forms.Core/KeyboardTypeConverter.cs
@@ -1,6 +1,7 @@
using System;
using System.Linq;
using System.Reflection;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
diff --git a/Xamarin.Forms.Core/LayoutOptionsConverter.cs b/Xamarin.Forms.Core/LayoutOptionsConverter.cs
index 6dae0f0..46ef256 100644
--- a/Xamarin.Forms.Core/LayoutOptionsConverter.cs
+++ b/Xamarin.Forms.Core/LayoutOptionsConverter.cs
@@ -1,6 +1,7 @@
using System;
using System.Linq;
using System.Reflection;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
diff --git a/Xamarin.Forms.Core/ListView.cs b/Xamarin.Forms.Core/ListView.cs
index 8f234cf..fd173c7 100644
--- a/Xamarin.Forms.Core/ListView.cs
+++ b/Xamarin.Forms.Core/ListView.cs
@@ -1,8 +1,10 @@
using System;
using System.Collections;
+using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Windows.Input;
+using Xamarin.Forms.Internals;
using Xamarin.Forms.Platform;
namespace Xamarin.Forms
@@ -210,7 +212,8 @@ namespace Xamarin.Forms
set { SetValue(SeparatorVisibilityProperty, value); }
}
- internal ListViewCachingStrategy CachingStrategy { get; private set; }
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public ListViewCachingStrategy CachingStrategy { get; private set; }
ListViewCachingStrategy IListViewController.CachingStrategy
{
get
diff --git a/Xamarin.Forms.Core/LockableObservableListWrapper.cs b/Xamarin.Forms.Core/LockableObservableListWrapper.cs
new file mode 100644
index 0000000..6bfdb39
--- /dev/null
+++ b/Xamarin.Forms.Core/LockableObservableListWrapper.cs
@@ -0,0 +1,131 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Collections.Specialized;
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+using Xamarin.Forms.Internals;
+using Xamarin.Forms.Platform;
+
+namespace Xamarin.Forms.Internals
+{
+ public class LockableObservableListWrapper : IList<string>, ICollection<string>, INotifyCollectionChanged, INotifyPropertyChanged, IReadOnlyList<string>, IReadOnlyCollection<string>, IEnumerable<string>, IEnumerable
+ {
+ public readonly ObservableCollection<string> _list = new ObservableCollection<string>();
+
+ event NotifyCollectionChangedEventHandler INotifyCollectionChanged.CollectionChanged
+ {
+ add { ((INotifyCollectionChanged)_list).CollectionChanged += value; }
+ remove { ((INotifyCollectionChanged)_list).CollectionChanged -= value; }
+ }
+
+ event PropertyChangedEventHandler INotifyPropertyChanged.PropertyChanged {
+ add { ((INotifyPropertyChanged)_list).PropertyChanged += value; }
+ remove { ((INotifyPropertyChanged)_list).PropertyChanged -= value; }
+ }
+
+ public bool IsLocked { get; set; }
+
+ void ThrowOnLocked()
+ {
+ if (IsLocked)
+ throw new InvalidOperationException("The Items list can not be manipulated if the ItemsSource property is set");
+ }
+
+ public string this [int index] {
+ get { return _list [index]; }
+ set {
+ ThrowOnLocked();
+ _list [index] = value; }
+ }
+
+ public int Count {
+ get { return _list.Count; }
+ }
+
+ public bool IsReadOnly {
+ get { return ((IList<string>)_list).IsReadOnly; }
+ }
+
+ public void InternalAdd(string item)
+ {
+ _list.Add(item);
+ }
+
+ public void Add(string item)
+ {
+ ThrowOnLocked();
+ InternalAdd(item);
+ }
+
+ public void InternalClear()
+ {
+ _list.Clear();
+ }
+
+ public void Clear()
+ {
+ ThrowOnLocked();
+ InternalClear();
+ }
+
+ public bool Contains(string item)
+ {
+ return _list.Contains(item);
+ }
+
+ public void CopyTo(string [] array, int arrayIndex)
+ {
+ _list.CopyTo(array, arrayIndex);
+ }
+
+ public IEnumerator<string> GetEnumerator()
+ {
+ return _list.GetEnumerator();
+ }
+
+ public int IndexOf(string item)
+ {
+ return _list.IndexOf(item);
+ }
+
+ public void InternalInsert(int index, string item)
+ {
+ _list.Insert(index, item);
+ }
+
+ public void Insert(int index, string item)
+ {
+ ThrowOnLocked();
+ InternalInsert(index, item);
+ }
+
+ public bool InternalRemove(string item)
+ {
+ return _list.Remove(item);
+ }
+
+ public bool Remove(string item)
+ {
+ ThrowOnLocked();
+ return InternalRemove(item);
+ }
+
+ public void InternalRemoveAt(int index)
+ {
+ _list.RemoveAt(index);
+ }
+
+ public void RemoveAt(int index)
+ {
+ ThrowOnLocked();
+ InternalRemoveAt(index);
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return ((IEnumerable)_list).GetEnumerator();
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core/Log.cs b/Xamarin.Forms.Core/Log.cs
index b8053e5..2e1c318 100644
--- a/Xamarin.Forms.Core/Log.cs
+++ b/Xamarin.Forms.Core/Log.cs
@@ -1,8 +1,8 @@
using System.Collections.Generic;
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal static class Log
+ public static class Log
{
static Log()
{
diff --git a/Xamarin.Forms.Core/LogListener.cs b/Xamarin.Forms.Core/LogListener.cs
index 7822256..6677797 100644
--- a/Xamarin.Forms.Core/LogListener.cs
+++ b/Xamarin.Forms.Core/LogListener.cs
@@ -1,6 +1,6 @@
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal abstract class LogListener
+ public abstract class LogListener
{
public abstract void Warning(string category, string message);
}
diff --git a/Xamarin.Forms.Core/MasterDetailPage.cs b/Xamarin.Forms.Core/MasterDetailPage.cs
index 2ab08e9..4fe1c49 100644
--- a/Xamarin.Forms.Core/MasterDetailPage.cs
+++ b/Xamarin.Forms.Core/MasterDetailPage.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using Xamarin.Forms.Internals;
using Xamarin.Forms.Platform;
namespace Xamarin.Forms
diff --git a/Xamarin.Forms.Core/MenuItem.cs b/Xamarin.Forms.Core/MenuItem.cs
index 84ad032..329acab 100644
--- a/Xamarin.Forms.Core/MenuItem.cs
+++ b/Xamarin.Forms.Core/MenuItem.cs
@@ -1,4 +1,5 @@
using System;
+using System.ComponentModel;
using System.Windows.Input;
namespace Xamarin.Forms
@@ -17,7 +18,8 @@ namespace Xamarin.Forms
public static readonly BindableProperty IconProperty = BindableProperty.Create("Icon", typeof(FileImageSource), typeof(MenuItem), default(FileImageSource));
- internal static readonly BindableProperty IsEnabledProperty = BindableProperty.Create("IsEnabled", typeof(bool), typeof(ToolbarItem), true);
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty IsEnabledProperty = BindableProperty.Create("IsEnabled", typeof(bool), typeof(ToolbarItem), true);
string IMenuItemController.IsEnabledPropertyName
{
@@ -57,20 +59,13 @@ namespace Xamarin.Forms
set { SetValue(TextProperty, value); }
}
- internal bool IsEnabled
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool IsEnabled
{
get { return (bool)GetValue(IsEnabledProperty); }
set { SetValue(IsEnabledProperty, value); }
}
- bool IMenuItemController.IsEnabled
- {
- get
- {
- return IsEnabled;
- }
- }
-
bool IsEnabledCore
{
set { SetValueCore(IsEnabledProperty, value); }
diff --git a/Xamarin.Forms.Core/MultiPage.cs b/Xamarin.Forms.Core/MultiPage.cs
index a738249..765f779 100644
--- a/Xamarin.Forms.Core/MultiPage.cs
+++ b/Xamarin.Forms.Core/MultiPage.cs
@@ -3,13 +3,15 @@ using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
+using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
[ContentProperty("Children")]
- public abstract class MultiPage<T> : Page, IViewContainer<T>, IPageContainer<T>, IItemsView<T> where T : Page
+ public abstract class MultiPage<T> : Page, IViewContainer<T>, IPageContainer<T>, IItemsView<T>, IMultiPageController<T> where T : Page
{
public static readonly BindableProperty ItemsSourceProperty = BindableProperty.Create("ItemsSource", typeof(IEnumerable), typeof(MultiPage<>), null);
@@ -159,7 +161,8 @@ namespace Xamarin.Forms
{
}
- internal static int GetIndex(T page)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static int GetIndex(T page)
{
if (page == null)
throw new ArgumentNullException("page");
@@ -167,7 +170,8 @@ namespace Xamarin.Forms
return (int)page.GetValue(IndexProperty);
}
- internal T GetPageByIndex(int index)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public T GetPageByIndex(int index)
{
foreach (T page in InternalChildren)
{
@@ -177,7 +181,8 @@ namespace Xamarin.Forms
return null;
}
- internal static void SetIndex(Page page, int index)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void SetIndex(Page page, int index)
{
if (page == null)
throw new ArgumentNullException("page");
diff --git a/Xamarin.Forms.Core/NativeBindingHelpers.cs b/Xamarin.Forms.Core/NativeBindingHelpers.cs
index e4cae7d..ea57797 100644
--- a/Xamarin.Forms.Core/NativeBindingHelpers.cs
+++ b/Xamarin.Forms.Core/NativeBindingHelpers.cs
@@ -8,10 +8,11 @@ using Xamarin.Forms.Internals;
using static System.String;
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- static class NativeBindingHelpers
+ public static class NativeBindingHelpers
{
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static void SetBinding<TNativeView>(TNativeView target, string targetProperty, BindingBase bindingBase, string updateSourceEventName = null) where TNativeView : class
{
var binding = bindingBase as Binding;
@@ -25,7 +26,8 @@ namespace Xamarin.Forms
SetBinding(target, targetProperty, bindingBase, eventWrapper);
}
- internal static void SetBinding<TNativeView>(TNativeView target, string targetProperty, BindingBase bindingBase, INotifyPropertyChanged propertyChanged) where TNativeView : class
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void SetBinding<TNativeView>(TNativeView target, string targetProperty, BindingBase bindingBase, INotifyPropertyChanged propertyChanged) where TNativeView : class
{
if (target == null)
throw new ArgumentNullException(nameof(target));
@@ -93,6 +95,7 @@ namespace Xamarin.Forms
bindable.SetValueCore(property, value);
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static void SetBinding<TNativeView>(TNativeView target, BindableProperty targetProperty, BindingBase binding) where TNativeView : class
{
if (target == null)
@@ -106,6 +109,7 @@ namespace Xamarin.Forms
proxy.BindingsBackpack.Add(new KeyValuePair<BindableProperty, BindingBase>(targetProperty, binding));
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static void SetValue<TNativeView>(TNativeView target, BindableProperty targetProperty, object value) where TNativeView : class
{
if (target == null)
@@ -117,6 +121,7 @@ namespace Xamarin.Forms
proxy.ValuesBackpack.Add(new KeyValuePair<BindableProperty, object>(targetProperty, value));
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static void SetBindingContext<TNativeView>(TNativeView target, object bindingContext, Func<TNativeView, IEnumerable<TNativeView>> getChild = null) where TNativeView : class
{
if (target == null)
@@ -134,7 +139,8 @@ namespace Xamarin.Forms
SetBindingContext(child, bindingContext, getChild);
}
- internal static void TransferBindablePropertiesToWrapper<TNativeView, TNativeWrapper>(TNativeView nativeView, TNativeWrapper wrapper)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void TransferBindablePropertiesToWrapper<TNativeView, TNativeWrapper>(TNativeView nativeView, TNativeWrapper wrapper)
where TNativeView : class
where TNativeWrapper : View
{
diff --git a/Xamarin.Forms.Core/NavigationMenu.cs b/Xamarin.Forms.Core/NavigationMenu.cs
index 2283bd5..3e9724f 100644
--- a/Xamarin.Forms.Core/NavigationMenu.cs
+++ b/Xamarin.Forms.Core/NavigationMenu.cs
@@ -3,11 +3,11 @@ using System.Collections.Generic;
using System.Linq;
using Xamarin.Forms.Platform;
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
// Mark as internal until renderers are ready for release after 1.0
[RenderWith(typeof(_NavigationMenuRenderer))]
- internal class NavigationMenu : View, IElementConfiguration<NavigationMenu>
+ public class NavigationMenu : View, INavigationMenuController, IElementConfiguration<NavigationMenu>
{
readonly List<Page> _targets = new List<Page>();
@@ -64,12 +64,7 @@ namespace Xamarin.Forms
return _platformConfigurationRegistry.Value.On<T>();
}
- internal void SendTargetSelected(Page target)
- {
- TargetSelected(target);
- }
-
- void TargetSelected(Page target)
+ void INavigationMenuController.SendTargetSelected(Page target)
{
Navigation.PushAsync(target);
}
diff --git a/Xamarin.Forms.Core/NavigationModel.cs b/Xamarin.Forms.Core/NavigationModel.cs
index 4591d4a..a3dab61 100644
--- a/Xamarin.Forms.Core/NavigationModel.cs
+++ b/Xamarin.Forms.Core/NavigationModel.cs
@@ -2,9 +2,9 @@ using System;
using System.Collections.Generic;
using System.Linq;
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal class NavigationModel
+ public class NavigationModel
{
readonly List<Page> _modalStack = new List<Page>();
readonly List<List<Page>> _navTree = new List<List<Page>>();
diff --git a/Xamarin.Forms.Core/NavigationProxy.cs b/Xamarin.Forms.Core/NavigationProxy.cs
index 65e2fee..0b686c0 100644
--- a/Xamarin.Forms.Core/NavigationProxy.cs
+++ b/Xamarin.Forms.Core/NavigationProxy.cs
@@ -1,17 +1,19 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Linq;
using System.Threading.Tasks;
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal class NavigationProxy : INavigation
+ public class NavigationProxy : INavigation
{
INavigation _inner;
Lazy<List<Page>> _modalStack = new Lazy<List<Page>>(() => new List<Page>());
Lazy<List<Page>> _pushStack = new Lazy<List<Page>>(() => new List<Page>());
+ [EditorBrowsable(EditorBrowsableState.Never)]
public INavigation Inner
{
get { return _inner; }
@@ -52,56 +54,67 @@ namespace Xamarin.Forms
}
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public void InsertPageBefore(Page page, Page before)
{
OnInsertPageBefore(page, before);
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public IReadOnlyList<Page> ModalStack
{
get { return GetModalStack(); }
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public IReadOnlyList<Page> NavigationStack
{
get { return GetNavigationStack(); }
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public Task<Page> PopAsync()
{
return OnPopAsync(true);
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public Task<Page> PopAsync(bool animated)
{
return OnPopAsync(animated);
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public Task<Page> PopModalAsync()
{
return OnPopModal(true);
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public Task<Page> PopModalAsync(bool animated)
{
return OnPopModal(animated);
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public Task PopToRootAsync()
{
return OnPopToRootAsync(true);
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public Task PopToRootAsync(bool animated)
{
return OnPopToRootAsync(animated);
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public Task PushAsync(Page root)
{
return PushAsync(root, true);
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public Task PushAsync(Page root, bool animated)
{
if (root.RealParent != null)
@@ -109,11 +122,13 @@ namespace Xamarin.Forms
return OnPushAsync(root, animated);
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public Task PushModalAsync(Page modal)
{
return PushModalAsync(modal, true);
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public Task PushModalAsync(Page modal, bool animated)
{
if (modal.RealParent != null)
@@ -121,6 +136,7 @@ namespace Xamarin.Forms
return OnPushModal(modal, animated);
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public void RemovePage(Page page)
{
OnRemovePage(page);
diff --git a/Xamarin.Forms.Core/NumericExtensions.cs b/Xamarin.Forms.Core/NumericExtensions.cs
index 6333c36..fb7c78a 100644
--- a/Xamarin.Forms.Core/NumericExtensions.cs
+++ b/Xamarin.Forms.Core/NumericExtensions.cs
@@ -1,14 +1,18 @@
using System;
+using System.ComponentModel;
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal static class NumericExtensions
+ public static class NumericExtensions
{
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static double Clamp(this double self, double min, double max)
{
return Math.Min(max, Math.Max(self, min));
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static int Clamp(this int self, int min, int max)
{
return Math.Min(max, Math.Max(self, min));
diff --git a/Xamarin.Forms.Core/OrderedDictionary.cs b/Xamarin.Forms.Core/OrderedDictionary.cs
index 028979c..6e063b6 100644
--- a/Xamarin.Forms.Core/OrderedDictionary.cs
+++ b/Xamarin.Forms.Core/OrderedDictionary.cs
@@ -31,6 +31,7 @@ using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Xamarin.Forms;
+using Xamarin.Forms.Internals;
namespace Cadenza.Collections
{
diff --git a/Xamarin.Forms.Core/PanGestureRecognizer.cs b/Xamarin.Forms.Core/PanGestureRecognizer.cs
index 3fbf2f6..0a3a3fa 100644
--- a/Xamarin.Forms.Core/PanGestureRecognizer.cs
+++ b/Xamarin.Forms.Core/PanGestureRecognizer.cs
@@ -1,4 +1,5 @@
using System;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
diff --git a/Xamarin.Forms.Core/Performance.cs b/Xamarin.Forms.Core/Performance.cs
index e627817..2497b08 100644
--- a/Xamarin.Forms.Core/Performance.cs
+++ b/Xamarin.Forms.Core/Performance.cs
@@ -1,22 +1,25 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal static class Performance
+ public static class Performance
{
static readonly Dictionary<string, Stats> Statistics = new Dictionary<string, Stats>();
+ [EditorBrowsable(EditorBrowsableState.Never)]
[Conditional("PERF")]
public static void Clear()
{
Statistics.Clear();
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static void Count(string tag = null, [CallerFilePath] string path = null, [CallerMemberName] string member = null)
{
string id = path + ":" + member + (tag != null ? "-" + tag : string.Empty);
@@ -28,12 +31,14 @@ namespace Xamarin.Forms
stats.CallCount++;
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
[Conditional("PERF")]
public static void DumpStats()
{
Debug.WriteLine(GetStats());
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static string GetStats()
{
var b = new StringBuilder();
@@ -49,6 +54,7 @@ namespace Xamarin.Forms
return b.ToString();
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
[Conditional("PERF")]
public static void Start(string tag = null, [CallerFilePath] string path = null, [CallerMemberName] string member = null)
{
@@ -62,6 +68,7 @@ namespace Xamarin.Forms
stats.StartTimes.Push(Stopwatch.GetTimestamp());
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
[Conditional("PERF")]
public static void Stop(string tag = null, [CallerFilePath] string path = null, [CallerMemberName] string member = null)
{
diff --git a/Xamarin.Forms.Core/Picker.cs b/Xamarin.Forms.Core/Picker.cs
index 0d85ea5..2d706c6 100644
--- a/Xamarin.Forms.Core/Picker.cs
+++ b/Xamarin.Forms.Core/Picker.cs
@@ -5,6 +5,7 @@ using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Runtime.CompilerServices;
+using Xamarin.Forms.Internals;
using Xamarin.Forms.Platform;
namespace Xamarin.Forms
@@ -222,124 +223,5 @@ namespace Xamarin.Forms
void ITextElement.OnTextColorPropertyChanged(Color oldValue, Color newValue)
{
}
-
- internal class LockableObservableListWrapper : IList<string>, ICollection<string>, INotifyCollectionChanged, INotifyPropertyChanged, IReadOnlyList<string>, IReadOnlyCollection<string>, IEnumerable<string>, IEnumerable
- {
- internal readonly ObservableCollection<string> _list = new ObservableCollection<string>();
-
- event NotifyCollectionChangedEventHandler INotifyCollectionChanged.CollectionChanged
- {
- add { ((INotifyCollectionChanged)_list).CollectionChanged += value; }
- remove { ((INotifyCollectionChanged)_list).CollectionChanged -= value; }
- }
-
- event PropertyChangedEventHandler INotifyPropertyChanged.PropertyChanged {
- add { ((INotifyPropertyChanged)_list).PropertyChanged += value; }
- remove { ((INotifyPropertyChanged)_list).PropertyChanged -= value; }
- }
-
- public bool IsLocked { get; set; }
-
- void ThrowOnLocked()
- {
- if (IsLocked)
- throw new InvalidOperationException("The Items list can not be manipulated if the ItemsSource property is set");
- }
-
- public string this [int index] {
- get { return _list [index]; }
- set {
- ThrowOnLocked();
- _list [index] = value; }
- }
-
- public int Count {
- get { return _list.Count; }
- }
-
- public bool IsReadOnly {
- get { return ((IList<string>)_list).IsReadOnly; }
- }
-
- public void InternalAdd(string item)
- {
- _list.Add(item);
- }
-
- public void Add(string item)
- {
- ThrowOnLocked();
- InternalAdd(item);
- }
-
- public void InternalClear()
- {
- _list.Clear();
- }
-
- public void Clear()
- {
- ThrowOnLocked();
- InternalClear();
- }
-
- public bool Contains(string item)
- {
- return _list.Contains(item);
- }
-
- public void CopyTo(string [] array, int arrayIndex)
- {
- _list.CopyTo(array, arrayIndex);
- }
-
- public IEnumerator<string> GetEnumerator()
- {
- return _list.GetEnumerator();
- }
-
- public int IndexOf(string item)
- {
- return _list.IndexOf(item);
- }
-
- public void InternalInsert(int index, string item)
- {
- _list.Insert(index, item);
- }
-
- public void Insert(int index, string item)
- {
- ThrowOnLocked();
- InternalInsert(index, item);
- }
-
- public bool InternalRemove(string item)
- {
- return _list.Remove(item);
- }
-
- public bool Remove(string item)
- {
- ThrowOnLocked();
- return InternalRemove(item);
- }
-
- public void InternalRemoveAt(int index)
- {
- _list.RemoveAt(index);
- }
-
- public void RemoveAt(int index)
- {
- ThrowOnLocked();
- InternalRemoveAt(index);
- }
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- return ((IEnumerable)_list).GetEnumerator();
- }
- }
}
} \ No newline at end of file
diff --git a/Xamarin.Forms.Core/PinchGestureRecognizer.cs b/Xamarin.Forms.Core/PinchGestureRecognizer.cs
index aef07fb..30a8d23 100644
--- a/Xamarin.Forms.Core/PinchGestureRecognizer.cs
+++ b/Xamarin.Forms.Core/PinchGestureRecognizer.cs
@@ -1,4 +1,5 @@
using System;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
diff --git a/Xamarin.Forms.Core/PlatformEffect.cs b/Xamarin.Forms.Core/PlatformEffect.cs
index e92231c..217510f 100644
--- a/Xamarin.Forms.Core/PlatformEffect.cs
+++ b/Xamarin.Forms.Core/PlatformEffect.cs
@@ -6,8 +6,14 @@ namespace Xamarin.Forms
{
public TContainer Container { get; internal set; }
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetContainer(TContainer container) => Container = container;
+
public TControl Control { get; internal set; }
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetControl(TControl control) => Control = control;
+
protected virtual void OnElementPropertyChanged(PropertyChangedEventArgs args)
{
}
diff --git a/Xamarin.Forms.Core/ProgressBar.cs b/Xamarin.Forms.Core/ProgressBar.cs
index 323cc51..ffeb5ab 100644
--- a/Xamarin.Forms.Core/ProgressBar.cs
+++ b/Xamarin.Forms.Core/ProgressBar.cs
@@ -1,5 +1,6 @@
using System;
using System.Threading.Tasks;
+using Xamarin.Forms.Internals;
using Xamarin.Forms.Platform;
namespace Xamarin.Forms
diff --git a/Xamarin.Forms.Core/Properties/AssemblyInfo.cs b/Xamarin.Forms.Core/Properties/AssemblyInfo.cs
index 96366bb..429aca9 100644
--- a/Xamarin.Forms.Core/Properties/AssemblyInfo.cs
+++ b/Xamarin.Forms.Core/Properties/AssemblyInfo.cs
@@ -20,15 +20,15 @@ using Xamarin.Forms.Internals;
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]
-[assembly: InternalsVisibleTo("Xamarin.Forms.Platform.iOS")]
-[assembly: InternalsVisibleTo("Xamarin.Forms.Platform.iOS.Classic")]
-[assembly: InternalsVisibleTo("Xamarin.Forms.Platform.Android")]
-[assembly: InternalsVisibleTo("Xamarin.Forms.Platform.UAP")]
-[assembly: InternalsVisibleTo("Xamarin.Forms.Platform.WinRT")]
-[assembly: InternalsVisibleTo("Xamarin.Forms.Platform.WinRT.Tablet")]
-[assembly: InternalsVisibleTo("Xamarin.Forms.Platform.WinRT.Phone")]
-[assembly: InternalsVisibleTo("Xamarin.Forms.Platform.WP8")]
-[assembly: InternalsVisibleTo("Xamarin.Forms.Platform.macOS")]
+//[assembly: InternalsVisibleTo("Xamarin.Forms.Platform.iOS")]
+//[assembly: InternalsVisibleTo("Xamarin.Forms.Platform.iOS.Classic")]
+//[assembly: InternalsVisibleTo("Xamarin.Forms.Platform.Android")]
+//[assembly: InternalsVisibleTo("Xamarin.Forms.Platform.UAP")]
+//[assembly: InternalsVisibleTo("Xamarin.Forms.Platform.WinRT")]
+//[assembly: InternalsVisibleTo("Xamarin.Forms.Platform.WinRT.Tablet")]
+//[assembly: InternalsVisibleTo("Xamarin.Forms.Platform.WinRT.Phone")]
+//[assembly: InternalsVisibleTo("Xamarin.Forms.Platform.WP8")]
+//[assembly: InternalsVisibleTo("Xamarin.Forms.Platform.macOS")]
[assembly: InternalsVisibleTo("iOSUnitTests")]
[assembly: InternalsVisibleTo("Xamarin.Forms.Controls")]
[assembly: InternalsVisibleTo("Xamarin.Forms.Core.Design")]
diff --git a/Xamarin.Forms.Core/ReadOnlyListAdapter.cs b/Xamarin.Forms.Core/ReadOnlyListAdapter.cs
index 0ffdaef..707acba 100644
--- a/Xamarin.Forms.Core/ReadOnlyListAdapter.cs
+++ b/Xamarin.Forms.Core/ReadOnlyListAdapter.cs
@@ -2,6 +2,7 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
diff --git a/Xamarin.Forms.Core/ReflectionExtensions.cs b/Xamarin.Forms.Core/ReflectionExtensions.cs
index 95fd18c..7a8b98b 100644
--- a/Xamarin.Forms.Core/ReflectionExtensions.cs
+++ b/Xamarin.Forms.Core/ReflectionExtensions.cs
@@ -1,32 +1,38 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Linq;
using System.Reflection;
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal static class ReflectionExtensions
+ public static class ReflectionExtensions
{
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static FieldInfo GetField(this Type type, Func<FieldInfo, bool> predicate)
{
return GetFields(type).FirstOrDefault(predicate);
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static FieldInfo GetField(this Type type, string name)
{
return type.GetField(fi => fi.Name == name);
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static IEnumerable<FieldInfo> GetFields(this Type type)
{
return GetParts(type, i => i.DeclaredFields);
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static IEnumerable<PropertyInfo> GetProperties(this Type type)
{
return GetParts(type, ti => ti.DeclaredProperties);
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static PropertyInfo GetProperty(this Type type, string name)
{
Type t = type;
@@ -43,11 +49,13 @@ namespace Xamarin.Forms
return null;
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static bool IsAssignableFrom(this Type self, Type c)
{
return self.GetTypeInfo().IsAssignableFrom(c.GetTypeInfo());
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static bool IsInstanceOfType(this Type self, object o)
{
return self.GetTypeInfo().IsAssignableFrom(o.GetType().GetTypeInfo());
diff --git a/Xamarin.Forms.Core/Registrar.cs b/Xamarin.Forms.Core/Registrar.cs
index 0b13a61..617066a 100644
--- a/Xamarin.Forms.Core/Registrar.cs
+++ b/Xamarin.Forms.Core/Registrar.cs
@@ -1,11 +1,13 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Linq;
using System.Reflection;
-namespace Xamarin.Forms
+
+namespace Xamarin.Forms.Internals
{
- internal class Registrar<TRegistrable> where TRegistrable : class
+ public class Registrar<TRegistrable> where TRegistrable : class
{
readonly Dictionary<Type, Type> _handlers = new Dictionary<Type, Type>();
@@ -24,15 +26,17 @@ namespace Xamarin.Forms
return (TRegistrable)handler;
}
- internal TOut GetHandler<TOut>(Type type) where TOut : TRegistrable
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public TOut GetHandler<TOut>(Type type) where TOut : TRegistrable
{
return (TOut)GetHandler(type);
}
- internal Type GetHandlerType(Type viewType)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Type GetHandlerType(Type viewType)
{
Type type;
- if(LookupHandlerType(viewType, out type))
+ if (LookupHandlerType(viewType, out type))
return type;
// lazy load render-view association with RenderWithAttribute (as opposed to using ExportRenderer)
@@ -84,7 +88,7 @@ namespace Xamarin.Forms
}
}
- internal static class Registrar
+ public static class Registrar
{
static Registrar()
{
@@ -93,11 +97,14 @@ namespace Xamarin.Forms
internal static Dictionary<string, Type> Effects { get; } = new Dictionary<string, Type>();
- internal static IEnumerable<Assembly> ExtraAssemblies { get; set; }
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static IEnumerable<Assembly> ExtraAssemblies { get; set; }
- internal static Registrar<IRegisterable> Registered { get; }
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static Registrar<IRegisterable> Registered { get; }
- internal static void RegisterAll(Type[] attrTypes)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void RegisterAll(Type[] attrTypes)
{
Assembly[] assemblies = Device.GetAssemblies();
if (ExtraAssemblies != null)
diff --git a/Xamarin.Forms.Core/RelativeLayout.cs b/Xamarin.Forms.Core/RelativeLayout.cs
index 2b83501..85c64d0 100644
--- a/Xamarin.Forms.Core/RelativeLayout.cs
+++ b/Xamarin.Forms.Core/RelativeLayout.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Linq.Expressions;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
diff --git a/Xamarin.Forms.Core/ResourceDictionary.cs b/Xamarin.Forms.Core/ResourceDictionary.cs
index a213dee..c9413eb 100644
--- a/Xamarin.Forms.Core/ResourceDictionary.cs
+++ b/Xamarin.Forms.Core/ResourceDictionary.cs
@@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Linq;
using System.Reflection;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
diff --git a/Xamarin.Forms.Core/ResourcesChangedEventArgs.cs b/Xamarin.Forms.Core/ResourcesChangedEventArgs.cs
index 2bab856..95056c3 100644
--- a/Xamarin.Forms.Core/ResourcesChangedEventArgs.cs
+++ b/Xamarin.Forms.Core/ResourcesChangedEventArgs.cs
@@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal class ResourcesChangedEventArgs : EventArgs
+ public class ResourcesChangedEventArgs : EventArgs
{
public ResourcesChangedEventArgs(IEnumerable<KeyValuePair<string, object>> values)
{
diff --git a/Xamarin.Forms.Core/ScrollView.cs b/Xamarin.Forms.Core/ScrollView.cs
index 2c1f070..711c2ce 100644
--- a/Xamarin.Forms.Core/ScrollView.cs
+++ b/Xamarin.Forms.Core/ScrollView.cs
@@ -1,5 +1,6 @@
using System;
using System.Threading.Tasks;
+using Xamarin.Forms.Internals;
using Xamarin.Forms.Platform;
namespace Xamarin.Forms
diff --git a/Xamarin.Forms.Core/SearchBar.cs b/Xamarin.Forms.Core/SearchBar.cs
index 614671b..3d83686 100644
--- a/Xamarin.Forms.Core/SearchBar.cs
+++ b/Xamarin.Forms.Core/SearchBar.cs
@@ -1,5 +1,6 @@
using System;
using System.Windows.Input;
+using Xamarin.Forms.Internals;
using Xamarin.Forms.Platform;
namespace Xamarin.Forms
diff --git a/Xamarin.Forms.Core/Slider.cs b/Xamarin.Forms.Core/Slider.cs
index 5f5f531..3f3961f 100644
--- a/Xamarin.Forms.Core/Slider.cs
+++ b/Xamarin.Forms.Core/Slider.cs
@@ -1,4 +1,5 @@
using System;
+using Xamarin.Forms.Internals;
using Xamarin.Forms.Platform;
namespace Xamarin.Forms
diff --git a/Xamarin.Forms.Core/Span.cs b/Xamarin.Forms.Core/Span.cs
index 06c4212..9060559 100644
--- a/Xamarin.Forms.Core/Span.cs
+++ b/Xamarin.Forms.Core/Span.cs
@@ -1,6 +1,7 @@
using System;
using System.ComponentModel;
using System.Runtime.CompilerServices;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
diff --git a/Xamarin.Forms.Core/StackLayout.cs b/Xamarin.Forms.Core/StackLayout.cs
index aa80797..9f1d6c5 100644
--- a/Xamarin.Forms.Core/StackLayout.cs
+++ b/Xamarin.Forms.Core/StackLayout.cs
@@ -1,4 +1,5 @@
using System;
+using System.ComponentModel;
using Xamarin.Forms.Internals;
namespace Xamarin.Forms
diff --git a/Xamarin.Forms.Core/Stepper.cs b/Xamarin.Forms.Core/Stepper.cs
index f9742cc..67f4b8e 100644
--- a/Xamarin.Forms.Core/Stepper.cs
+++ b/Xamarin.Forms.Core/Stepper.cs
@@ -1,4 +1,5 @@
using System;
+using Xamarin.Forms.Internals;
using Xamarin.Forms.Platform;
namespace Xamarin.Forms
diff --git a/Xamarin.Forms.Core/Style.cs b/Xamarin.Forms.Core/Style.cs
index 8d27f01..52b4d38 100644
--- a/Xamarin.Forms.Core/Style.cs
+++ b/Xamarin.Forms.Core/Style.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Reflection;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
diff --git a/Xamarin.Forms.Core/TableModel.cs b/Xamarin.Forms.Core/TableModel.cs
index e570b22..db33000 100644
--- a/Xamarin.Forms.Core/TableModel.cs
+++ b/Xamarin.Forms.Core/TableModel.cs
@@ -1,9 +1,12 @@
using System;
+using System.ComponentModel;
+using Xamarin.Forms.Internals;
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal abstract class TableModel: ITableModel
+ public abstract class TableModel: ITableModel
{
+ [EditorBrowsable(EditorBrowsableState.Never)]
public virtual Cell GetCell(int section, int row)
{
object item = GetItem(section, row);
@@ -14,36 +17,46 @@ namespace Xamarin.Forms
return new TextCell { Text = item.ToString() };
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public virtual Cell GetHeaderCell(int section)
{
return null;
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public abstract object GetItem(int section, int row);
+ [EditorBrowsable(EditorBrowsableState.Never)]
public abstract int GetRowCount(int section);
+ [EditorBrowsable(EditorBrowsableState.Never)]
public abstract int GetSectionCount();
+ [EditorBrowsable(EditorBrowsableState.Never)]
public virtual string[] GetSectionIndexTitles()
{
return null;
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public virtual string GetSectionTitle(int section)
{
return null;
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public event EventHandler<EventArg<object>> ItemLongPressed;
+ [EditorBrowsable(EditorBrowsableState.Never)]
public event EventHandler<EventArg<object>> ItemSelected;
+ [EditorBrowsable(EditorBrowsableState.Never)]
public void RowLongPressed(int section, int row)
{
RowLongPressed(GetItem(section, row));
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public void RowLongPressed(object item)
{
if (ItemLongPressed != null)
@@ -52,11 +65,13 @@ namespace Xamarin.Forms
OnRowLongPressed(item);
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public void RowSelected(int section, int row)
{
RowSelected(GetItem(section, row));
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public void RowSelected(object item)
{
if (ItemSelected != null)
diff --git a/Xamarin.Forms.Core/TableSection.cs b/Xamarin.Forms.Core/TableSection.cs
index 9ae7caf..b3d1b2a 100644
--- a/Xamarin.Forms.Core/TableSection.cs
+++ b/Xamarin.Forms.Core/TableSection.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
diff --git a/Xamarin.Forms.Core/TableView.cs b/Xamarin.Forms.Core/TableView.cs
index b6c6680..d0b925a 100644
--- a/Xamarin.Forms.Core/TableView.cs
+++ b/Xamarin.Forms.Core/TableView.cs
@@ -80,7 +80,8 @@ namespace Xamarin.Forms
set { SetValue(RowHeightProperty, value); }
}
- internal TableModel Model
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public TableModel Model
{
get { return _model; }
set
diff --git a/Xamarin.Forms.Core/TapGestureRecognizer.cs b/Xamarin.Forms.Core/TapGestureRecognizer.cs
index 8449f10..c5216d6 100644
--- a/Xamarin.Forms.Core/TapGestureRecognizer.cs
+++ b/Xamarin.Forms.Core/TapGestureRecognizer.cs
@@ -1,4 +1,5 @@
using System;
+using System.ComponentModel;
using System.Windows.Input;
namespace Xamarin.Forms
@@ -35,7 +36,8 @@ namespace Xamarin.Forms
public event EventHandler Tapped;
- internal void SendTapped(View sender)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendTapped(View sender)
{
ICommand cmd = Command;
if (cmd != null && cmd.CanExecute(CommandParameter))
diff --git a/Xamarin.Forms.Core/TemplatedItemsList.cs b/Xamarin.Forms.Core/TemplatedItemsList.cs
index a954939..e132d04 100644
--- a/Xamarin.Forms.Core/TemplatedItemsList.cs
+++ b/Xamarin.Forms.Core/TemplatedItemsList.cs
@@ -8,15 +8,17 @@ using System.Threading.Tasks;
using Cadenza.Collections;
using Xamarin.Forms.Internals;
-namespace Xamarin.Forms
+namespace Xamarin.Forms.Internals
{
- internal sealed class TemplatedItemsList<TView, TItem> : BindableObject, ITemplatedItemsList<TItem>, IList, IDisposable
+ public sealed class TemplatedItemsList<TView, TItem> : BindableObject, ITemplatedItemsList<TItem>, IList, IDisposable
where TView : BindableObject, IItemsView<TItem>
where TItem : BindableObject
{
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty NameProperty = BindableProperty.Create("Name", typeof(string), typeof(TemplatedItemsList<TView, TItem>), null);
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty ShortNameProperty = BindableProperty.Create("ShortName", typeof(string), typeof(TemplatedItemsList<TView, TItem>), null);
static readonly BindablePropertyKey HeaderContentPropertyKey = BindableProperty.CreateReadOnly("HeaderContent", typeof(TItem), typeof(TemplatedItemsList<TView, TItem>), null);
@@ -94,6 +96,7 @@ namespace Xamarin.Forms
remove { PropertyChanged -= value; }
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public BindingBase GroupDisplayBinding
{
get { return _groupDisplayBinding; }
@@ -104,6 +107,7 @@ namespace Xamarin.Forms
}
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public DataTemplate GroupHeaderTemplate
{
get
@@ -125,8 +129,10 @@ namespace Xamarin.Forms
}
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public BindableProperty GroupHeaderTemplateProperty { get; set; }
+ [EditorBrowsable(EditorBrowsableState.Never)]
public BindingBase GroupShortNameBinding
{
get { return _groupShortNameBinding; }
@@ -137,40 +143,49 @@ namespace Xamarin.Forms
}
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public TItem HeaderContent
{
get { return (TItem)GetValue(HeaderContentPropertyKey.BindableProperty); }
private set { SetValue(HeaderContentPropertyKey, value); }
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public bool IsGroupingEnabled
{
get { return (IsGroupingEnabledProperty != null) && (bool)_itemsView.GetValue(IsGroupingEnabledProperty); }
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public BindableProperty IsGroupingEnabledProperty { get; set; }
+ [EditorBrowsable(EditorBrowsableState.Never)]
public IEnumerable ItemsSource
{
get { return ListProxy.ProxiedEnumerable; }
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public string Name
{
get { return (string)GetValue(NameProperty); }
set { SetValue(NameProperty, value); }
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public TemplatedItemsList<TView, TItem> Parent { get; }
+ [EditorBrowsable(EditorBrowsableState.Never)]
public BindableProperty ProgressiveLoadingProperty { get; set; }
+ [EditorBrowsable(EditorBrowsableState.Never)]
public string ShortName
{
get { return (string)GetValue(ShortNameProperty); }
set { SetValue(ShortNameProperty, value); }
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public IReadOnlyList<string> ShortNames
{
get { return _shortNames; }
@@ -324,18 +339,22 @@ namespace Xamarin.Forms
throw new NotSupportedException();
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public event NotifyCollectionChangedEventHandler CollectionChanged;
+ [EditorBrowsable(EditorBrowsableState.Never)]
public int Count
{
get { return ListProxy.Count; }
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public TItem this[int index]
{
get { return GetOrCreateContent(index, ListProxy[index]); }
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public int GetDescendantCount()
{
if (!IsGroupingEnabled)
@@ -351,6 +370,7 @@ namespace Xamarin.Forms
return count;
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public int GetGlobalIndexForGroup(ITemplatedItemsList<TItem> group)
{
if (group == null)
@@ -365,6 +385,7 @@ namespace Xamarin.Forms
return index;
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public int GetGlobalIndexOfGroup(object item)
{
var count = 0;
@@ -381,6 +402,7 @@ namespace Xamarin.Forms
return -1;
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public int GetGlobalIndexOfItem(object item)
{
if (!IsGroupingEnabled)
@@ -404,6 +426,7 @@ namespace Xamarin.Forms
return -1;
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public int GetGlobalIndexOfItem(object group, object item)
{
if (!IsGroupingEnabled)
@@ -430,6 +453,7 @@ namespace Xamarin.Forms
return -1;
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public Tuple<int, int> GetGroupAndIndexOfItem(object item)
{
if (item == null)
@@ -453,6 +477,7 @@ namespace Xamarin.Forms
return new Tuple<int, int>(-1, -1);
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public Tuple<int, int> GetGroupAndIndexOfItem(object group, object item)
{
if (!IsGroupingEnabled)
@@ -481,6 +506,7 @@ namespace Xamarin.Forms
return new Tuple<int, int>(-1, -1);
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public int GetGroupIndexFromGlobal(int globalIndex, out int leftOver)
{
leftOver = 0;
@@ -506,6 +532,7 @@ namespace Xamarin.Forms
return -1;
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public event NotifyCollectionChangedEventHandler GroupedCollectionChanged;
event NotifyCollectionChangedEventHandler ITemplatedItemsList<TItem>.GroupedCollectionChanged
{
@@ -513,6 +540,7 @@ namespace Xamarin.Forms
remove { GroupedCollectionChanged -= value; }
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public int IndexOf(TItem item)
{
TemplatedItemsList<TView, TItem> group = GetGroup(item);
@@ -522,7 +550,8 @@ namespace Xamarin.Forms
return GetIndex(item);
}
- internal TItem CreateContent(int index, object item, bool insert = false)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public TItem CreateContent(int index, object item, bool insert = false)
{
TItem content = ItemTemplate != null ? (TItem)ItemTemplate.CreateContent(item, _itemsView) : _itemsView.CreateDefault(item);
diff --git a/Xamarin.Forms.Core/TypedBinding.cs b/Xamarin.Forms.Core/TypedBinding.cs
index c98b39d..27adf95 100644
--- a/Xamarin.Forms.Core/TypedBinding.cs
+++ b/Xamarin.Forms.Core/TypedBinding.cs
@@ -4,6 +4,7 @@ using System;
using System.ComponentModel;
using System.Globalization;
using System.Collections.Generic;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Internals
{
@@ -200,7 +201,7 @@ namespace Xamarin.Forms.Internals
Log.Warning("Binding", "{0} can not be converted to type '{1}'", value, property.ReturnType);
return;
}
- target.SetValueCore(property, value, BindableObject.SetValueFlags.ClearDynamicResource, BindableObject.SetValuePrivateFlags.Default | BindableObject.SetValuePrivateFlags.Converted);
+ target.SetValueCore(property, value, SetValueFlags.ClearDynamicResource, BindableObject.SetValuePrivateFlags.Default | BindableObject.SetValuePrivateFlags.Converted);
return;
}
diff --git a/Xamarin.Forms.Core/UriImageSource.cs b/Xamarin.Forms.Core/UriImageSource.cs
index 8055116..7d1a9eb 100644
--- a/Xamarin.Forms.Core/UriImageSource.cs
+++ b/Xamarin.Forms.Core/UriImageSource.cs
@@ -1,9 +1,11 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
@@ -64,7 +66,8 @@ namespace Xamarin.Forms
set { SetValue(UriProperty, value); }
}
- internal async Task<Stream> GetStreamAsync(CancellationToken userToken = default(CancellationToken))
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public async Task<Stream> GetStreamAsync(CancellationToken userToken = default(CancellationToken))
{
OnLoadingStarted();
userToken.Register(CancellationTokenSource.Cancel);
diff --git a/Xamarin.Forms.Core/UrlWebViewSource.cs b/Xamarin.Forms.Core/UrlWebViewSource.cs
index 12a0e40..c7932a8 100644
--- a/Xamarin.Forms.Core/UrlWebViewSource.cs
+++ b/Xamarin.Forms.Core/UrlWebViewSource.cs
@@ -1,3 +1,5 @@
+using System.ComponentModel;
+
namespace Xamarin.Forms
{
public class UrlWebViewSource : WebViewSource
@@ -11,7 +13,8 @@ namespace Xamarin.Forms
set { SetValue(UrlProperty, value); }
}
- internal override void Load(IWebViewDelegate renderer)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override void Load(IWebViewDelegate renderer)
{
renderer.LoadUrl(Url);
}
diff --git a/Xamarin.Forms.Core/VisualElement.cs b/Xamarin.Forms.Core/VisualElement.cs
index 352e254..476a057 100644
--- a/Xamarin.Forms.Core/VisualElement.cs
+++ b/Xamarin.Forms.Core/VisualElement.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using Xamarin.Forms.Internals;
namespace Xamarin.Forms
@@ -86,7 +87,8 @@ namespace Xamarin.Forms
public static readonly BindableProperty MinimumHeightRequestProperty = BindableProperty.Create("MinimumHeightRequest", typeof(double), typeof(VisualElement), -1d, propertyChanged: OnRequestChanged);
- internal static readonly BindablePropertyKey IsFocusedPropertyKey = BindableProperty.CreateReadOnly("IsFocused", typeof(bool), typeof(VisualElement), default(bool),
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindablePropertyKey IsFocusedPropertyKey = BindableProperty.CreateReadOnly("IsFocused", typeof(bool), typeof(VisualElement), default(bool),
propertyChanged: OnIsFocusedPropertyChanged);
public static readonly BindableProperty IsFocusedProperty = IsFocusedPropertyKey.BindableProperty;
@@ -296,7 +298,8 @@ namespace Xamarin.Forms
private set { SetValue(YPropertyKey, value); }
}
- internal bool Batched
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool Batched
{
get { return _batched > 0; }
}
@@ -322,9 +325,11 @@ namespace Xamarin.Forms
get { return ComputedConstraint | SelfConstraint; }
}
- internal bool DisableLayout { get; set; }
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool DisableLayout { get; set; }
- internal bool IsInNativeLayout
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool IsInNativeLayout
{
get
{
@@ -345,7 +350,8 @@ namespace Xamarin.Forms
set { _isInNativeLayout = value; }
}
- internal bool IsNativeStateConsistent
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool IsNativeStateConsistent
{
get { return _isNativeStateConsistent; }
set
@@ -358,7 +364,8 @@ namespace Xamarin.Forms
}
}
- internal bool IsPlatformEnabled
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool IsPlatformEnabled
{
get { return _isPlatformEnabled; }
set
@@ -374,7 +381,8 @@ namespace Xamarin.Forms
}
}
- internal NavigationProxy NavigationProxy
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public NavigationProxy NavigationProxy
{
get { return Navigation as NavigationProxy; }
}
@@ -629,7 +637,8 @@ namespace Xamarin.Forms
OnSizeAllocated(width, height);
}
- internal event EventHandler<EventArg<VisualElement>> BatchCommitted;
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler<EventArg<VisualElement>> BatchCommitted;
internal void ComputeConstrainsForChildren()
{
@@ -646,8 +655,14 @@ namespace Xamarin.Forms
view.ComputedConstraint = LayoutConstraint.None;
}
- internal event EventHandler<FocusRequestArgs> FocusChangeRequested;
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler<FocusRequestArgs> FocusChangeRequested;
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void InvalidateMeasureNonVirtual(InvalidationTrigger trigger)
+ {
+ InvalidateMeasureInternal(trigger);
+ }
internal virtual void InvalidateMeasureInternal(InvalidationTrigger trigger)
{
_measureCache.Clear();
@@ -775,7 +790,7 @@ namespace Xamarin.Forms
SizeChanged(this, EventArgs.Empty);
}
- internal class FocusRequestArgs : EventArgs
+ public class FocusRequestArgs : EventArgs
{
public bool Focus { get; set; }
diff --git a/Xamarin.Forms.Core/WebView.cs b/Xamarin.Forms.Core/WebView.cs
index b366bb4..bba8430 100644
--- a/Xamarin.Forms.Core/WebView.cs
+++ b/Xamarin.Forms.Core/WebView.cs
@@ -5,7 +5,7 @@ using Xamarin.Forms.Platform;
namespace Xamarin.Forms
{
[RenderWith(typeof(_WebViewRenderer))]
- public class WebView : View, IElementConfiguration<WebView>
+ public class WebView : View, IWebViewController, IElementConfiguration<WebView>
{
public static readonly BindableProperty SourceProperty = BindableProperty.Create("Source", typeof(WebViewSource), typeof(WebView), default(WebViewSource),
propertyChanging: (bindable, oldvalue, newvalue) =>
@@ -39,16 +39,24 @@ namespace Xamarin.Forms
_platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<WebView>>(() => new PlatformConfigurationRegistry<WebView>(this));
}
+ bool IWebViewController.CanGoBack {
+ get { return CanGoBack; }
+ set { SetValue(CanGoBackPropertyKey, value); }
+ }
+
public bool CanGoBack
{
get { return (bool)GetValue(CanGoBackProperty); }
- internal set { SetValue(CanGoBackPropertyKey, value); }
+ }
+
+ bool IWebViewController.CanGoForward {
+ get { return CanGoForward; }
+ set { SetValue(CanGoForwardPropertyKey, value); }
}
public bool CanGoForward
{
get { return (bool)GetValue(CanGoForwardProperty); }
- internal set { SetValue(CanGoForwardPropertyKey, value); }
}
[TypeConverter(typeof(WebViewSourceTypeConverter))]
@@ -110,24 +118,35 @@ namespace Xamarin.Forms
OnPropertyChanged(SourceProperty.PropertyName);
}
- internal event EventHandler<EvalRequested> EvalRequested;
+ event EventHandler<EvalRequested> IWebViewController.EvalRequested {
+ add { EvalRequested += value; }
+ remove { EvalRequested -= value; }
+ }
+
+ event EventHandler<EvalRequested> EvalRequested;
- internal event EventHandler GoBackRequested;
+ event EventHandler IWebViewController.GoBackRequested {
+ add { GoBackRequested += value; }
+ remove { GoBackRequested -= value; }
+ }
+
+ event EventHandler GoBackRequested;
+
+ event EventHandler IWebViewController.GoForwardRequested {
+ add { GoForwardRequested += value; }
+ remove { GoForwardRequested -= value; }
+ }
- internal event EventHandler GoForwardRequested;
+ event EventHandler GoForwardRequested;
- internal void SendNavigated(WebNavigatedEventArgs args)
+ void IWebViewController.SendNavigated(WebNavigatedEventArgs args)
{
- EventHandler<WebNavigatedEventArgs> handler = Navigated;
- if (handler != null)
- handler(this, args);
+ Navigated?.Invoke(this, args);
}
- internal void SendNavigating(WebNavigatingEventArgs args)
+ void IWebViewController.SendNavigating(WebNavigatingEventArgs args)
{
- EventHandler<WebNavigatingEventArgs> handler = Navigating;
- if (handler != null)
- handler(this, args);
+ Navigating?.Invoke(this, args);
}
public IPlatformElementConfiguration<T, WebView> On<T>() where T : IConfigPlatform
diff --git a/Xamarin.Forms.Core/WebViewSource.cs b/Xamarin.Forms.Core/WebViewSource.cs
index 7b4c1bf..1e89bf7 100644
--- a/Xamarin.Forms.Core/WebViewSource.cs
+++ b/Xamarin.Forms.Core/WebViewSource.cs
@@ -1,4 +1,5 @@
using System;
+using System.ComponentModel;
namespace Xamarin.Forms
{
@@ -21,7 +22,8 @@ namespace Xamarin.Forms
eh(this, EventArgs.Empty);
}
- internal abstract void Load(IWebViewDelegate renderer);
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public abstract void Load(IWebViewDelegate renderer);
internal event EventHandler SourceChanged;
}
diff --git a/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj b/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj
index 5436be5..5d9cc1c 100644
--- a/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj
+++ b/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj
@@ -88,8 +88,13 @@
<Compile Include="DateChangedEventArgs.cs" />
<Compile Include="DelegateLogListener.cs" />
<Compile Include="IEditorController.cs" />
+ <Compile Include="IGridController.cs" />
+ <Compile Include="IWebViewController.cs" />
+ <Compile Include="INavigationMenuController.cs" />
<Compile Include="Internals\EffectUtilities.cs" />
<Compile Include="EnumerableExtensions.cs" />
+ <Compile Include="IMultiPageController.cs" />
+ <Compile Include="LockableObservableListWrapper.cs" />
<Compile Include="PlatformConfiguration\AndroidSpecific\AppCompat\Application.cs" />
<Compile Include="PlatformConfiguration\AndroidSpecific\Application.cs" />
<Compile Include="PlatformConfiguration\AndroidSpecific\TabbedPage.cs" />
@@ -466,7 +471,5 @@
</PostBuildEvent>
</PropertyGroup>
<ItemGroup />
- <ItemGroup>
- <Folder Include="PlatformConfiguration\macOSSpecific\" />
- </ItemGroup>
-</Project>
+ <ItemGroup />
+</Project> \ No newline at end of file
diff --git a/Xamarin.Forms.Core/XmlnsDefinitionAttribute.cs b/Xamarin.Forms.Core/XmlnsDefinitionAttribute.cs
index 4178dc9..a8b5164 100644
--- a/Xamarin.Forms.Core/XmlnsDefinitionAttribute.cs
+++ b/Xamarin.Forms.Core/XmlnsDefinitionAttribute.cs
@@ -1,6 +1,7 @@
using System;
using System.Diagnostics;
+
namespace Xamarin.Forms.Internals
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]