Xamarin.Forms.Plugins icon indicating copy to clipboard operation
Xamarin.Forms.Plugins copied to clipboard

I added replacement colors to SVG.

Open BradChase2011 opened this issue 9 years ago • 6 comments

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

BradChase2011 avatar Sep 03 '15 13:09 BradChase2011

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

BradChase2011 avatar Sep 03 '15 20:09 BradChase2011

Tested under iOS, works under new update.

Brad

BradChase2011 avatar Sep 03 '15 20:09 BradChase2011

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

paulpatarinski avatar Sep 04 '15 13:09 paulpatarinski

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.

BradChase2011 avatar Sep 04 '15 15:09 BradChase2011

@paulpatarinski is there going to be any possibility to change the color in further updates?

RaZp29 avatar Jul 11 '17 14:07 RaZp29

any updates on this?

ChrisLang avatar Jul 16 '19 15:07 ChrisLang