zoukankan      html  css  js  c++  java
  • wpf学习笔记Viewbox

          

    1.
    <Canvas Width="18" Height="18" VerticalAlignment="Center">
        
    <Ellipse Canvas.Left="1" Canvas.Top="1" Width="16" Height="16"
                 Fill
    ="Yellow" Stroke="Black" />
        
    <Ellipse Canvas.Left="4.5" Canvas.Top="5" Width="2.5" Height="3"
                             Fill
    ="Black" />
        
    <Ellipse Canvas.Left="11" Canvas.Top="5" Width="2.5" Height="3"
                             Fill
    ="Black" />
        
    <Path Data="M 5,10 A 3,3 90 0 0 13,10" Stroke="Black" />
      
    </Canvas>



    2.
      <Viewbox>
        
    <Canvas Width="18" Height="18" VerticalAlignment="Center">
          
    <Ellipse Canvas.Left="1" Canvas.Top="1" Width="16" Height="16"
                   Fill
    ="Yellow" Stroke="Black" />
          
    <Ellipse Canvas.Left="4.5" Canvas.Top="5" Width="2.5" Height="3"
                               Fill
    ="Black" />
          
    <Ellipse Canvas.Left="11" Canvas.Top="5" Width="2.5" Height="3"
                               Fill
    ="Black" />
          
    <Path Data="M 5,10 A 3,3 90 0 0 13,10" Stroke="Black" />
        
    </Canvas>
        
      
    </Viewbox>




    3.Stretch属性

    <Viewbox Width="100" Stretch="Fill">
        
    <Canvas Width="18" Height="18" VerticalAlignment="Center">
          
    <Ellipse Canvas.Left="1" Canvas.Top="1" Width="16" Height="16"
                   Fill
    ="Yellow" Stroke="Black" />
          
    <Ellipse Canvas.Left="4.5" Canvas.Top="5" Width="2.5" Height="3"
                               Fill
    ="Black" />
          
    <Ellipse Canvas.Left="11" Canvas.Top="5" Width="2.5" Height="3"
                               Fill
    ="Black" />
          
    <Path Data="M 5,10 A 3,3 90 0 0 13,10" Stroke="Black" />
        
    </Canvas>
        
      
    </Viewbox>



     Stretch="UniformToFill"

  • 相关阅读:
    php mysql与mysqli 区别
    让IT工作者过度劳累的12个坏习惯
    HR不懂爱,他的问题答不上来
    励志小故事
    php中如何把一个数字字符串作为一个变量
    新手应该具备的基本素质
    邮件中的缩写
    强大的网页性能测试工具Speed Tracer
    Windows环境下EditPlus运行Perl程序
    ActionScript3检测当前下载资源的速度
  • 原文地址:https://www.cnblogs.com/Clingingboy/p/663556.html
Copyright © 2011-2022 走看看