I am using WPF to create an interactive touch-based application. The application uses ScatterViewItem
objects to hold two scrollable menus inside, a main menu and a sub-menu side by side and display various content depending on the items selected.
By default, the ScatterViewItem
is scalable using touch gestures, but the problem is that only the container itself grows/shrinks in size, while the items simply move further apart or closer together inside it.
What I wish for to happen is for the container and everything inside it to scale proportionately, just like an image would, for example.
I've tried using a ViewBox
to wrap all the contents inside, but this caused a host of new problems:
The once scrollable menus (
SurfaceScrollViewer
) are now automatically scaled so that they fit entirely inside the container. This is bad since the individual item size changes depending on the amount of items in the sub-menu. I need them to stay scrollable, and for the same amount of items (roughly 3x3) to be able to fit in the container no matter the total count.TextBox
controls now change their font sizes depending on the content length to fit the text in one line. I wish for the font size to stay uniform across all items, wrapping around to the next line if necessary.
What would be best approach for this? Should I just use some kind of binding to have a fixed proportion between each object's dimensions and its parent container's dimensions?
I have very limited C#/WPF experience and a tight schedule so any suggestions and/or examples would be very welcome.