成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

在WP7中使用Coding4Fun Button控件

移動開發
Coding4Fun工具包提供了RoundButton and RoundToggleButton控件,RoundToggleButton是一個UI組件,源自CheckBox控件并且暴露了一些額外的依賴屬性,正如它名字所說的。這是一種擴展圓形的切換按鈕且有自動反向圖像的支持。

這篇文章將詳細討論Coding4Fun工具包中的Button控件。講解這里面的主要特性及現有的公共API,并給出不同情況的例子。

Coding4Fun工具包提供了RoundButton and RoundToggleButton控件,RoundToggleButton是一個UI組件,源自CheckBox控件并且暴露了一些額外的依賴屬性,正如它名字所說的。這是一種擴展圓形的切換按鈕且有自動反向圖像的支持。RoundButton控件是一個圓形的且提供自動反向圖像支持的擴展按鈕。

RoundButton控件

在開始使用RoundButton和RoundToggleButton控件之前我們需要添加Coding4Fun.Phone.Controls.dll的引用。

你可以從這個地方下載:Coding4Fun Toolkit

首先我們需要添加“C4F”的前綴聲明,確保你的頁面聲明了“c4fToolkit” 的命名空間。

  1. xmlns:c4f="clr-namespace:Coding4Fun.Phone.Controls;assembly=Coding4Fun.Phone.Controls" 
  2. <c4f:RoundButton/> 
  3. <c4f:RoundToggleButton/> 

RoundToggleButton控件從CheckBox繼承了所有的屬性和事件,RoundButton 控件去Button控件中繼承了所有的屬性和事件。

Content屬性

這個屬性來來自父類用戶設置 RoundToggleButton/RoundButton的內容。

ImageSource屬性

ImageSource是一個ImageSource類型的依賴屬性,它用戶設置或獲取RoundToggleButton/RoundButton控件的圖片。

Orientation屬性

Orientation是一個Orientation類型的依賴屬性,它用于設置或獲取RoundToggleButton/RoundButton控件的方向。

Examples

下面的例子我將使用2個圖標。

Examples Examples

注:圖標會自動根據Light主題的變化而適當的變化。

Example1:RoundButton示例

這個例子演示了如何設置RoundButton控件常用屬性,添加如下xaml代碼:

  1. <StackPanel Orientation="Horizontal"> 
  2. <c4f:RoundButton FontSize="18" Content="OK" BorderBrush="CornflowerBlue" /> 
  3. <c4f:RoundButton FontSize="48" Content="48" Background="CornflowerBlue" /> 
  4. <c4f:RoundButton Foreground="CornflowerBlue" FontSize="36" Content="36"/> 
  5. <c4f:RoundButton ImageSource="Images/appbar.delete.rest.png" Content="Delete"/> 
  6. </StackPanel> 

下面分別是在Dark and Light themes中的結果。

在Dark and Light  themes中的結果 在Dark and Light  themes中的結果

Example2:RoundButton Orientation and ImageSource屬性的使用

  1. <c4f:RoundButton Orientation="Horizontal" ImageSource="Images/appbar.feature.search.rest.png" Content="horizontal text"/> 

RoundButton Orientation and ImageSource 屬性 RoundButton Orientation and ImageSource 屬性

Example3. RoundToggleButton控件示例

這個例子演示了如何設置RoundToggleButton控件常用屬性,添加如下xaml代碼:

  1. <StackPanel Orientation="Horizontal"> 
  2. <c4f:RoundToggleButton FontSize="18" Content="ok" BorderBrush="CornflowerBlue" /> 
  3. <c4f:RoundToggleButton FontSize="48" Content="48" Background="CornflowerBlue" /> 
  4. <c4f:RoundToggleButton Foreground="CornflowerBlue" FontSize="36" Content="36" /> 
  5. <c4f:RoundToggleButton ImageSource="Images/appbar.delete.rest.png" Content="DELETE"/> 
  6. </StackPanel> 

