zoukankan      html  css  js  c++  java
  • WPF的BulletDecorator 对齐控件

    <Window x:Class="WPFBulletDecorator.MainWindow"
    xmlns
    ="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x
    ="http://schemas.microsoft.com/winfx/2006/xaml"
    Title
    ="MainWindow" Height="350" Background="Transparent" WindowStyle="None" AllowsTransparency="True" Width="525" >
    <Grid Background="Transparent">
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="100" />
    <ColumnDefinition />
    </Grid.ColumnDefinitions>
    <!--<Button Height="50" Width="70" />
    <Grid Background="Black" Grid.Column="1" />
    -->
    <WrapPanel>
    <BulletDecorator Height="25" VerticalAlignment="Top" Margin="5 10 0 0">
    <BulletDecorator.Bullet>
    <Label>姓名:</Label>
    </BulletDecorator.Bullet>
    <TextBox Width="100" TextWrapping="Wrap"></TextBox>
    </BulletDecorator>
    <BulletDecorator Height="25" VerticalAlignment="Top" Margin="5 10 0 10">
    <BulletDecorator.Bullet>
    <Label>年龄:</Label>
    </BulletDecorator.Bullet>
    <TextBox Width="100"></TextBox>
    </BulletDecorator>
    <BulletDecorator Margin="5 10 0 0">
    <BulletDecorator.Bullet>
    <CheckBox IsChecked="True"></CheckBox>
    </BulletDecorator.Bullet>
    <TextBlock Width="100" Foreground="Red">在CheckBox之后</TextBlock>
    </BulletDecorator>
    <BulletDecorator Margin="5,10,0,0">
    <BulletDecorator.Bullet>
    <RadioButton/>
    </BulletDecorator.Bullet>
    <TextBlock
    Width="100"
    TextWrapping
    ="Wrap"
    HorizontalAlignment
    ="Left"
    Foreground
    ="Blue"
    Margin
    ="5,0,0,0">
    在Radio后
    </TextBlock>
    </BulletDecorator>
    </WrapPanel>

    </Grid>
    </Window>

    可以 对齐控件的...调整
    BulletDecorator 的属性 子控件跟着调整

  • 相关阅读:
    RTC是DS1339,驱动采用的是rtc-ds1307.c
    hi3515 rtc驱动(ds1307/1339)驱动和示例
    qt5.4.1的imx6编译
    Python实现ID3(信息增益)
    Python实现nb(朴素贝叶斯)
    Python实现kNN(k邻近算法)
    Android实现地图服务
    Android实现传感器应用及位置服务
    Android实现KSOAP2访问WebService
    Android实现网络访问
  • 原文地址:https://www.cnblogs.com/makubexsoft/p/2334088.html
Copyright © 2011-2022 走看看