logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

New Topic Post Reply
Options
Go to last post Go to first unread
Guest  
#1 Posted : Saturday, December 10, 2016 6:22:22 AM(UTC)
Quote
Guest

Rank: Guest

Groups: Guests
Joined: 1/5/2016(UTC)
Posts: 162

Was thanked: 5 time(s) in 5 post(s)
Hi

Thanks for a great library so much better then some of the otherd that's 10 times more expensive!

Any example code on how to implement night mode?

Regards
Willie

Serg  
#2 Posted : Monday, December 12, 2016 1:49:11 AM(UTC)
Quote
Guest

Rank: Guest

Groups: Guests
Joined: 1/5/2016(UTC)
Posts: 162

Was thanked: 5 time(s) in 5 post(s)
There is no a direct way to do that.

Nut you can use the following workaround

Code:

pdfViewer1.BeforeDocumentChanged += (s, e) =>
 {
	 if (pdfViewer1.Document != null)
		 pdfViewer1.Document.Pages.PageLoaded -= Pages_PageLoaded;
 };
pdfViewer1.AfterDocumentChanged += (s, e) =>
  {
	  if(pdfViewer1.Document!= null)
		  pdfViewer1.Document.Pages.PageLoaded += Pages_PageLoaded;
  };


private void Pages_PageLoaded(object sender, Patagames.Pdf.Net.EventArguments.PdfPageEventArgs e)
{
	foreach(var obj in e.Page.PageObjects)
	{
		obj.StrokeColor = Color.White;
		obj.FillColor = Color.Green;
	}
	pdfViewer1.PageBackColor = Color.Black;
}


nightmode.png
Quick Reply Show Quick Reply
Users browsing this topic
Guest (3)
New Topic Post Reply
Forum Jump  
You can post new topics in this forum.
You can reply to topics in this forum.
You can delete your posts in this forum.
You can edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.