I've written up an emulator using WPF. The window itself is basic:
<Window>
<DockPanel>
<Menu DockPanel.Doc="Top" .../>
<StatusBar DockPanel.Doc="Bottom" .../>
<ViewBox/>
</DockPanel>
</Window>
The emulator runs fine within the ViewBox container. Window can be resized and such.
However, the original system ran in 640x480 pixels and I'd like to add an option to resize to that.
So... How I can resize the window such that ViewBox is exactly 640x480?
(Yes, I'm wanting to set the size of the only control free to size itself)
Additional: My emulator only uses the coordinates of the ViewBox for BitBlt purposes. It doesn't actually use the control itself.
I figured it out with some basic math:
(Window/ViewBox being elements mentioned in original question)