hello i have a window(wpf) with labels and text boxes, i want him to fit to the screen resolution as much as possible,
how do i do it
hello i have a window(wpf) with labels and text boxes, i want him to
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Viewbox is quite useful if you need the content of your window to scale proportionally when you resize the window (for example maximize it). In this minimalistic page
you have a TextBlock and a colored Border stacked vertically; if you start this xaml the window will have a size of 300×300, the font of the TextBlock will be 14 in size and the colored border will be 100×100. If you rescale the window you will see both the TextBlock and the Border scale accordingly (so they’ll be no more of the size you’ve specified in the xaml), keeping relative proportions. Viewbox is really useful, in this respect, if you need a window whose internal components layout look always the same independently from the final resolution it will be displayed (what does matter is aspect-ratio, thought). This obviously work with any contents you’ll put inside the Viewbox (we had an application with videos and 3D views for example). Note that in Visual Studio 2008 you’ll not be able to see the content of the Viewbox in the Designer.
Hope this help.