I am still having some problem to change the opacity of e_ink annotations. I
refer to the code of SelectionHelper class, and find that it is
"pdftron.PDF.Tools.Properties.
Settings.Default.MarkupOpacity =
value" that change the opacity of e_Ink annotation, which will change
the opacity of all annotations.
And then I try to change the opacity of the e_ink annotations like this:
var CurrentAnno = page.GetAnnot(i);
mMarkup = new pdftron.PDF.Annots.Markup(CurrentAnno);
mMarkup.SetOpacity(0.5);
page.AnnotRemove(CurrentAnno);
page.AnnotPushBack(mMarkup);
_pdfviewWpf.Update(mMarkup,page.GetIndex());
----------------------------------------------------------------------------------------------
A:
When you are done making changes to the properties of the annotation, you should call mMarkup.RefreshAppearance().
So to change the opacity of a markup annotation the minimal code is the following.
wpfviewer.DocLock(); // write lock
Page page = wpfviewer.GetDoc().GetPage(page_num);
var CurrentAnno = page.GetAnnot(i);
var mMarkup = new pdftron.PDF.Annots.Markup(CurrentAnno);
mMarkup.SetOpacity(0.5);
mMarkup.RefreshAppearance();
wpfviewer.DocUnlock();
wpfviewer.Update(mMarkup, page_num);