Xamarin.Forms.Plugins
Xamarin.Forms.Plugins copied to clipboard
I added replacement colors to SVG.
I wanted to note that if you check my fork, I added the start of replacement colors to SVG. Dont get too excited yet as I have not tested it on iOS(same code as Android) but it works so far on Android. I have not implemented it yet for windows as that code was different, its on my next TODO. I also added a new tab with a sample of it.
I hope its ok, I am new to these public Gits so I dont know what is right and what is wrong or acceptable.
The reason I needed this feature was we had Icons that needed their colors replaced depending on which os was being used. For instance Android could have a different background or text color depending on which version or theme(Light or Dark). Apple and Android both have switched their selected colors numerous times. So I wanted to be able to swap the colors out on the fly. There are plenty of enhancements that can be put in for selection colors and on and on.
I wanted to say thanks for the initial code set and work that everyone has put in! Brad
I added support for WinPhone.
Is there a way to use NGraphics for WinPhone instead of wrapping in XAML? It doesnt seem like it is far off for us to manually create it? I think I would like to go that route, ideas?
Brad
Tested under iOS, works under new update.
Brad
Hey Brad.
Thanks a lot for the work you have done. I will take a look at it over the weekend and try to merge it in.
On the whole Win Phone topic I did try to get that working but was having trouble with on device (was working fine in sim). I will give it another shot.
I have created a separate issue for that : https://github.com/paulpatarinski/Xamarin.Forms.Plugins/issues/57
Cheers Paul
Ohh sweet! Thats weird it worked fine in one and not the other. I have never targeted WinPhone so this will be the first, although I have used Silverlight plenty. On a side note, an easier way of doing the replacement might be to just manually replace in the svg string but I didnt know the format as to what is allowed 8 digit and 6 digit hex on the color, color names, case sensitivity, on and on. So I took the approach of doing it at the element level afterwards.
@paulpatarinski is there going to be any possibility to change the color in further updates?
any updates on this?