Entradas

Mostrando entradas de junio, 2018

Xamarin.Forms: Custom Context Actions on iOS

Imagen
Xamarin.Forms: Custom Context Actions on iOS
Hello folks now is time to talk about customize context action views on Xamarin.Forms cell for iOS (yes the red/light-gray options that appear when you swipe a cell) the default colors are not a good-looking, so right now is a little bit tricky to achieve that but we will use a reflection technique to achieve the next two escenarios: Change background color for default and destructive context actionSet custom view for default and destructive context action first at all, lets take a look to native impl. on Xamarin.Forms Github project on the next url
https://github.com/xamarin/Xamarin.Forms/blob/ae92582d5acad2b8aeab9a2ed5b490561e71bd6c/Xamarin.Forms.Platform.iOS/ContextActionCell.cs#L14

Here we have two key items "DestructiveBackground" and "NormalBackground" both are the Images  that Xamarin.Forms use to put as background on the default ContextActions view(Gray/Red)

Not bad but sometimes we need to put some love into the …