看板 C_Sharp 關於我們 聯絡資訊
不好意思問個簡單問題 我現在做個user control 希望他在使用時 能隨著視窗大小作等比例的縮放 我現在是把所有東西都放在 viewbox 內 這樣 control 是可以等比例縮放 但是他的位子會跑 請問有沒有一勞永逸的方法呢?? 謝謝 code 如下 <UserControl x:Class="UsefulUI.UsefulUIPlus" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="auto" Height="auto"> <Viewbox Stretch="Uniform" > <Grid> <Border Width="320" Height="320"></Border> <Button Width="22" Height="22">X</Button> <ContentPresenter Margin="20,20" Width="300" Height="300"/> </Grid> </Viewbox> </UserControl> -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.128.79.49