RoundToggleButton控件示例 RoundToggleButton控件示例

Example4: RoundToggleButton Orientation and ImageSource屬性的使用

  1. <c4f:RoundToggleButton Orientation="Horizontal" ImageSource="Images/appbar.feature.search.rest.png" Content="horizontal text"/> 

RoundToggleButton  Orientation and ImageSource 屬性 RoundToggleButton  Orientation and ImageSource 屬性

Example5: RoundButton and RoundToggleButton控件的禁用

  1. <c4f:RoundButton x:Name="btn" IsEnabled="False" Orientation="Horizontal" ImageSource="Images/appbar.delete.rest.png" 
  2. Content="disabled button" /> 

RoundButton and RoundToggleButton控件

從Coding4fun Toolkit可以深入了解RoundButton/RoundToggleButton控件。

原文鏈接:http://www.cnblogs.com/youhui/archive/2012/03/21/2409091.html

【編輯推薦】

  1. 在WP開發中使用Coding4Fun工具包
  2. WP7開發中Coding4Fun的五種彈出框介紹
  3. 開源類庫Coding4Fun中的ToastPrompt控件介紹
  4. ToastPrompt在Windows Phone開發中的用法

 

責任編輯:王曉東 來源: cnblogs
相關推薦

2012-05-08 11:03:28

Coding4Fun

2012-05-14 10:33:43

Coding4Fun

2012-05-08 09:58:15

ToastPromptCoding4Fun

2013-06-17 12:28:00

WP7開發Windows Pho控件傾斜特效源

2013-06-17 10:31:42

WP7開發日歷控件源碼下載

2012-05-08 13:54:40

ToastPrompt

2013-06-17 14:10:08

WP7開發Windows Pho豆瓣電臺

2013-06-17 13:47:41

WP7開發Windows Pho文本框水印控件

2012-01-01 19:33:19

2011-11-25 13:52:05

Windows Pho聲音播放

2013-06-17 12:44:38

WP7開發Windows Pho數獨游戲

2013-06-17 15:03:43

WP7開發騰訊微博SDK源碼下載

2013-06-17 14:35:40

WP7Windows Pho應用開源模板

2012-03-22 14:50:00

WP7微軟諾基亞

2013-04-12 12:36:13

WindowsPhon

2013-06-17 14:46:32

2012-05-25 12:57:31

Windows Pho

2011-02-28 10:42:14

Windows Pho微軟

2012-05-15 14:00:51

WP7開發環境

2013-06-17 11:04:11

WP7開發Windows Pho日歷源碼下載
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 午夜性色a√在线视频观看9 | 欧美日韩在线播放 | 久久久妇女国产精品影视 | 成人性视频免费网站 | 亚洲精选一区 | 日韩在线欧美 | 国产精品一区二区免费看 | 免费黄色大片 | 精品一区av| www.夜夜草| 精品一区二区三区四区视频 | 国产亚洲精品美女久久久久久久久久 | 一本大道久久a久久精二百 欧洲一区二区三区 | 国产精品69av | 久久久久国产精品一区二区 | 成人在线影视 | 特级一级黄色片 | 日本国产欧美 | 亚洲精品一区二区三区蜜桃久 | 在线观看黄色电影 | 天天射视频 | 中文久久 | 中文字幕亚洲欧美 | 久久久久国产 | 色五月激情五月 | 精品久久久久一区二区国产 | 欧美成人一级 | 久久一区二区三区四区 | 国产精品乱码一区二区三区 | 国产视频1区2区 | 国产精品一区二区av | 国产成人精品一区二区三区在线观看 | 国产视频黄色 | 中文字幕一区二区三区精彩视频 | 亚洲在线久久 | 美女黄视频网站 | 欧美一级在线免费 | 欧美群妇大交群中文字幕 | 国产日韩欧美在线 | 国产美女一区二区三区 | 国产视频1区 |