WPF 控件【V】Viewbox(一)Viewbox可以按特定比例伸缩或按固定窗口大小伸缩

<Grid>
      <Viewbox >
        <Viewbox.RenderTransform>
          <ScaleTransform ScaleX="0.5" ScaleY="0.5"/>
        </Viewbox.RenderTransform>
      <Path Stroke="Black" StrokeThickness="1" Fill="Black" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
        <Path.Data>
          <PathGeometry Figures="M 0,0 L 10,0 10,10 Z" />
        </Path.Data>
      </Path>
      </Viewbox>
    </Grid>

展开阅读全文

没有更多推荐了,返回首页