以WPF繪圖簡單的圓形

來源:互聯網
上載者:User
 

WPF有非常優異的2D與3D繪圖能力,研討會上許多人看過我Demo的一些WPF動態作品集,在這Show一下WPF繪製三個圓形,並透明重迭

  文法如下:

<Page x:Class="Animation.SolidColorBrush"

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

Title="SolidColorBrush"

>

 

<Canvas>

  <Ellipse Canvas.Left="60" Canvas.Top="80" Width="100" Height="100"

  Fill="Blue" Opacity="0.5" Stroke="Black" StrokeThickness="3"/>

  <Ellipse Canvas.Left="30" Canvas.Top="30" Width="100" Height="100" Stroke="Blue"  StrokeThickness="3">

  <Ellipse.Fill>

   <SolidColorBrush Color="Green" Opacity="0.6" />

  </Ellipse.Fill>

  </Ellipse>

  <Ellipse Canvas.Left="90" Canvas.Top="30" Width="100" Height="100" Stroke="Black" StrokeThickness="3">

  <Ellipse.Fill>

   <SolidColorBrush Color="Red" Opacity="0.3" />

  </Ellipse.Fill>

  </Ellipse>

</Canvas>

</Page>

 

轉寄自http://blog.sina.com.tw/4907/article.php?pbgid=4907&entryid=245479

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.