Code: Select all
pdfViewer.SetProperty("Notifications.Selection.Filter", -1, 0);
if (e.name.Equals("Notifications.Selection"))
{ AnnotIsSelected = true; }
Thanks for your replies!
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
Code: Select all
pdfViewer.SetProperty("Notifications.Selection.Filter", -1, 0);
if (e.name.Equals("Notifications.Selection"))
{ AnnotIsSelected = true; }
Code: Select all
pdfViewer.SetProperty("Notifications.Selection.Filter", -1, 0);
...
pdfViewer.SetSocumentProperty(justOpenedDocID, "GetSelMarkupsOnly", "true"); // to modify behavior of 'GetSelectedAnnot' feature to ignore all form fields (if needed)
...
...
eventhandler OnEvent(type, name, ...)
{
if ((type == PXCVA_OnNamedNotify) && (e.name.Equals("Notifications.Selection")))
{
AnnotIsSelected = false;
object docID = 0;
pdfViewer.GetProperty("Notifications.Selection.Document", out docID, 0);
if ((int)docID != 0)
{
object selectedAnnotPageAndIndexOnPage;
pdfViewer.DoDocumentVerb(docID, null, "GetSelectedAnnot", null, out selectedAnnotPageAndIndexOnPage, PXCVA_OutArgs);
PDFXCviewAxLib.IPDFXCargs outArgs = (PDFXCviewAxLib.IPDFXCargs)selectedAnnotPageAndIndexOnPage;
if ((outArgs.Count > 0) && (outArgs[0] >= 0))
AnnotIsSelected = true;
}
}
}
Code: Select all
PDFXCviewAxLib.IPDFXCargs outArgs = (PDFXCviewAxLib.IPDFXCargs)selectedAnnotPageAndIndexOnPage;
Code: Select all
if ((e.type == 4) && (e.name.Equals("Notifications.Selection")))
{
object docID;
pdfViewer.GetProperty("Notifications.Selection.Document", out docID, 0);
if ((int)docID != 0)
{
object selectedAnnotPageAndIndexOnPage;
pdfViewer.DoDocumentVerb((int)docID, null, "GetSelectedAnnot", null, out selectedAnnotPageAndIndexOnPage, 10);
var intArray = (int[])selectedAnnotPageAndIndexOnPage;
if (intArray.Length > 0 && intArray[0] > -1)
{
AnnotIsSelected = true;
}
else
{
AnnotIsSelected = false;
}
}
}