一.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. c# 方法参数(传值,传引用,ref,out,params,可选参数,命名参数)

       一.方法参数的类型----值类型和引用类型 当方法传递的参数是值类型时,变量的栈数据会完整地复制到目标参数中即实参和形参中的数据相同但存放在内存的不同位置.所以,在目标方法中对形参所做的更改不会 ...

  2. 微信js接口自定义分享内容

    最近客户有个要求,需要给网页添加微信分享功能,当然指的是用微信自带浏览器的时候,希望用户在最后一页点击分享的时候是分享的首页.曾经无意中看到过微信公众开发者平台提供了js接口,所以试着做了做,果然,跌 ...

  3. UBI FAQ and HOWTO

    转:http://www.linux-mtd.infradead.org/faq/ubi.html UBI FAQ and HOWTO Table of contents How do I enabl ...

  4. 使用spring + cxf +tomcat构建webservice

    这里使用maven构建的项目. 首先,我们构建一个maven项目: 然后将pom.xml文件中的内容拷贝到新建项目的pon.xml文件中: <project xmlns="http:/ ...

  5. 【MongoDB】使用mongo连接服务器。。。

    使用mongo连接服务器 命令行: ./mongo 主机号:端口号/数据库名 e.g. ./mongo 127.0.0.1:12345/mongodb1 关闭服务器 use admin db.shut ...

  6. VMware系统运维(六)VMware vSphere Web Client安装

    1.开始安装VMware vSphere Web Client 2.下一步 3.接受协议,下一步,大哥求你了,下次直接将这个默认下一步吧,嘿嘿 4.选择安装位置,下一步 5.配置端口号,默认9090和 ...

  7. poj 1191 矩形块的划分

    思路:黑书的例题 #include<iostream> #include<cstring> #include<algorithm> #include<cmat ...

  8. hdu 4411 最小费用流

    思路:主要就是要把一个每个城市拆为两个点,建一条容量为1,费用为-inf的边,保证每个城市都会被遍历. /*最小费用最大流*/ #include<iostream> #include< ...

  9. JAVA备忘录

    本文主要是记录一下JAVA: 1.Arrays.的几个用法: fill:数组全部置一个数 sort:排序 binarySearch:二分查找 2.Map的用法: Map<Integer,Inte ...

  10. JQuery事件与应用(一)

    来源:http://www.imooc.com/learn/11     jQuery基础课程 一.使用bind()方法绑定元素的事件 功能: 在ready()事件中绑定一个按钮的单击事件,使用bin ...