一.TextBlock:这个控件其实就是Label控件。

<TextBlock x:Name="PageTitle" Text="page name" Margin="-3,-8,0,0" Style="{StaticResource PhoneTextTitle1Style}" TextWrapping="Wrap"/>Style:设置字体、字色、大小等样式,用StaticResource方式可以绑定预设的样式。

TextWrapping:设置是否自动换行。
Text:在控件上要显示的文字。

二.CheckBox: 多选控件,通过blend工具也可以生成多种效果,另外要想将选择框加大,并不是能过设置Width,Height来完成的,而是通过RenderTransform的Scale来完成的。

<CheckBox Content="CheckBox1" Height="80" HorizontalAlignment="Left" Margin="102,113,0,0" Name="checkBox1" VerticalAlignment="Top" Width="279" BorderBrush="Red" Foreground="Blue" Checked="checkBox1_Checked" Background="Yellow"/>

<CheckBox Content="CheckBox2" Height="72" HorizontalAlignment="Left" Margin="148,0,0,346" Name="checkBox2" VerticalAlignment="Bottom" Checked="checkBox2_Checked" RenderTransformOrigin="0.5,0.5" BorderBrush="#BFFB2200" Foreground="#FF1008F7">

<CheckBox.Background>

<LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">

<GradientStop Color="White" Offset="0.504"/>

<GradientStop Color="#FFF7E306" Offset="1"/>

<GradientStop Color="#FFF7E306" Offset="0.004"/>

</LinearGradientBrush>

</CheckBox.Background>

<CheckBox.RenderTransform>

<CompositeTransform ScaleX="2" ScaleY="2"/>

</CheckBox.RenderTransform>

</CheckBox>

三.RadioButton:单选按钮。当有多个在一起时,可以自动互斥。与多选控件一样,要想使控件变大,需要使用Transform scale来实现。

<RadioButton Content="RadioButton1" Grid.Row="1" Height="72" HorizontalAlignment="Left" Margin="84,79,0,0" Name="radioButton1" VerticalAlignment="Top" Width="294" />

<RadioButton Content="RadioButton2" Grid.Row="1" Height="72" HorizontalAlignment="Left" Margin="84,183,0,0" Name="radioButton2" VerticalAlignment="Top" />

<RadioButton Content="RadioButton3" Grid.Row="1" Height="72" HorizontalAlignment="Left" Margin="84,299,0,0" Name="radioButton3" VerticalAlignment="Top" />

四.ProgressBar: 进度条控件。有两种形式,一种是显示确切进度的;另一种是不确定的,不断重复。

<ProgressBar Grid.Row="1" Height="71" HorizontalAlignment="Left" Margin="24,109,0,0" Name="progressBar1" VerticalAlignment="Top" Width="424" Value="80"/>

<ProgressBar Grid.Row="1" Height="55" HorizontalAlignment="Left" Margin="36,273,0,0" Name="progressBar2" VerticalAlignment="Top" Width="412" IsIndeterminate="True"/>IsIndeterminate:设置进度条形式,False:不重复的进度,按value值变化进度;True:重复进度条。

五.Slider:滑杆控件。可以设置水平、垂直方向。

<Slider Grid.Row="1" Height="90" HorizontalAlignment="Left" Margin="20,30,0,0" Name="slider1" VerticalAlignment="Top" Width="460" />

<Slider Grid.Row="1" Height="390" HorizontalAlignment="Left" Margin="192,166,0,0" Name="slider2" VerticalAlignment="Top" Width="59" Orientation="Vertical" />

Orientation:设置滑杆方向。

IsDirectionReversed:设置Slider控件值的增加方向。

Value:设置当前值。

六.PopUp: 弹出控件,可以显示到当前页的最前面。这个控件可以用来做自定义的messagebox,等待框等。

<Popup Grid.Row="1" HorizontalAlignment="Left" Margin="109,172,0,0" Name="popup1" VerticalAlignment="Top" Height="250" Width="250" IsOpen="True" Opened="popup1_Opened">

<Canvas Width="250" Height="250" Background="Red" VerticalAlignment="Center" HorizontalAlignment="Center">

<TextBlock Margin="90,120,0,0" Text="请等待......">

</Canvas>

</Popup>

七.Thumb:这个控件可以通过拖动,获取连续的坐标(有点儿像笔记本上的触摸板),从而和其他控件组合使用来产生控件拖动效果。

<Thumb Grid.Row="1" Height="125" HorizontalAlignment="Left" Margin="154,99,0,0" Name="thumb1" VerticalAlignment="Top" Width="190" DragDelta="thumb1_DragDelta" DragCompleted="thumb1_DragCompleted" DragStarted="thumb1_DragStarted"/>

八.MultiScaleImage:这个控件主要用来实现DeepZoom功能,可以很方便的缩放你的图片,这些图片可以在Silverlight提供的巨大的虚拟空间上绘制出来。常用在地图的显示上,以及多图片的预览。

