一.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. 进程控制之fork函数

    一个现有进程可以调用fork函数创建一个新进程. #include <unistd.h> pid_t fork( void ); 返回值:子进程中返回0,父进程中返回子进程ID,出错返回- ...

  2. MapReduce原理及其主要实现平台分析

    原文:http://www.infotech.ac.cn/article/2012/1003-3513-28-2-60.html MapReduce原理及其主要实现平台分析 亢丽芸, 王效岳, 白如江 ...

  3. java和C#中 定义变量,加一个小括号是什么意思。。。

    在群里灌水发现,有人这样定义字符串,感觉很好奇..又问了群友,群友说这样定义没问题.. String strtemp = ("test"); 我自己试了下,java和C#都可以,C ...

  4. Windows OpenVPN Client and tls-auth

    The official Windows OpenVPN client does not seem to work properly with the tls-auth option if a key ...

  5. Java Collection集合接口

    Collection接口是赖以集合框架建立的基础.它声明的所有集合的核心方法.这些方法概括于下表中. 因为所有集合都要实现Collection,熟悉它的方法是对框架有清晰的认识很有必要.这几种方法都可 ...

  6. Callable--创建有返回值的线程

    转自:JAVA 笔记 Callable 与 FutureTask:有返回值的多线程 常用的Thread类在run方法执行完之后是没有返回值的,要实现子线程完成任务后返回值给主线程需要借助第三方转存.C ...

  7. UIImage的简单用法和实际操作

    png,pdf不需要添加后缀名 jpg添加后缀名 存储 UIImagejpg contentMode属性 这个属性是用来设置图片的显示方式,如居中.居右,是否缩放等,有以下几个常量可供设定: UIVi ...

  8. iis8 默认不支持svc解决方法

    最近在IIS8中发布WCF服务应用时,发现IIS8不支持WCF服务svc请求,后来发现IIS8缺少对WCF服务的Managed Handler,按照以下步骤添加后,IIS8即支持WCF服务. 1. 首 ...

  9. Codeforces Round #200 (Div. 1) D Water Tree 树链剖分 or dfs序

    Water Tree 给出一棵树,有三种操作: 1 x:把以x为子树的节点全部置为1 2 x:把x以及他的所有祖先全部置为0 3 x:询问节点x的值 分析: 昨晚看完题,马上想到直接树链剖分,在记录时 ...

  10. AI-->从新建文档开始说起,串联相关色彩知识

    相关概念:AI.PS.矢量图形 AI:  Adobe Illustrator 是Adobe公司出品的一款用于矢量图形设计的软件. 矢量图形:用通俗的大白话讲与分辨率无关,可以任意的放大缩小而不会失真图 ...