--- /dev/null
+using System;
+using UIKit;
+using Xamarin.Forms;
+using Xamarin.Forms.ControlGallery.iOS.CustomRenderers;
+using Xamarin.Forms.Platform.iOS;
+
+// REMARK: Test renderer to validate that Virtual UpdateCancelButton works
+
+//[assembly: ExportRenderer(typeof(SearchBar), typeof(CustomSearchBarRenderer))]
+//namespace Xamarin.Forms.ControlGallery.iOS.CustomRenderers
+//{
+// public class CustomSearchBarRenderer : SearchBarRenderer
+// {
+// public override void UpdateCancelButton()
+// {
+// base.UpdateCancelButton();
+// Control.ShowsCancelButton = false;
+// }
+// }
+//}
\ No newline at end of file
<Compile Include="CustomRenderers\CustomRenderer.cs" />
<Compile Include="CustomRenderers\RoundedLabelRenderer.cs" />
<Compile Include="ApiLabelRenderer.cs" />
+ <Compile Include="CustomRenderers\CustomSearchBarRenderer.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Xamarin.Forms.Controls\Xamarin.Forms.Controls.csproj">
_textField.VerticalAlignment = Element.VerticalTextAlignment.ToNativeTextAlignment();
}
- void UpdateCancelButton()
+ public virtual void UpdateCancelButton()
{
Control.ShowsCancelButton = !string.IsNullOrEmpty(Control.Text);