Windows phone 中一些实用的控件的更多相关文章

  1. 重新想象 Windows 8.1 Store Apps (81) - 控件增强: WebView 之加载本地 html, 智能替换 html 中的 url 引用, 通过 Share Contract 分享 WebView 中的内容, 为 WebView 截图

    [源码下载] 重新想象 Windows 8.1 Store Apps (81) - 控件增强: WebView 之加载本地 html, 智能替换 html 中的 url 引用, 通过 Share Co ...

  2. 重新想象 Windows 8.1 Store Apps (81) - 控件增强: 加载本地 html, 智能替换 html 中的 url 引用, 通过 Share Contract 分享 WebView 中的内容, 为 WebView 截图

    原文:重新想象 Windows 8.1 Store Apps (81) - 控件增强: 加载本地 html, 智能替换 html 中的 url 引用, 通过 Share Contract 分享 Web ...

  3. WindowsXamlHost:在 WPF 中使用 UWP 的控件(Windows Community Toolkit)

    Windows Community Toolkit 再次更新到 5.0.以前可以在 WPF 中使用有限的 UWP 控件,而现在有了 WindowsXamlHost,则可以使用更多 UWP 原生控件了. ...

  4. Windows App开发之经常使用控件与应用栏

    控件的属性.事件与样式资源 怎样加入控件 加入控件的方式有多种,大家更喜欢以下哪一种呢? 1)使用诸如Blend for Visual Studio或Microsoft Visual Studio X ...

  5. Windows Phone 8.1 新特性 - 控件之FlipView

    本篇为大家介绍 Windows Phone 8.1 中新增的 FlipView 控件,它的中文名字叫做:翻转视图. 虽然听起来有点拗口,但是它的用途大家一定不会陌生.在 Windows Phone 8 ...

  6. Windows Phone 8.1 新特性 - 控件之列表选择控件

    本篇我们来介绍Windows Phone 8.1 新特性中的列表选择控件. 在Windows Phone 8 时代,大家都会使用 LongListSelector 来实现列表选择控件,对数据进行分组显 ...

  7. WinForm/Silverlight多线程编程中如何更新UI控件的值

    单线程的winfom程序中,设置一个控件的值是很easy的事情,直接 this.TextBox1.value = "Hello World!";就搞定了,但是如果在一个新线程中这么 ...

  8. 重新想象 Windows 8.1 Store Apps (77) - 控件增强: 文本类控件的增强, 部分控件增加了 Header 属性和 HeaderTemplate 属性, 部分控件增加了 PlaceholderText 属性

    [源码下载] 重新想象 Windows 8.1 Store Apps (77) - 控件增强: 文本类控件的增强, 部分控件增加了 Header 属性和 HeaderTemplate 属性, 部分控件 ...

  9. 重新想象 Windows 8.1 Store Apps (78) - 控件增强: ScrollViewer, FlipView, Popup

    [源码下载] 重新想象 Windows 8.1 Store Apps (78) - 控件增强: ScrollViewer, FlipView, Popup 作者:webabcd 介绍重新想象 Wind ...

随机推荐

  1. Js 数组——filter()、map()、some()、every()、forEach()、lastIndexOf()、indexOf()

    filter():   语法: var filteredArray = array.filter(callback[, thisObject]); 参数说明: callback: 要对每个数组元素执行 ...

  2. js中获取函数的参数

    刘海波 2015/2/11 9:11:43 tmp = tmp.replace(/\{(\d+)\}/g, function($1, $2) {return addrow.arguments[pars ...

  3. vim的列编辑操作

    转载:http://www.cnblogs.com/xiaowant/articles/1992923.html 删除列 1.光标定位到要操作的地方. 2.CTRL+v 进入“可视 块”模式,选取这一 ...

  4. excel,access常用公式函数VBA代码汇总文章

    批量将CSV导入access alt+f11 打开access的vbe环境 Sub test() Dim SQL As String Dim MyPath As String Dim MyPathDb ...

  5. JSON特殊字符处理

    JSON 是适用于 Ajax 应用程序的一种有效格式,原因是它使 JavaScript 对象和字符串值之间得以快速转换.由于 Ajax 应用程序非常适合将纯文本发送给服务器端程序并对应地接收纯文本,相 ...

  6. memcachedb-持久化存储的缓存系统

    Memcached 是一个高性能的分布式内存对象缓存系统,用于动态Web应用以减轻数据库负载.它通过在内存中缓存数据和对象来减少读取数据库的次数,从而提供动态.数据库驱动网站的速度.Memcached ...

  7. ios 把毫秒值转换成日期 NSDate

    ios 把毫秒值转换成日期 (比较好用) 1343359790000 这是毫秒值------最佳解决方案-------------------- long long time=134335979000 ...

  8. java笔记 chapter1 java是什么,能干什么,有什么,特点,开发环境

    一,java是什么 二,java能干什么 三,java有什么 四,java的特点 五,java的三大特性:虚拟机,垃圾回收和代码安全 六,构建JSE开发环境:下载安装jdk和配置环境变量 七,编写并运 ...

  9. request.getHeader("Referer")理解【转载】

    request.getHeader("Referer")用于获取来源页地址,但有时却为空值,这是怎么回事.原因如下: getHeader("Referer")要 ...

  10. Java Script基础(三) 函数

    一.JavaScript中的函数 在JavaScript中,函数类似于Java中的方法,是执行特定功能的代码块,可以重复调用.JavaScript中的函数分为两种,一种是系统函数,另一种是自定义函数. ...