summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Core')
-rw-r--r--Xamarin.Forms.Core/Application.cs3
-rw-r--r--Xamarin.Forms.Core/Button.cs10
-rw-r--r--Xamarin.Forms.Core/Cells/Cell.cs18
-rw-r--r--Xamarin.Forms.Core/Cells/EntryCell.cs4
-rw-r--r--Xamarin.Forms.Core/Editor.cs4
-rw-r--r--Xamarin.Forms.Core/Element.cs16
-rw-r--r--Xamarin.Forms.Core/Entry.cs4
-rw-r--r--Xamarin.Forms.Core/Image.cs4
-rw-r--r--Xamarin.Forms.Core/Layout.cs6
-rw-r--r--Xamarin.Forms.Core/ListView.cs56
-rw-r--r--Xamarin.Forms.Core/MasterDetailPage.cs44
-rw-r--r--Xamarin.Forms.Core/MenuItem.cs6
-rw-r--r--Xamarin.Forms.Core/MultiPage.cs2
-rw-r--r--Xamarin.Forms.Core/NavigationMenu.cs3
-rw-r--r--Xamarin.Forms.Core/NavigationPage.cs118
-rw-r--r--Xamarin.Forms.Core/OpenGLView.cs10
-rw-r--r--Xamarin.Forms.Core/Page.cs53
-rw-r--r--Xamarin.Forms.Core/PanGestureRecognizer.cs13
-rw-r--r--Xamarin.Forms.Core/PinchGestureRecognizer.cs24
-rw-r--r--Xamarin.Forms.Core/ScrollView.cs19
-rw-r--r--Xamarin.Forms.Core/SearchBar.cs4
-rw-r--r--Xamarin.Forms.Core/TableView.cs13
-rw-r--r--Xamarin.Forms.Core/TemplatedPage.cs2
-rw-r--r--Xamarin.Forms.Core/VisualElement.cs3
-rw-r--r--Xamarin.Forms.Core/WebView.cs34
25 files changed, 234 insertions, 239 deletions
diff --git a/Xamarin.Forms.Core/Application.cs b/Xamarin.Forms.Core/Application.cs
index 38333bf7..5df8ad6c 100644
--- a/Xamarin.Forms.Core/Application.cs
+++ b/Xamarin.Forms.Core/Application.cs
@@ -123,7 +123,8 @@ namespace Xamarin.Forms
ObservableCollection<Element> InternalChildren { get; } = new ObservableCollection<Element>();
- void IApplicationController.SetAppIndexingProvider(IAppIndexingProvider provider)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetAppIndexingProvider(IAppIndexingProvider provider)
{
_appIndexProvider = provider;
}
diff --git a/Xamarin.Forms.Core/Button.cs b/Xamarin.Forms.Core/Button.cs
index 3b943f1b..f2c4fa6b 100644
--- a/Xamarin.Forms.Core/Button.cs
+++ b/Xamarin.Forms.Core/Button.cs
@@ -1,4 +1,5 @@
using System;
+using System.ComponentModel;
using System.Diagnostics;
using System.Windows.Input;
using Xamarin.Forms.Internals;
@@ -109,18 +110,21 @@ namespace Xamarin.Forms
set { SetValueCore(IsEnabledProperty, value); }
}
- void IButtonController.SendClicked()
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendClicked()
{
Command?.Execute(CommandParameter);
Clicked?.Invoke(this, EventArgs.Empty);
}
- void IButtonController.SendPressed()
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendPressed()
{
Pressed?.Invoke(this, EventArgs.Empty);
}
- void IButtonController.SendReleased()
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendReleased()
{
Released?.Invoke(this, EventArgs.Empty);
}
diff --git a/Xamarin.Forms.Core/Cells/Cell.cs b/Xamarin.Forms.Core/Cells/Cell.cs
index d434b564..6e088219 100644
--- a/Xamarin.Forms.Core/Cells/Cell.cs
+++ b/Xamarin.Forms.Core/Cells/Cell.cs
@@ -79,12 +79,8 @@ namespace Xamarin.Forms
public event EventHandler Disappearing;
- event EventHandler ForceUpdateSizeRequested;
- event EventHandler ICellController.ForceUpdateSizeRequested
- {
- add { ForceUpdateSizeRequested += value; }
- remove { ForceUpdateSizeRequested -= value; }
- }
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler ForceUpdateSizeRequested;
public void ForceUpdateSize()
{
@@ -156,20 +152,22 @@ namespace Xamarin.Forms
base.OnPropertyChanging(propertyName);
}
- void ICellController.SendAppearing()
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendAppearing()
{
OnAppearing();
- var container = RealParent as IListViewController;
+ var container = RealParent as ListView;
if (container != null)
container.SendCellAppearing(this);
}
- void ICellController.SendDisappearing()
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendDisappearing()
{
OnDisappearing();
- var container = RealParent as IListViewController;
+ var container = RealParent as ListView;
if (container != null)
container.SendCellDisappearing(this);
}
diff --git a/Xamarin.Forms.Core/Cells/EntryCell.cs b/Xamarin.Forms.Core/Cells/EntryCell.cs
index 2ec8730a..c325bf2d 100644
--- a/Xamarin.Forms.Core/Cells/EntryCell.cs
+++ b/Xamarin.Forms.Core/Cells/EntryCell.cs
@@ -1,4 +1,5 @@
using System;
+using System.ComponentModel;
namespace Xamarin.Forms
{
@@ -65,7 +66,8 @@ namespace Xamarin.Forms
public event EventHandler Completed;
- void IEntryCellController.SendCompleted()
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendCompleted()
{
EventHandler handler = Completed;
if (handler != null)
diff --git a/Xamarin.Forms.Core/Editor.cs b/Xamarin.Forms.Core/Editor.cs
index 16a97f61..a689c05e 100644
--- a/Xamarin.Forms.Core/Editor.cs
+++ b/Xamarin.Forms.Core/Editor.cs
@@ -1,4 +1,5 @@
using System;
+using System.ComponentModel;
using Xamarin.Forms.Internals;
using Xamarin.Forms.Platform;
@@ -88,7 +89,8 @@ namespace Xamarin.Forms
return _platformConfigurationRegistry.Value.On<T>();
}
- void IEditorController.SendCompleted()
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendCompleted()
{
EventHandler handler = Completed;
if (handler != null)
diff --git a/Xamarin.Forms.Core/Element.cs b/Xamarin.Forms.Core/Element.cs
index 1989f78a..0f64e7a5 100644
--- a/Xamarin.Forms.Core/Element.cs
+++ b/Xamarin.Forms.Core/Element.cs
@@ -109,7 +109,8 @@ namespace Xamarin.Forms
internal virtual ReadOnlyCollection<Element> LogicalChildrenInternal => EmptyChildren;
- ReadOnlyCollection<Element> IElementController.LogicalChildren => LogicalChildrenInternal;
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public ReadOnlyCollection<Element> LogicalChildren => LogicalChildrenInternal;
internal bool Owned { get; set; }
@@ -222,7 +223,8 @@ namespace Xamarin.Forms
_changeHandlers.Remove(onchanged);
}
- IEffectControlProvider IElementController.EffectControlProvider
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public IEffectControlProvider EffectControlProvider
{
get { return _effectControlProvider; }
set
@@ -246,17 +248,21 @@ namespace Xamarin.Forms
}
}
- void IElementController.SetValueFromRenderer(BindableProperty property, object value)
+ void IElementController.SetValueFromRenderer(BindableProperty property, object value) => SetValueFromRenderer(property, value);
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetValueFromRenderer(BindableProperty property, object value)
{
SetValueCore(property, value);
}
- void IElementController.SetValueFromRenderer(BindablePropertyKey property, object value)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetValueFromRenderer(BindablePropertyKey property, object value)
{
SetValueCore(property, value);
}
- bool IElementController.EffectIsAttached(string name)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool EffectIsAttached(string name)
{
foreach (var effect in Effects)
{
diff --git a/Xamarin.Forms.Core/Entry.cs b/Xamarin.Forms.Core/Entry.cs
index 63ba5f10..46cd7740 100644
--- a/Xamarin.Forms.Core/Entry.cs
+++ b/Xamarin.Forms.Core/Entry.cs
@@ -1,4 +1,5 @@
using System;
+using System.ComponentModel;
using Xamarin.Forms.Internals;
using Xamarin.Forms.Platform;
@@ -110,7 +111,8 @@ namespace Xamarin.Forms
public event EventHandler<TextChangedEventArgs> TextChanged;
- void IEntryController.SendCompleted()
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendCompleted()
{
Completed?.Invoke(this, EventArgs.Empty);
}
diff --git a/Xamarin.Forms.Core/Image.cs b/Xamarin.Forms.Core/Image.cs
index ca4c706e..1dcbe1c7 100644
--- a/Xamarin.Forms.Core/Image.cs
+++ b/Xamarin.Forms.Core/Image.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Reflection;
using Xamarin.Forms.Internals;
using Xamarin.Forms.Platform;
@@ -160,7 +161,8 @@ namespace Xamarin.Forms
}
}
- void IImageController.SetIsLoading(bool isLoading)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetIsLoading(bool isLoading)
{
SetValue(IsLoadingPropertyKey, isLoading);
}
diff --git a/Xamarin.Forms.Core/Layout.cs b/Xamarin.Forms.Core/Layout.cs
index 01049911..ac5e48b3 100644
--- a/Xamarin.Forms.Core/Layout.cs
+++ b/Xamarin.Forms.Core/Layout.cs
@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
+using System.ComponentModel;
using System.Linq;
using Xamarin.Forms.Internals;
@@ -17,7 +18,7 @@ namespace Xamarin.Forms
_children = new ElementCollection<T>(InternalChildren);
}
- public IList<T> Children
+ public new IList<T> Children
{
get { return _children; }
}
@@ -98,7 +99,8 @@ namespace Xamarin.Forms
public event EventHandler LayoutChanged;
- IReadOnlyList<Element> ILayoutController.Children
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public IReadOnlyList<Element> Children
{
get { return InternalChildren; }
}
diff --git a/Xamarin.Forms.Core/ListView.cs b/Xamarin.Forms.Core/ListView.cs
index d280387b..28a64363 100644
--- a/Xamarin.Forms.Core/ListView.cs
+++ b/Xamarin.Forms.Core/ListView.cs
@@ -214,15 +214,9 @@ namespace Xamarin.Forms
[EditorBrowsable(EditorBrowsableState.Never)]
public ListViewCachingStrategy CachingStrategy { get; private set; }
- ListViewCachingStrategy IListViewController.CachingStrategy
- {
- get
- {
- return CachingStrategy;
- }
- }
- bool RefreshAllowed
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool RefreshAllowed
{
set
{
@@ -235,36 +229,36 @@ namespace Xamarin.Forms
get { return _refreshAllowed; }
}
- Element IListViewController.FooterElement
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Element FooterElement
{
get { return _footerElement; }
}
- Element IListViewController.HeaderElement
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Element HeaderElement
{
get { return _headerElement; }
}
- bool IListViewController.RefreshAllowed
- {
- get { return RefreshAllowed; }
- }
-
- void IListViewController.SendCellAppearing(Cell cell)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendCellAppearing(Cell cell)
{
EventHandler<ItemVisibilityEventArgs> handler = ItemAppearing;
if (handler != null)
handler(this, new ItemVisibilityEventArgs(cell.BindingContext));
}
- void IListViewController.SendCellDisappearing(Cell cell)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendCellDisappearing(Cell cell)
{
EventHandler<ItemVisibilityEventArgs> handler = ItemDisappearing;
if (handler != null)
handler(this, new ItemVisibilityEventArgs(cell.BindingContext));
}
- void IListViewController.SendRefreshing()
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendRefreshing()
{
BeginRefresh();
}
@@ -371,12 +365,14 @@ namespace Xamarin.Forms
content.Parent = null;
}
- Cell IListViewController.CreateDefaultCell(object item)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Cell CreateDefaultCell(object item)
{
return CreateDefault(item);
}
- string IListViewController.GetDisplayTextFromGroup(object cell)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public string GetDisplayTextFromGroup(object cell)
{
int groupIndex = TemplatedItems.GetGlobalIndexOfGroup(cell);
var group = TemplatedItems.GetGroup(groupIndex);
@@ -394,7 +390,8 @@ namespace Xamarin.Forms
return displayBinding;
}
- internal void NotifyRowTapped(int groupIndex, int inGroupIndex, Cell cell = null)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void NotifyRowTapped(int groupIndex, int inGroupIndex, Cell cell = null)
{
var group = TemplatedItems.GetGroup(groupIndex);
@@ -415,7 +412,8 @@ namespace Xamarin.Forms
ItemTapped?.Invoke(this, new ItemTappedEventArgs(ItemsSource.Cast<object>().ElementAt(groupIndex), cell.BindingContext));
}
- internal void NotifyRowTapped(int index, Cell cell = null)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void NotifyRowTapped(int index, Cell cell = null)
{
if (IsGroupingEnabled)
{
@@ -428,16 +426,6 @@ namespace Xamarin.Forms
NotifyRowTapped(0, index, cell);
}
- void IListViewController.NotifyRowTapped(int index, Cell cell)
- {
- NotifyRowTapped(index, cell);
- }
-
- void IListViewController.NotifyRowTapped(int index, int inGroupIndex, Cell cell)
- {
- NotifyRowTapped(index, inGroupIndex, cell);
- }
-
internal override void OnIsPlatformEnabledChanged()
{
base.OnIsPlatformEnabledChanged();
@@ -449,8 +437,8 @@ namespace Xamarin.Forms
}
}
- internal event EventHandler<ScrollToRequestedEventArgs> ScrollToRequested;
- event EventHandler<ScrollToRequestedEventArgs> IListViewController.ScrollToRequested { add { ScrollToRequested += value; } remove { ScrollToRequested -= value; } }
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler<ScrollToRequestedEventArgs> ScrollToRequested;
void OnCommandCanExecuteChanged(object sender, EventArgs eventArgs)
{
diff --git a/Xamarin.Forms.Core/MasterDetailPage.cs b/Xamarin.Forms.Core/MasterDetailPage.cs
index 4fe1c49d..b628a427 100644
--- a/Xamarin.Forms.Core/MasterDetailPage.cs
+++ b/Xamarin.Forms.Core/MasterDetailPage.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using Xamarin.Forms.Internals;
using Xamarin.Forms.Platform;
@@ -24,8 +25,6 @@ namespace Xamarin.Forms
Rectangle _masterBounds;
- IPageController PageController => this as IPageController;
-
public Page Detail
{
get { return _detail; }
@@ -42,9 +41,9 @@ namespace Xamarin.Forms
OnPropertyChanging();
if (_detail != null)
- PageController.InternalChildren.Remove(_detail);
+ InternalChildren.Remove(_detail);
_detail = value;
- PageController.InternalChildren.Add(_detail);
+ InternalChildren.Add(_detail);
OnPropertyChanged();
}
}
@@ -80,9 +79,9 @@ namespace Xamarin.Forms
OnPropertyChanging();
if (_master != null)
- PageController.InternalChildren.Remove(_master);
+ InternalChildren.Remove(_master);
_master = value;
- PageController.InternalChildren.Add(_master);
+ InternalChildren.Add(_master);
OnPropertyChanged();
}
}
@@ -93,9 +92,11 @@ namespace Xamarin.Forms
set { SetValue(MasterBehaviorProperty, value); }
}
- bool IMasterDetailPageController.CanChangeIsPresented { get; set; } = true;
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool CanChangeIsPresented { get; set; } = true;
- Rectangle IMasterDetailPageController.DetailBounds
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Rectangle DetailBounds
{
get { return _detailBounds; }
set
@@ -107,7 +108,8 @@ namespace Xamarin.Forms
}
}
- Rectangle IMasterDetailPageController.MasterBounds
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Rectangle MasterBounds
{
get { return _masterBounds; }
set
@@ -119,7 +121,8 @@ namespace Xamarin.Forms
}
}
- bool IMasterDetailPageController.ShouldShowSplitMode
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool ShouldShowSplitMode
{
get
{
@@ -160,7 +163,7 @@ namespace Xamarin.Forms
protected override void OnAppearing()
{
- ((IMasterDetailPageController)this).CanChangeIsPresented = true;
+ CanChangeIsPresented = true;
UpdateMasterBehavior(this);
base.OnAppearing();
}
@@ -173,7 +176,7 @@ namespace Xamarin.Forms
return true;
}
- EventHandler<BackButtonPressedEventArgs> handler = BackButtonPressedInternal;
+ EventHandler<BackButtonPressedEventArgs> handler = BackButtonPressed;
if (handler != null)
{
var args = new BackButtonPressedEventArgs();
@@ -197,25 +200,22 @@ namespace Xamarin.Forms
base.OnParentSet();
}
- event EventHandler<BackButtonPressedEventArgs> BackButtonPressedInternal;
- event EventHandler<BackButtonPressedEventArgs> IMasterDetailPageController.BackButtonPressed
- {
- add { BackButtonPressedInternal += value; }
- remove { BackButtonPressedInternal -= value; }
- }
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler<BackButtonPressedEventArgs> BackButtonPressed;
- void IMasterDetailPageController.UpdateMasterBehavior()
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void UpdateMasterBehavior()
{
UpdateMasterBehavior(this);
}
internal static void UpdateMasterBehavior(MasterDetailPage page)
{
- if (((IMasterDetailPageController)page).ShouldShowSplitMode)
+ if (page.ShouldShowSplitMode)
{
page.SetValueCore(IsPresentedProperty, true);
if (page.MasterBehavior != MasterBehavior.Default)
- ((IMasterDetailPageController)page).CanChangeIsPresented = false;
+ page.CanChangeIsPresented = false;
}
}
@@ -230,7 +230,7 @@ namespace Xamarin.Forms
static void OnIsPresentedPropertyChanging(BindableObject sender, object oldValue, object newValue)
{
var page = (MasterDetailPage)sender;
- if (!((IMasterDetailPageController)page).CanChangeIsPresented)
+ if (!page.CanChangeIsPresented)
throw new InvalidOperationException(string.Format("Can't change IsPresented when setting {0}", page.MasterBehavior));
}
diff --git a/Xamarin.Forms.Core/MenuItem.cs b/Xamarin.Forms.Core/MenuItem.cs
index 329acab3..e8b52c64 100644
--- a/Xamarin.Forms.Core/MenuItem.cs
+++ b/Xamarin.Forms.Core/MenuItem.cs
@@ -21,7 +21,8 @@ namespace Xamarin.Forms
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty IsEnabledProperty = BindableProperty.Create("IsEnabled", typeof(bool), typeof(ToolbarItem), true);
- string IMenuItemController.IsEnabledPropertyName
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public string IsEnabledPropertyName
{
get
{
@@ -80,7 +81,8 @@ namespace Xamarin.Forms
handler(this, EventArgs.Empty);
}
- void IMenuItemController.Activate()
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void Activate()
{
if (Command != null)
{
diff --git a/Xamarin.Forms.Core/MultiPage.cs b/Xamarin.Forms.Core/MultiPage.cs
index 765f779f..2578c196 100644
--- a/Xamarin.Forms.Core/MultiPage.cs
+++ b/Xamarin.Forms.Core/MultiPage.cs
@@ -26,8 +26,6 @@ namespace Xamarin.Forms
T _current;
- ObservableCollection<Element> InternalChildren => ((IPageController)this).InternalChildren;
-
protected MultiPage()
{
_templatedItems = new TemplatedItemsList<MultiPage<T>, T>(this, ItemsSourceProperty, ItemTemplateProperty);
diff --git a/Xamarin.Forms.Core/NavigationMenu.cs b/Xamarin.Forms.Core/NavigationMenu.cs
index 771e0a7f..5be803ce 100644
--- a/Xamarin.Forms.Core/NavigationMenu.cs
+++ b/Xamarin.Forms.Core/NavigationMenu.cs
@@ -66,7 +66,8 @@ namespace Xamarin.Forms.Internals
return _platformConfigurationRegistry.Value.On<T>();
}
- void INavigationMenuController.SendTargetSelected(Page target)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendTargetSelected(Page target)
{
Navigation.PushAsync(target);
}
diff --git a/Xamarin.Forms.Core/NavigationPage.cs b/Xamarin.Forms.Core/NavigationPage.cs
index ba88cf57..f20a617a 100644
--- a/Xamarin.Forms.Core/NavigationPage.cs
+++ b/Xamarin.Forms.Core/NavigationPage.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
+using System.ComponentModel;
using System.Linq;
using System.Threading.Tasks;
using Xamarin.Forms.Internals;
@@ -65,30 +66,31 @@ namespace Xamarin.Forms
internal Task CurrentNavigationTask { get; set; }
- Page INavigationPageController.Peek(int depth)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Page Peek(int depth)
{
if (depth < 0)
{
return null;
}
- if (PageController.InternalChildren.Count <= depth)
+ if (InternalChildren.Count <= depth)
{
return null;
}
- return (Page)PageController.InternalChildren[PageController.InternalChildren.Count - depth - 1];
+ return (Page)InternalChildren[InternalChildren.Count - depth - 1];
}
- IEnumerable<Page> INavigationPageController.Pages => PageController.InternalChildren.Cast<Page>();
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public IEnumerable<Page> Pages => InternalChildren.Cast<Page>();
- int INavigationPageController.StackDepth
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public int StackDepth
{
- get { return PageController.InternalChildren.Count; }
+ get { return InternalChildren.Count; }
}
- IPageController PageController => this as IPageController;
-
public Page CurrentPage
{
get { return (Page)GetValue(CurrentPageProperty); }
@@ -137,12 +139,12 @@ namespace Xamarin.Forms
CurrentNavigationTask = tcs.Task;
await oldTask;
- Page page = await ((INavigationPageController)this).PopAsyncInner(animated);
+ Page page = await PopAsyncInner(animated, false);
tcs.SetResult(true);
return page;
}
- Task<Page> result = ((INavigationPageController)this).PopAsyncInner(animated);
+ Task<Page> result = PopAsyncInner(animated, false);
CurrentNavigationTask = result;
return await result;
}
@@ -227,7 +229,7 @@ namespace Xamarin.Forms
if (CurrentPage.SendBackButtonPressed())
return true;
- if (((INavigationPageController)this).StackDepth > 1)
+ if (StackDepth > 1)
{
SafePop();
return true;
@@ -236,28 +238,24 @@ namespace Xamarin.Forms
return base.OnBackButtonPressed();
}
- event EventHandler<NavigationRequestedEventArgs> InsertPageBeforeRequestedInternal;
-
- event EventHandler<NavigationRequestedEventArgs> INavigationPageController.InsertPageBeforeRequested
- {
- add { InsertPageBeforeRequestedInternal += value; }
- remove { InsertPageBeforeRequestedInternal -= value; }
- }
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler<NavigationRequestedEventArgs> InsertPageBeforeRequested;
- async Task<Page> INavigationPageController.PopAsyncInner(bool animated, bool fast)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public async Task<Page> PopAsyncInner(bool animated, bool fast)
{
- if (((INavigationPageController)this).StackDepth == 1)
+ if (StackDepth == 1)
{
return null;
}
- var page = (Page)PageController.InternalChildren.Last();
+ var page = (Page)InternalChildren.Last();
var args = new NavigationRequestedEventArgs(page, animated);
var removed = true;
- EventHandler<NavigationRequestedEventArgs> requestPop = PopRequestedInternal;
+ EventHandler<NavigationRequestedEventArgs> requestPop = PopRequested;
if (requestPop != null)
{
requestPop(this, args);
@@ -269,9 +267,9 @@ namespace Xamarin.Forms
if (!removed && !fast)
return CurrentPage;
- PageController.InternalChildren.Remove(page);
+ InternalChildren.Remove(page);
- CurrentPage = (Page)PageController.InternalChildren.Last();
+ CurrentPage = (Page)InternalChildren.Last();
if (Popped != null)
Popped(this, args);
@@ -279,37 +277,17 @@ namespace Xamarin.Forms
return page;
}
- event EventHandler<NavigationRequestedEventArgs> PopRequestedInternal;
-
- event EventHandler<NavigationRequestedEventArgs> INavigationPageController.PopRequested
- {
- add { PopRequestedInternal += value; }
- remove { PopRequestedInternal -= value; }
- }
-
- event EventHandler<NavigationRequestedEventArgs> PopToRootRequestedInternal;
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler<NavigationRequestedEventArgs> PopRequested;
- event EventHandler<NavigationRequestedEventArgs> INavigationPageController.PopToRootRequested
- {
- add { PopToRootRequestedInternal += value; }
- remove { PopToRootRequestedInternal -= value; }
- }
-
- event EventHandler<NavigationRequestedEventArgs> PushRequestedInternal;
-
- event EventHandler<NavigationRequestedEventArgs> INavigationPageController.PushRequested
- {
- add { PushRequestedInternal += value; }
- remove { PushRequestedInternal -= value; }
- }
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler<NavigationRequestedEventArgs> PopToRootRequested;
- event EventHandler<NavigationRequestedEventArgs> RemovePageRequestedInternal;
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler<NavigationRequestedEventArgs> PushRequested;
- event EventHandler<NavigationRequestedEventArgs> INavigationPageController.RemovePageRequested
- {
- add { RemovePageRequestedInternal += value; }
- remove { RemovePageRequestedInternal -= value; }
- }
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler<NavigationRequestedEventArgs> RemovePageRequested;
void InsertPageBefore(Page page, Page before)
{
@@ -319,17 +297,17 @@ namespace Xamarin.Forms
if (before == null)
throw new ArgumentNullException($"{nameof(before)} cannot be null.");
- if (!PageController.InternalChildren.Contains(before))
+ if (!InternalChildren.Contains(before))
throw new ArgumentException($"{nameof(before)} must be a child of the NavigationPage", nameof(before));
- if (PageController.InternalChildren.Contains(page))
+ if (InternalChildren.Contains(page))
throw new ArgumentException("Cannot insert page which is already in the navigation stack");
- EventHandler<NavigationRequestedEventArgs> handler = InsertPageBeforeRequestedInternal;
+ EventHandler<NavigationRequestedEventArgs> handler = InsertPageBeforeRequested;
handler?.Invoke(this, new NavigationRequestedEventArgs(page, before, false));
- int index = PageController.InternalChildren.IndexOf(before);
- PageController.InternalChildren.Insert(index, page);
+ int index = InternalChildren.IndexOf(before);
+ InternalChildren.Insert(index, page);
if (index == 0)
RootPage = page;
@@ -341,18 +319,18 @@ namespace Xamarin.Forms
async Task PopToRootAsyncInner(bool animated)
{
- if (((INavigationPageController)this).StackDepth == 1)
+ if (StackDepth == 1)
return;
- Element[] childrenToRemove = PageController.InternalChildren.Skip(1).ToArray();
+ Element[] childrenToRemove = InternalChildren.Skip(1).ToArray();
foreach (Element child in childrenToRemove)
- PageController.InternalChildren.Remove(child);
+ InternalChildren.Remove(child);
CurrentPage = RootPage;
var args = new NavigationRequestedEventArgs(RootPage, animated);
- EventHandler<NavigationRequestedEventArgs> requestPopToRoot = PopToRootRequestedInternal;
+ EventHandler<NavigationRequestedEventArgs> requestPopToRoot = PopToRootRequested;
if (requestPopToRoot != null)
{
requestPopToRoot(this, args);
@@ -366,14 +344,14 @@ namespace Xamarin.Forms
async Task PushAsyncInner(Page page, bool animated)
{
- if (PageController.InternalChildren.Contains(page))
+ if (InternalChildren.Contains(page))
return;
PushPage(page);
var args = new NavigationRequestedEventArgs(page, animated);
- EventHandler<NavigationRequestedEventArgs> requestPush = PushRequestedInternal;
+ EventHandler<NavigationRequestedEventArgs> requestPush = PushRequested;
if (requestPush != null)
{
requestPush(this, args);
@@ -387,9 +365,9 @@ namespace Xamarin.Forms
void PushPage(Page page)
{
- PageController.InternalChildren.Add(page);
+ InternalChildren.Add(page);
- if (PageController.InternalChildren.Count == 1)
+ if (InternalChildren.Count == 1)
RootPage = page;
CurrentPage = page;
@@ -409,15 +387,15 @@ namespace Xamarin.Forms
return;
}
- if (!PageController.InternalChildren.Contains(page))
+ if (!InternalChildren.Contains(page))
throw new ArgumentException("Page to remove must be contained on this Navigation Page");
- EventHandler<NavigationRequestedEventArgs> handler = RemovePageRequestedInternal;
+ EventHandler<NavigationRequestedEventArgs> handler = RemovePageRequested;
handler?.Invoke(this, new NavigationRequestedEventArgs(page, true));
- PageController.InternalChildren.Remove(page);
+ InternalChildren.Remove(page);
if (RootPage == page)
- RootPage = (Page)PageController.InternalChildren.First();
+ RootPage = (Page)InternalChildren.First();
}
void SafePop()
@@ -436,7 +414,7 @@ namespace Xamarin.Forms
public NavigationImpl(NavigationPage owner)
{
Owner = owner;
- _castingList = new Lazy<ReadOnlyCastingList<Page, Element>>(() => new ReadOnlyCastingList<Page, Element>(((IPageController)Owner).InternalChildren));
+ _castingList = new Lazy<ReadOnlyCastingList<Page, Element>>(() => new ReadOnlyCastingList<Page, Element>(Owner.InternalChildren));
}
NavigationPage Owner { get; }
diff --git a/Xamarin.Forms.Core/OpenGLView.cs b/Xamarin.Forms.Core/OpenGLView.cs
index 39e49a90..fc2bec8b 100644
--- a/Xamarin.Forms.Core/OpenGLView.cs
+++ b/Xamarin.Forms.Core/OpenGLView.cs
@@ -1,4 +1,5 @@
using System;
+using System.ComponentModel;
using Xamarin.Forms.Platform;
namespace Xamarin.Forms
@@ -22,12 +23,6 @@ namespace Xamarin.Forms
public Action<Rectangle> OnDisplay { get; set; }
- event EventHandler IOpenGlViewController.DisplayRequested
- {
- add { DisplayRequested += value; }
- remove { DisplayRequested -= value; }
- }
-
public void Display()
{
EventHandler handler = DisplayRequested;
@@ -35,7 +30,8 @@ namespace Xamarin.Forms
handler(this, EventArgs.Empty);
}
- event EventHandler DisplayRequested;
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler DisplayRequested;
public OpenGLView()
{
diff --git a/Xamarin.Forms.Core/Page.cs b/Xamarin.Forms.Core/Page.cs
index 01dc600a..09fa11e8 100644
--- a/Xamarin.Forms.Core/Page.cs
+++ b/Xamarin.Forms.Core/Page.cs
@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
+using System.ComponentModel;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
@@ -46,15 +47,12 @@ namespace Xamarin.Forms
ReadOnlyCollection<Element> _logicalChildren;
- IPageController PageController => this as IPageController;
- IElementController ElementController => this as IElementController;
-
public Page()
{
var toolbarItems = new ObservableCollection<ToolbarItem>();
toolbarItems.CollectionChanged += OnToolbarItemsCollectionChanged;
ToolbarItems = toolbarItems;
- PageController.InternalChildren.CollectionChanged += InternalChildrenOnCollectionChanged;
+ InternalChildren.CollectionChanged += InternalChildrenOnCollectionChanged;
_platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<Page>>(() => new PlatformConfigurationRegistry<Page>(this));
}
@@ -90,7 +88,8 @@ namespace Xamarin.Forms
public IList<ToolbarItem> ToolbarItems { get; internal set; }
- Rectangle IPageController.ContainerArea
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Rectangle ContainerArea
{
get { return _containerArea; }
set
@@ -103,16 +102,18 @@ namespace Xamarin.Forms
}
}
- bool IPageController.IgnoresContainerArea
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool IgnoresContainerArea
{
get { return (bool)GetValue(IgnoresContainerAreaProperty); }
set { SetValue(IgnoresContainerAreaProperty, value); }
}
- ObservableCollection<Element> IPageController.InternalChildren { get; } = new ObservableCollection<Element>();
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public ObservableCollection<Element> InternalChildren { get; } = new ObservableCollection<Element>();
internal override ReadOnlyCollection<Element> LogicalChildrenInternal =>
- _logicalChildren ?? (_logicalChildren = new ReadOnlyCollection<Element>(PageController.InternalChildren));
+ _logicalChildren ?? (_logicalChildren = new ReadOnlyCollection<Element>(InternalChildren));
public event EventHandler LayoutChanged;
@@ -158,7 +159,7 @@ namespace Xamarin.Forms
Rectangle originalArea = area;
if (_containerAreaSet)
{
- area = PageController.ContainerArea;
+ area = ContainerArea;
area.X += Padding.Left;
area.Y += Padding.Right;
area.Width -= Padding.HorizontalThickness;
@@ -167,14 +168,14 @@ namespace Xamarin.Forms
area.Height = Math.Max(0, area.Height);
}
- List<Element> elements = ElementController.LogicalChildren.ToList();
+ List<Element> elements = LogicalChildren.ToList();
foreach (Element element in elements)
{
var child = element as VisualElement;
if (child == null)
continue;
var page = child as Page;
- if (page != null && ((IPageController)page).IgnoresContainerArea)
+ if (page != null && page.IgnoresContainerArea)
Forms.Layout.LayoutChildIntoBoundingRegion(child, originalArea);
else
Forms.Layout.LayoutChildIntoBoundingRegion(child, area);
@@ -238,8 +239,8 @@ namespace Xamarin.Forms
if (!ShouldLayoutChildren())
return;
- var startingLayout = new List<Rectangle>(ElementController.LogicalChildren.Count);
- foreach (VisualElement c in ElementController.LogicalChildren)
+ var startingLayout = new List<Rectangle>(LogicalChildren.Count);
+ foreach (VisualElement c in LogicalChildren)
{
startingLayout.Add(c.Bounds);
}
@@ -251,9 +252,9 @@ namespace Xamarin.Forms
LayoutChildren(x, y, w, h);
- for (var i = 0; i < ElementController.LogicalChildren.Count; i++)
+ for (var i = 0; i < LogicalChildren.Count; i++)
{
- var c = (VisualElement)ElementController.LogicalChildren[i];
+ var c = (VisualElement)LogicalChildren[i];
if (c.Bounds != startingLayout[i])
{
@@ -276,9 +277,9 @@ namespace Xamarin.Forms
}
else
{
- for (var i = 0; i < ElementController.LogicalChildren.Count; i++)
+ for (var i = 0; i < LogicalChildren.Count; i++)
{
- var v = ElementController.LogicalChildren[i] as VisualElement;
+ var v = LogicalChildren[i] as VisualElement;
if (v != null && v.IsVisible && (!v.IsPlatformEnabled || !v.IsNativeStateConsistent))
return;
}
@@ -292,7 +293,8 @@ namespace Xamarin.Forms
}
}
- void IPageController.SendAppearing()
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendAppearing()
{
if (_hasAppeared)
return;
@@ -308,10 +310,11 @@ namespace Xamarin.Forms
handler(this, EventArgs.Empty);
var pageContainer = this as IPageContainer<Page>;
- ((IPageController)pageContainer?.CurrentPage)?.SendAppearing();
+ pageContainer?.CurrentPage?.SendAppearing();
}
- void IPageController.SendDisappearing()
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendDisappearing()
{
if (!_hasAppeared)
return;
@@ -322,7 +325,7 @@ namespace Xamarin.Forms
MessagingCenter.Send(this, BusySetSignalName, false);
var pageContainer = this as IPageContainer<Page>;
- ((IPageController)pageContainer?.CurrentPage)?.SendDisappearing();
+ pageContainer?.CurrentPage?.SendDisappearing();
OnDisappearing();
EventHandler handler = Disappearing;
@@ -378,21 +381,21 @@ namespace Xamarin.Forms
bool ShouldLayoutChildren()
{
- if (!ElementController.LogicalChildren.Any() || Width <= 0 || Height <= 0 || !IsNativeStateConsistent)
+ if (!LogicalChildren.Any() || Width <= 0 || Height <= 0 || !IsNativeStateConsistent)
return false;
var container = this as IPageContainer<Page>;
if (container?.CurrentPage != null)
{
- if (PageController.InternalChildren.Contains(container.CurrentPage))
+ if (InternalChildren.Contains(container.CurrentPage))
return container.CurrentPage.IsPlatformEnabled && container.CurrentPage.IsNativeStateConsistent;
return true;
}
var any = false;
- for (var i = 0; i < ElementController.LogicalChildren.Count; i++)
+ for (var i = 0; i < LogicalChildren.Count; i++)
{
- var v = ElementController.LogicalChildren[i] as VisualElement;
+ var v = LogicalChildren[i] as VisualElement;
if (v != null && (!v.IsPlatformEnabled || !v.IsNativeStateConsistent))
{
any = true;
diff --git a/Xamarin.Forms.Core/PanGestureRecognizer.cs b/Xamarin.Forms.Core/PanGestureRecognizer.cs
index 0a3a3fa5..45e6a9c0 100644
--- a/Xamarin.Forms.Core/PanGestureRecognizer.cs
+++ b/Xamarin.Forms.Core/PanGestureRecognizer.cs
@@ -1,4 +1,5 @@
using System;
+using System.ComponentModel;
using Xamarin.Forms.Internals;
namespace Xamarin.Forms
@@ -13,22 +14,26 @@ namespace Xamarin.Forms
set { SetValue(TouchPointsProperty, value); }
}
- void IPanGestureController.SendPan(Element sender, double totalX, double totalY, int gestureId)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendPan(Element sender, double totalX, double totalY, int gestureId)
{
PanUpdated?.Invoke(sender, new PanUpdatedEventArgs(GestureStatus.Running, gestureId, totalX, totalY));
}
- void IPanGestureController.SendPanCanceled(Element sender, int gestureId)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendPanCanceled(Element sender, int gestureId)
{
PanUpdated?.Invoke(sender, new PanUpdatedEventArgs(GestureStatus.Canceled, gestureId));
}
- void IPanGestureController.SendPanCompleted(Element sender, int gestureId)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendPanCompleted(Element sender, int gestureId)
{
PanUpdated?.Invoke(sender, new PanUpdatedEventArgs(GestureStatus.Completed, gestureId));
}
- void IPanGestureController.SendPanStarted(Element sender, int gestureId)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendPanStarted(Element sender, int gestureId)
{
PanUpdated?.Invoke(sender, new PanUpdatedEventArgs(GestureStatus.Started, gestureId));
}
diff --git a/Xamarin.Forms.Core/PinchGestureRecognizer.cs b/Xamarin.Forms.Core/PinchGestureRecognizer.cs
index 30a8d232..b3b79900 100644
--- a/Xamarin.Forms.Core/PinchGestureRecognizer.cs
+++ b/Xamarin.Forms.Core/PinchGestureRecognizer.cs
@@ -1,50 +1,56 @@
using System;
+using System.ComponentModel;
using Xamarin.Forms.Internals;
namespace Xamarin.Forms
{
public sealed class PinchGestureRecognizer : GestureRecognizer, IPinchGestureController
{
- bool IPinchGestureController.IsPinching { get; set; }
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool IsPinching { get; set; }
- void IPinchGestureController.SendPinch(Element sender, double delta, Point currentScalePoint)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendPinch(Element sender, double delta, Point currentScalePoint)
{
EventHandler<PinchGestureUpdatedEventArgs> handler = PinchUpdated;
if (handler != null)
{
handler(sender, new PinchGestureUpdatedEventArgs(GestureStatus.Running, delta, currentScalePoint));
}
- ((IPinchGestureController)this).IsPinching = true;
+ IsPinching = true;
}
- void IPinchGestureController.SendPinchCanceled(Element sender)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendPinchCanceled(Element sender)
{
EventHandler<PinchGestureUpdatedEventArgs> handler = PinchUpdated;
if (handler != null)
{
handler(sender, new PinchGestureUpdatedEventArgs(GestureStatus.Canceled));
}
- ((IPinchGestureController)this).IsPinching = false;
+ IsPinching = false;
}
- void IPinchGestureController.SendPinchEnded(Element sender)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendPinchEnded(Element sender)
{
EventHandler<PinchGestureUpdatedEventArgs> handler = PinchUpdated;
if (handler != null)
{
handler(sender, new PinchGestureUpdatedEventArgs(GestureStatus.Completed));
}
- ((IPinchGestureController)this).IsPinching = false;
+ IsPinching = false;
}
- void IPinchGestureController.SendPinchStarted(Element sender, Point initialScalePoint)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendPinchStarted(Element sender, Point initialScalePoint)
{
EventHandler<PinchGestureUpdatedEventArgs> handler = PinchUpdated;
if (handler != null)
{
handler(sender, new PinchGestureUpdatedEventArgs(GestureStatus.Started, 1, initialScalePoint));
}
- ((IPinchGestureController)this).IsPinching = true;
+ IsPinching = true;
}
public event EventHandler<PinchGestureUpdatedEventArgs> PinchUpdated;
diff --git a/Xamarin.Forms.Core/ScrollView.cs b/Xamarin.Forms.Core/ScrollView.cs
index e77731d2..ababa403 100644
--- a/Xamarin.Forms.Core/ScrollView.cs
+++ b/Xamarin.Forms.Core/ScrollView.cs
@@ -1,4 +1,5 @@
using System;
+using System.ComponentModel;
using System.Threading.Tasks;
using Xamarin.Forms.Internals;
using Xamarin.Forms.Platform;
@@ -76,7 +77,8 @@ namespace Xamarin.Forms
_platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<ScrollView>>(() => new PlatformConfigurationRegistry<ScrollView>(this));
}
- Point IScrollViewController.GetScrollPositionForElement(VisualElement item, ScrollToPosition pos)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Point GetScrollPositionForElement(VisualElement item, ScrollToPosition pos)
{
ScrollToPosition position = pos;
double y = GetCoordinate(item, "Y", 0);
@@ -114,19 +116,15 @@ namespace Xamarin.Forms
return new Point(x, y);
}
- event EventHandler<ScrollToRequestedEventArgs> IScrollViewController.ScrollToRequested
- {
- add { ScrollToRequested += value; }
- remove { ScrollToRequested -= value; }
- }
-
- void IScrollViewController.SendScrollFinished()
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendScrollFinished()
{
if (_scrollCompletionSource != null)
_scrollCompletionSource.TrySetResult(true);
}
- void IScrollViewController.SetScrolledPosition(double x, double y)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetScrolledPosition(double x, double y)
{
if (ScrollX == x && ScrollY == y)
return;
@@ -295,6 +293,7 @@ namespace Xamarin.Forms
handler(this, e);
}
- event EventHandler<ScrollToRequestedEventArgs> ScrollToRequested;
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler<ScrollToRequestedEventArgs> ScrollToRequested;
}
} \ No newline at end of file
diff --git a/Xamarin.Forms.Core/SearchBar.cs b/Xamarin.Forms.Core/SearchBar.cs
index 3d83686c..92e9291d 100644
--- a/Xamarin.Forms.Core/SearchBar.cs
+++ b/Xamarin.Forms.Core/SearchBar.cs
@@ -1,4 +1,5 @@
using System;
+using System.ComponentModel;
using System.Windows.Input;
using Xamarin.Forms.Internals;
using Xamarin.Forms.Platform;
@@ -139,7 +140,8 @@ namespace Xamarin.Forms
_platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<SearchBar>>(() => new PlatformConfigurationRegistry<SearchBar>(this));
}
- void ISearchBarController.OnSearchButtonPressed()
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void OnSearchButtonPressed()
{
ICommand cmd = SearchCommand;
diff --git a/Xamarin.Forms.Core/TableView.cs b/Xamarin.Forms.Core/TableView.cs
index be1c0b8e..6a803274 100644
--- a/Xamarin.Forms.Core/TableView.cs
+++ b/Xamarin.Forms.Core/TableView.cs
@@ -90,9 +90,10 @@ namespace Xamarin.Forms
OnModelChanged();
}
}
- ITableModel ITableViewController.Model
+
+ ITableModel ITableViewController.Model
{
- get
+ get
{
return Model;
}
@@ -124,12 +125,8 @@ namespace Xamarin.Forms
return new SizeRequest(request, minimumSize);
}
- internal event EventHandler ModelChanged;
- event EventHandler ITableViewController.ModelChanged
- {
- add { ModelChanged += value; }
- remove { ModelChanged -= value; }
- }
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler ModelChanged;
public IPlatformElementConfiguration<T, TableView> On<T>() where T : IConfigPlatform
{
diff --git a/Xamarin.Forms.Core/TemplatedPage.cs b/Xamarin.Forms.Core/TemplatedPage.cs
index aa811510..69c2d58b 100644
--- a/Xamarin.Forms.Core/TemplatedPage.cs
+++ b/Xamarin.Forms.Core/TemplatedPage.cs
@@ -13,7 +13,7 @@ namespace Xamarin.Forms
set { SetValue(ControlTemplateProperty, value); }
}
- IList<Element> IControlTemplated.InternalChildren => ((IPageController)this).InternalChildren;
+ IList<Element> IControlTemplated.InternalChildren => InternalChildren;
internal override void ComputeConstraintForView(View view)
{
diff --git a/Xamarin.Forms.Core/VisualElement.cs b/Xamarin.Forms.Core/VisualElement.cs
index bf9b1e32..8aba78ac 100644
--- a/Xamarin.Forms.Core/VisualElement.cs
+++ b/Xamarin.Forms.Core/VisualElement.cs
@@ -434,7 +434,8 @@ namespace Xamarin.Forms
}
}
- void IVisualElementController.NativeSizeChanged()
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void NativeSizeChanged()
{
InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged);
}
diff --git a/Xamarin.Forms.Core/WebView.cs b/Xamarin.Forms.Core/WebView.cs
index bba84306..0e65e842 100644
--- a/Xamarin.Forms.Core/WebView.cs
+++ b/Xamarin.Forms.Core/WebView.cs
@@ -1,4 +1,5 @@
using System;
+using System.ComponentModel;
using Xamarin.Forms.Internals;
using Xamarin.Forms.Platform;
@@ -39,7 +40,9 @@ namespace Xamarin.Forms
_platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<WebView>>(() => new PlatformConfigurationRegistry<WebView>(this));
}
- bool IWebViewController.CanGoBack {
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ bool IWebViewController.CanGoBack
+ {
get { return CanGoBack; }
set { SetValue(CanGoBackPropertyKey, value); }
}
@@ -49,7 +52,9 @@ namespace Xamarin.Forms
get { return (bool)GetValue(CanGoBackProperty); }
}
- bool IWebViewController.CanGoForward {
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ bool IWebViewController.CanGoForward
+ {
get { return CanGoForward; }
set { SetValue(CanGoForwardPropertyKey, value); }
}
@@ -123,28 +128,23 @@ namespace Xamarin.Forms
remove { EvalRequested -= value; }
}
- event EventHandler<EvalRequested> EvalRequested;
-
- event EventHandler IWebViewController.GoBackRequested {
- add { GoBackRequested += value; }
- remove { GoBackRequested -= value; }
- }
-
- event EventHandler GoBackRequested;
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler<EvalRequested> EvalRequested;
- event EventHandler IWebViewController.GoForwardRequested {
- add { GoForwardRequested += value; }
- remove { GoForwardRequested -= value; }
- }
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler GoBackRequested;
- event EventHandler GoForwardRequested;
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler GoForwardRequested;
- void IWebViewController.SendNavigated(WebNavigatedEventArgs args)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendNavigated(WebNavigatedEventArgs args)
{
Navigated?.Invoke(this, args);
}
- void IWebViewController.SendNavigating(WebNavigatingEventArgs args)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SendNavigating(WebNavigatingEventArgs args)
{
Navigating?.Invoke(this, args);
}