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"

  • 相关阅读:
    在线网络考试系统源码
    zabbix通过api 批量自动添加主机
    python 连接数据库 区分线上和测试环境
    python 获取本机ip win or linux
    redis常用参数以及redis内存淘汰机制
    nginx常用配置
    Linux基础命令(之一)详解
    linux系统重要子目录介绍
    Linux系统根目录结构介绍
    Linux 基础优化配置
  • 原文地址:https://www.cnblogs.com/Clingingboy/p/663556.html
Copyright © 2011-2022 走看看