Hi Team,
I am very new for this control. here is my scenario.
I have viewer and I am adding a image in the canvas and showing to the user, now user have all options e.g user can rotate the image, they can zoom the image and they can pan the image after the zoom, I need to save this user state, Now user can go to the print preview click where user will get the original image not the zoomed one, now If user will close the print preview I want to show the user the same zoomin postion and pan postion where he left the image.
I tired with first look example but its not working.
Could you please let me know the apprach.
Thanks,
vivek.
I am very new for this control. here is my scenario.
I have viewer and I am adding a image in the canvas and showing to the user, now user have all options e.g user can rotate the image, they can zoom the image and they can pan the image after the zoom, I need to save this user state, Now user can go to the print preview click where user will get the original image not the zoomed one, now If user will close the print preview I want to show the user the same zoomin postion and pan postion where he left the image.
I tired with first look example but its not working.
if
(!PrintPreviewClick)
{
SaveState();
}
bool
PrintPreviewClick =
false
;
System.IO.Stream stream;
private
void
SaveState()
{
IsolatedStorageProvider isoStorageProvider =
new
IsolatedStorageProvider();
isoStorageProvider.SaveToStorage();
}
/// <summary>
/// Reset the Print page, clear down all the watermark, border, header,footer
/// </summary>
public
void
ResetPrintPage()
{
PrintPreviewClick =
false
;
//var ppth = new Path()
//{
// Data = new RectangleGeometry()
// {
// Rect = new Rect(page.MediaMinX, page.MediaMinY, page.Width, page.Height),
// },
// Fill = new SolidColorBrush(PaperColor),
//};
//pageCanvas.Children.Remove(lbl_Watermark);
//pageCanvas.Children.Remove(lblheader);
//pageCanvas.Children.RemoveAt(0);
//pageCanvas.Children.Insert(0, ppth);
//pageCanvas.Children.Remove(rect);
//pageCanvas.Children.Remove(lbl_footer);
//pageCanvas.Children.Remove(c);
ReloadState();
}
private
void
ReloadState()
{
IsolatedStorageProvider isoStorageProvider =
new
IsolatedStorageProvider();
isoStorageProvider.LoadFromStorage();
}
///
Could you please let me know the apprach.
Thanks,
vivek.