summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/Cells
diff options
context:
space:
mode:
authorSamantha Houts <samantha@teamredwall.com>2016-06-17 03:10:18 -0700
committerRui Marinho <me@ruimarinho.net>2016-06-17 11:10:18 +0100
commit925fc0aa588a060eb23fa16c1d225dd030012c23 (patch)
tree83676c25c29d97d9250516b217020ba85425796d /Xamarin.Forms.Core/Cells
parentd44396a4534b1e2bc81143c809e4adaee656ab15 (diff)
downloadxamarin-forms-925fc0aa588a060eb23fa16c1d225dd030012c23.tar.gz
xamarin-forms-925fc0aa588a060eb23fa16c1d225dd030012c23.tar.bz2
xamarin-forms-925fc0aa588a060eb23fa16c1d225dd030012c23.zip
Prep Cell & friends for removal of InternalsVisibleTo (#142)
* Prep Cell & friends for removal of InternalsVisibleTo Includes: - Cell - EntryCell - ListView - MenuItem - TableView - ViewCell - Toolbar Moved extensions to Internal & removed TPH * Update docs * [Controls] Ignore Issue2411 on iOS <9 * [Controls] Formatting for Issue2411
Diffstat (limited to 'Xamarin.Forms.Core/Cells')
-rw-r--r--Xamarin.Forms.Core/Cells/Cell.cs15
-rw-r--r--Xamarin.Forms.Core/Cells/EntryCell.cs4
-rw-r--r--Xamarin.Forms.Core/Cells/ICellController.cs15
-rw-r--r--Xamarin.Forms.Core/Cells/IEntryCellController.cs8
4 files changed, 35 insertions, 7 deletions
diff --git a/Xamarin.Forms.Core/Cells/Cell.cs b/Xamarin.Forms.Core/Cells/Cell.cs
index 3b16d06a..863e0342 100644
--- a/Xamarin.Forms.Core/Cells/Cell.cs
+++ b/Xamarin.Forms.Core/Cells/Cell.cs
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace Xamarin.Forms
{
- public abstract class Cell : Element
+ public abstract class Cell : Element, ICellController
{
public static readonly BindableProperty IsEnabledProperty = BindableProperty.Create("IsEnabled", typeof(bool), typeof(Cell), true, propertyChanged: OnIsEnabledPropertyChanged);
@@ -78,6 +78,13 @@ namespace Xamarin.Forms
public event EventHandler Disappearing;
+ event EventHandler ForceUpdateSizeRequested;
+ event EventHandler ICellController.ForceUpdateSizeRequested
+ {
+ add { ForceUpdateSizeRequested += value; }
+ remove { ForceUpdateSizeRequested -= value; }
+ }
+
public void ForceUpdateSize()
{
if (_nextCallToForceUpdateSizeQueued)
@@ -148,9 +155,7 @@ namespace Xamarin.Forms
base.OnPropertyChanging(propertyName);
}
- internal event EventHandler ForceUpdateSizeRequested;
-
- internal void SendAppearing()
+ void ICellController.SendAppearing()
{
OnAppearing();
@@ -159,7 +164,7 @@ namespace Xamarin.Forms
container.SendCellAppearing(this);
}
- internal void SendDisappearing()
+ void ICellController.SendDisappearing()
{
OnDisappearing();
diff --git a/Xamarin.Forms.Core/Cells/EntryCell.cs b/Xamarin.Forms.Core/Cells/EntryCell.cs
index cccdcae1..b61f685f 100644
--- a/Xamarin.Forms.Core/Cells/EntryCell.cs
+++ b/Xamarin.Forms.Core/Cells/EntryCell.cs
@@ -2,7 +2,7 @@ using System;
namespace Xamarin.Forms
{
- public class EntryCell : Cell
+ public class EntryCell : Cell, IEntryCellController
{
public static readonly BindableProperty TextProperty = BindableProperty.Create("Text", typeof(string), typeof(EntryCell), null, BindingMode.TwoWay);
@@ -64,7 +64,7 @@ namespace Xamarin.Forms
public event EventHandler Completed;
- internal void SendCompleted()
+ void IEntryCellController.SendCompleted()
{
EventHandler handler = Completed;
if (handler != null)
diff --git a/Xamarin.Forms.Core/Cells/ICellController.cs b/Xamarin.Forms.Core/Cells/ICellController.cs
new file mode 100644
index 00000000..ab5d08c2
--- /dev/null
+++ b/Xamarin.Forms.Core/Cells/ICellController.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Xamarin.Forms
+{
+ public interface ICellController
+ {
+ event EventHandler ForceUpdateSizeRequested;
+
+ void SendAppearing();
+ void SendDisappearing();
+ }
+}
diff --git a/Xamarin.Forms.Core/Cells/IEntryCellController.cs b/Xamarin.Forms.Core/Cells/IEntryCellController.cs
new file mode 100644
index 00000000..b3722d67
--- /dev/null
+++ b/Xamarin.Forms.Core/Cells/IEntryCellController.cs
@@ -0,0 +1,8 @@
+
+namespace Xamarin.Forms
+{
+ public interface IEntryCellController
+ {
+ void SendCompleted();
+ }
+}