Quadra

Quadra Offshore

 
  • Increase font size
  • Default font size
  • Decrease font size
Home Silverlight Flip-Book

Silverlight FLip-Book

E-mail Print PDF

Quadra Silverlight Flipbook Control

We are releasing an open source flip-book control with demo code.  The look is very easily customizable. 

 Try the online demo

 

Download the silverlight flipbook source

Usage is very simple: Add QuadraSoft.Controls to your Solution, add a new Silverlight user control named "BookPage". In bookpage you can style it or add controls to it such as our example, adding a TextBlock control (BookContent) for captioning the backgrounds.
Each BookPaper should be assigned two BookPage objects, and paper's are added to the instance of Book.


BookPage frontCover = new BookPage();
frontCover.LayoutRoot.Background = new ImageBrush { ImageSource = new BitmapImage(new Uri("FBImages/Mountain1.jpg", UriKind.Relative)) };
frontCover.BookContent.Text = "Front Cover -- Mountain Flipbook";
BookPage page1 = new BookPage();
page1.BookContent.Text = "Far far away from our China office.";
page1.LayoutRoot.Background = new ImageBrush { ImageSource = new BitmapImage(new Uri("FBImages/Mountain2.jpg", UriKind.Relative)) };

BookPaper paper1 = new BookPaper();
paper1.FrontPage = frontCover;
paper1.BackPage = page1;

BookPage page2 = new BookPage();
page2.BookContent.Text = "Maybe this is near our Vancouver office?";
page2.LayoutRoot.Background = new ImageBrush { ImageSource = new BitmapImage(new Uri("FBImages/Mountain3.jpg", UriKind.Relative)) };
BookPage page3 = new BookPage();
page3.BookContent.Text = "A beautiful mountain in Town Z";
page3.LayoutRoot.Background = new ImageBrush { ImageSource = new BitmapImage(new Uri("FBImages/Mountain4.jpg", UriKind.Relative)) };
BookPaper paper2 = new BookPaper();
paper2.FrontPage = page2;
paper2.BackPage = page3;

BookPage page4 = new BookPage();
page4.BookContent.Text = "A beautiful moutain in Town N";
page4.LayoutRoot.Background = new ImageBrush { ImageSource = new BitmapImage(new Uri("FBImages/Mountain5.jpg", UriKind.Relative)) };
BookPage backCover = new BookPage();
backCover.LayoutRoot.Background = new ImageBrush { ImageSource = new BitmapImage(new Uri("FBImages/Mountain6.jpg", UriKind.Relative)) };
backCover.BookContent.Text = "Back Cover - Mountain Flipbook";
BookPaper paper3 = new BookPaper();
paper3.FrontPage = page4;
paper3.BackPage = backCover;

Book book = new Book();

book.addPaper(paper1);
book.addPaper(paper2);
book.addPaper(paper3);

this.XCenterGrid.Children.Add(book);