English 中文(简体)
调整大小并保持三进制控控
原标题:Resize and Keep Controls in Thirds

能否在窗口调整大小时获得控制, 将空间自动以 3 /3 分隔? 它在代码中足够容易操作, 但是如果可能的话, 我愿意直接设置 xaml 中的参数 。

最佳回答

使用网格控制。 它会占用任何可用的空间。 您可以通过操作获得 3 /3 (假设您需要 3 列)

<Grid>
    <Grid.ColumnDefinitions>
        <ColumnDefinitions Width="*"/>
        <ColumnDefinitions Width="*"/>
        <ColumnDefinitions Width="*"/>
    </Grid.ColumnDefinitions>
    <Button Grid.Column="0"/>
    <Button Grid.Column="1"/>
    <Button Grid.Column="2"/>
</Grid>
问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签