Recently I have come across a business need where I have to show strikethrough text in the Entry of Xamarin Forms. Now there is a Text decoration property for strikethrough in Label, But there is no such property that exists for Entry.
Now we have an entry like this,

But we need to show a strikethrough over sddad. There are some resources that say to use effects or Unicode’s strikethrough character set. But it does not fulfill our needs. Does anybody know how to implement this so that we can change the text to have a strikethrough via a property binding?
Any help will be greatly appreciated.
Whenever you want custom UI behaviour in Xamarin.Forms that is not exposed through the Forms API, you will need to go down to the platform level.
The strikethrough text can be achieved using any of:
CustomRenderer,Effect,Behaviour.Below is an example of a platform effect that will strikethrough the whole text:
Define An Effect
In your cross platform project create a new
RoutingEffect:Implement On iOS
Somewhere in your iOS project create a
PlatformEffectThis sample shows how you can cleanup the effect once it is no longer needed. The way attributed strings works on iOS would make is very easy to extend your strikethrough behaviour to target parts of the entry. Perhaps you only want to strikethrough specific words etc.
Implement On Android
Somewhere in your Android project create a
PlatformEffect:This implementation would require updating if you wanted to strikethrough specific areas of your
Entry.Consume The Effect
This example will be through xaml:
xmlns:effects="clr-namespace:StrikethroughEntry.Effects"Entry:Results
Now you have a lovely
Entrywith strikethrough text!