微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

silverlight 矩形报警颜色框

效果图:


页面代码

<Grid x:Name="LayoutRoot" Background="White">         <Grid>             <Grid.RowDeFinitions>                                  <RowDeFinition></RowDeFinition>                 <RowDeFinition></RowDeFinition>             </Grid.RowDeFinitions>         <Border Grid.Row="1" Background="AliceBlue">             <Grid Width="140" Height="120">                     <Grid.RowDeFinitions>                         <RowDeFinition></RowDeFinition>                         <RowDeFinition></RowDeFinition>                                      <RowDeFinition></RowDeFinition>                         <RowDeFinition></RowDeFinition>                     </Grid.RowDeFinitions>                     <Rectangle   Grid.Row="0" Fill="#FFE51D1D" >  </Rectangle>                     <TextBlock Grid.Row="0" HorizontalAlignment="Center" Margin="0,8,0">III级报警</TextBlock>                     <Rectangle  Fill="Orange"  Grid.Row="1"> </Rectangle>                     <TextBlock Grid.Row="1" HorizontalAlignment="Center" Margin="0,0">II级报警</TextBlock>                     <Rectangle Fill="Yellow"  Grid.Row="2"></Rectangle>                     <TextBlock Grid.Row="2" HorizontalAlignment="Center" Margin="0,0">I级报警</TextBlock>                     <Rectangle Fill="Green"  Grid.Row="3"></Rectangle>                     <TextBlock Grid.Row="3" HorizontalAlignment="Center" Margin="0,0">安全区域</TextBlock>                 </Grid>         </Border>         </Grid>     </Grid>

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