I have written a program with WPF but in low resolution it has problem
what shall i do 开发者_如何学Pythonthat this program will be OK in every resolution
I am guessing that the problem you have is, that your application does not fit on the screen. What I normally do in this case, is placing the entire application inside a ViewBox
and set the Window size to something dynamic (i.e. WindowState.Maximized
)
Loos like
<Windows .....>
<ViewBox Stretch="Uniform">
<!-- Put all other UI stuff here. -->
</ViewBox>
</Window>
You have to make a decision: What do you want the application to do with the extra (or less) screen space?
Basically there are 3 options:
Scale everything according to the available screen space. (ViewBox is a good option here)
Size and position controls according to available screen space. (Margins and NO hard coded sizes are the way to go)
Combine #1 and #2 (more complex but might help you to utilize the available space the best)
You need to give us more information if you want more details help.
精彩评论