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"

  • 相关阅读:
    LitJson.JsonException: Can't assign value '2347089724' (type System.UInt32) to type System.Int64
    unity特效ParticleSystem在UI上缩放(自适应屏幕)
    unity特效ParticleSystem用到UI上
    数据结构-线性表
    数据结构-各种树的简单理解
    图解排序算法之堆排序
    图解排序算法之快速排序—三数取中法
    图解排序算法之归并排序
    排序算法
    CSS 选择器及优先级
  • 原文地址:https://www.cnblogs.com/Clingingboy/p/663556.html
Copyright © 2011-2022 走看看