Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Development and suggestions about third part tool integration.
Cordova, Xamarin, Basic4Android topics are listed here.

Change Annotation Color

More
IP: 93.34.225.185 7 years 8 months ago - 7 years 7 months ago #13972 by mfranc28
How can I change Annotation color in Xamarin?
I find Annotation.SetFillColor but want an integer....
If I check current color like this:
int foo = annot.FillColor;

it returns -1, and the box around sign box is filled with blue color
My goal is to erase the square around sign box on pdf if my variable is true or false, some kind of flatten annotation
Last edit: 7 years 7 months ago by mfranc28.
More
IP: 212.97.62.176 7 years 7 months ago #13975 by Davide
Replied by Davide on topic Change Annotation Color
Hi,
the colors must be formatted in that way 0xAARRGGBB as written here : www.radaeepdf.com/documentation/javadocs...ml#SetFillColor-int-
More
IP: 93.34.225.185 7 years 7 months ago #13978 by mfranc28
Replied by mfranc28 on topic Change Annotation Color
Ok I see but the method want an int input.....

For example if I want to colorize with #80FFFFFF how can I do?
More
IP: 212.97.62.176 7 years 7 months ago #13979 by Davide
Replied by Davide on topic Change Annotation Color
Hi,
try with 0x80FFFFFF
More
IP: 93.34.225.185 7 years 7 months ago - 7 years 7 months ago #13980 by mfranc28
Replied by mfranc28 on topic Change Annotation Color
Try with this

uint n = 0x00FFFFFF;
int color = unchecked((int)n);
annot.SetFillColor(color);

But nothing happen to annotation, try also changing with other color
Last edit: 7 years 7 months ago by mfranc28.
More
IP: 37.183.44.177 7 years 7 months ago #13983 by nermeen
Replied by nermeen on topic Change Annotation Color
To read the fill color:
Code:
uint fillColor = (uint) annot.FillColor;
To set it:
Code:
annot.SetFillColor(Convert.ToInt32("0x80FFFFFF", 16));
Remember to rerender the page after setting the color.
Time to create page: 0.379 seconds
Powered by Kunena Forum