开发者

resolution in WPF

开发者 https://www.devze.com 2022-12-15 09:38 出处:网络
In my applcaiton,i make Grid of size Grid Width=\"1300.441\" Height=\"80\", Its working fien in this resolution.But when i changed my resolution to 1152 width,quater of applicatio开发者_如何学Cn get o

In my applcaiton,i make Grid of size Grid Width="1300.441" Height="80", Its working fien in this resolution.But when i changed my resolution to 1152 width,quater of applicatio开发者_如何学Cn get out of the desktop. How can i avoid that? I want to display full page in all resolution. Pls help me


In WPF, the pixel size is 1/96 inch. There's no other resolution. It seems that your content is 13.54626 inches wide. My guess is that this is an XPS document or a raster or something? In this case, there is no way to display the whole thing in 1152 pixels at 100% without cropping and needing to scroll.


You can place your grid inside a ViewBox element, it will scale everything down to whatever resolution you need.

<ViewBox Width="1000">
    <Grid Width="1300.441">
    ...
    </Grid>
</ViewBox>
0

精彩评论

暂无评论...
验证码 换一张
取 消