[assembly: ExportRenderer(typeof(Bugzilla52700.NoSelectionViewCell), typeof(NoSelectionViewCellRenderer))]
[assembly: ExportRenderer(typeof(Issue1683.EntryKeyboardFlags), typeof(EntryRendererKeyboardFlags))]
[assembly: ExportRenderer(typeof(Issue1683.EditorKeyboardFlags), typeof(EditorRendererKeyboardFlags))]
+[assembly: ExportRenderer(typeof(Issue5830.ExtendedEntryCell), typeof(ExtendedEntryCellRenderer))]
namespace Xamarin.Forms.ControlGallery.iOS
{
}
}
+ public class ExtendedEntryCellRenderer : EntryCellRenderer
+ {
+ public override UITableViewCell GetCell(Cell item, UITableViewCell reusableCell, UITableView tv)
+ {
+ var entryCell = (EntryCell)item;
+ var cell = base.GetCell(item, reusableCell, tv);
+ if (cell != null && entryCell != null)
+ {
+ var tvc = cell as EntryCellTableViewCell;
+ if (tvc != null)
+ {
+ // cell.TextField.thingstocallhere, for example:
+ tvc.TextField.Text = entryCell.Text;
+ tvc.TextField.TextColor = UIColor.Red;
+ }
+ }
+ return cell;
+ }
+ }
+
}
--- /dev/null
+using Xamarin.Forms.CustomAttributes;
+using Xamarin.Forms.Internals;
+using System.Linq;
+using System.Collections.ObjectModel;
+
+#if UITEST
+using Xamarin.Forms.Core.UITests;
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls.Issues
+{
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.Github, 5830, "[Enhancement] EntryCellTableViewCell should be public", PlatformAffected.iOS)]
+ public class Issue5830 : TestContentPage
+ {
+ const string Instructions = "On iOS, if the below Entry Cell displays 'Text from Custom Entry Cell' in 'Red' color, this test has passed.";
+ ListView lstView;
+
+ public class ExtendedEntryCell : EntryCell
+ {
+ public ExtendedEntryCell()
+ {
+ base.Text = "Text from Custom Entry Cell";
+ }
+ }
+
+ protected override void Init()
+ {
+ var label = new Label { Text = Instructions };
+ lstView = new ListView(ListViewCachingStrategy.RecycleElement)
+ {
+ ItemTemplate = new DataTemplate(typeof(ExtendedEntryCell)),
+ ItemsSource = new[] { "item1" }
+ };
+
+ Content = new StackLayout
+ {
+ Children = {
+ label,
+ lstView
+ }
+ };
+ }
+
+#if (UITEST && __IOS__)
+ [Test]
+ [Category(UITestCategories.ManualReview)]
+ public void Issue5830Test()
+ {
+ RunningApp.Screenshot("EntryTableViewCell Test with custom Text and TextColor");
+ }
+#endif
+ }
+}
\ No newline at end of file
<Compile Include="$(MSBuildThisFileDirectory)CollectionViewItemsUpdatingScrollMode.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue8186.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue3475.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue5830.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue6476.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue7396.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue7825.cs" />
cell.TextField.Text = entryCell.Text;
}
- class EntryCellTableViewCell : CellTableViewCell
+ public class EntryCellTableViewCell : CellTableViewCell
{
public EntryCellTableViewCell(string cellName) : base(UITableViewCellStyle.Value1, cellName)
{