Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zoombox set viewport #1510

Closed
thestonehead opened this issue Jul 10, 2019 · 1 comment
Closed

Zoombox set viewport #1510

thestonehead opened this issue Jul 10, 2019 · 1 comment

Comments

@thestonehead
Copy link

Hi.

I would like to save the state in which the zoombox is (namely viewport) when the application is closed and restore it when the application starts again. The problem is that there's no setter for Viewport.

Is there an alternate way to programatically set viewport of Zoombox?

@XceedBoucherS
Copy link
Collaborator

You can save the main values like "scale" and "position" in order to re-apply them :

private void Button_Click_Save( object sender, RoutedEventArgs e )
{
_scale = _zoombox.Scale;
_position = _zoombox.Position;
}

private void Button_Click_Load( object sender, RoutedEventArgs e )
{
  _zoombox.Scale = _scale;
  _zoombox.Position = _position;
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants