WPF 精修篇 获取系统颜色和字体样式

原文:WPF 精修篇 获取系统颜色和字体样式

看效果

WPF 精修篇 获取系统颜色和字体样式


  1. <Grid>
  2. <Rectangle Fill="{DynamicResource {x:Static SystemColors.DesktopBrushKey}}" HorizontalAlignment="Left" Height="76" Margin="85,70,0,0" Stroke="Black" VerticalAlignment="Top" Width="243">
  3. </Rectangle>
  4. <TextBlock Text=" 文本" FontFamily="{DynamicResource {x:Static SystemFonts.CaptionFontFamily}}" FontSize="{DynamicResource {x:Static SystemFonts.CaptionFontSize}}" FontWeight="{DynamicResource {x:Static SystemFonts.CaptionFontWeight}}"></TextBlock>
  5. </Grid>

rectangle的fill 跟着窗体变化

上一篇:漫谈 Clustering (番外篇): Dimensionality Reduction


下一篇:从K近邻算法谈到KD树、SIFT+BBF算法