0

I need to make my mainwindow resizeable.. but it's pointless to resize it if the contents inside don't scale with it.. i googled and didnt' find much.. i did find this though:

and it doesn't work.. i have tried this:

<Window.RenderTransform>
    <ScaleTransform ScaleX="0.8" ScaleY="0.8" />
</Window.RenderTransform>

and tried this website here

http://inchoatethoughts.com/scaling-your-user-interface-in-a-wpf-application

but even trying from a blank project, it didn't work for some reason =T

EDIT: i think what makes it tricky is that i have two sets of grids. the first grid for a mock title bar, and a second grid for the rest of the content

4

1 回答 1

0

我会使用ViewBox

<Window>
    <Viewbox>
        ... your Content
    </Viewbox>
</Window>

有关缩放的几个选项,请参阅拉伸属性枚举

于 2013-10-18T18:35:20.907 回答