与众不同windows phone (2) Control(控件)

介绍

与众不同 windows phone 7.5 (sdk 7.1) 之控件

Panorama - 全景图控件

Pivot - 枢轴控件

Map - bing 地图控件

WebBrowser - 内嵌浏览器控件

Other - 其他可用控件

示例

1、Panorama 的 Demo

Panorama.xaml

<phone:PhoneApplicationPage
    x:Class="Demo.Controls.Panorama"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-

namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False"

    xmlns:sys="clr-namespace:System;assembly=mscorlib"> 

    <Grid x:Name="LayoutRoot">
        <!--
            Panorama - 全景图控件
                Title - Panorama 的标题
                Background - Panorama 的背景
        -->
        <controls:Panorama x:Name="panorama" Title="Title"> 

            <controls:Panorama.Background>
                <ImageBrush ImageSource="/Controls/Assets/diandian.jpg"/>
            </controls:Panorama.Background> 

            <!--
                PanoramaItem - Panorama 的项
                    Header - PanoramaItem 的标题
                    Orientation - PanoramaItem 中的内容的排列方向(Vertical 或 Horizontal),默认值为 Vertical
            -->
            <controls:PanoramaItem Header="Item 01">
                <Grid>
                    <StackPanel>
                        <TextBlock Text="我是文本,太长了的话会自动换行" Style="{StaticResource PhoneTextLargeStyle}" TextWrapping="Wrap"/>
                        <TextBlock Text="我是文本,太长了的话不会自动换行" Style="{StaticResource PhoneTextLargeStyle}" TextWrapping="NoWrap"/>
                    </StackPanel>
                </Grid>
            </controls:PanoramaItem> 

            <controls:PanoramaItem Header="Item 02" Orientation="Horizontal">
                <Grid>
                    <Border BorderBrush="{StaticResource PhoneForegroundBrush}"
                            BorderThickness="{StaticResource PhoneBorderThickness}"
                            Background="#80808080">
                        <TextBlock Text="我是一段文本,我的显示区域很宽很宽"
                                   Style="{StaticResource PhoneTextExtraLargeStyle}"
                                   HorizontalAlignment="Center" VerticalAlignment="Center" >
                        </TextBlock> 

                    </Border>
                </Grid>
            </controls:PanoramaItem> 

            <!--
                如果需要 PanoramaItem 中的内容支持左右拖动的话,需要将 Orientation 设置为 Horizontal
                以下 PanoramaItem 中的内容可以左右拖动,其中的 ListBox 可上下拖动
            -->
            <controls:PanoramaItem Header="Item 03" Orientation="Horizontal">
                <StackPanel Orientation="Horizontal">
                    <ListBox FontSize="{StaticResource PhoneFontSizeLarge}" Width="480">
                        <sys:String>a</sys:String>
                        <sys:String>b</sys:String>
                        <sys:String>c</sys:String>
                        <sys:String>d</sys:String>
                        <sys:String>e</sys:String>
                        <sys:String>f</sys:String>
                        <sys:String>g</sys:String>
                        <sys:String>h</sys:String>
                        <sys:String>i</sys:String>
                        <sys:String>j</sys:String>
                        <sys:String>k</sys:String>
                        <sys:String>l</sys:String>
                        <sys:String>m</sys:String>
                        <sys:String>n</sys:String>
                        <sys:String>o</sys:String>
                        <sys:String>p</sys:String>
                        <sys:String>q</sys:String>
                        <sys:String>r</sys:String>
                    </ListBox>
                    <TextBlock Text="webabcd" />
                </StackPanel>
            </controls:PanoramaItem> 

        </controls:Panorama>
    </Grid> 

</phone:PhoneApplicationPage>

以上是小编为您精心准备的的内容,在的博客、问答、公众号、人物、课程等栏目也有的相关内容,欢迎继续使用右上角搜索按钮进行搜索windows
, 控件
, webbrowser
, phone
, 全景
示例
list control控件用法、mfc tabcontrol控件、c tabcontrol控件、tabcontrol控件、tab control控件,以便于您获取更多的相关知识。

时间: 2024-09-13 12:23:28

与众不同windows phone (2) Control(控件)的相关文章

仿listBox写了一个Control控件为item的列表集合

  仿listBox写了一个Control控件为item的列表集合,由于最近做个项目要用,微软提供的控件实现起来不行,但自己写了一个,效果如下: 代码   1using System;  2using System.Collections.Generic;  3using System.ComponentModel;  4using System.Data;  5using System.Drawing;  6using System.Text;  7using System.Text.Regu

在VC++中使用Tab Control控件

系统环境:Windows 7软件环境:Visual Studio 2008 SP1本次目的:在模态或非模态对话框中使用Tab Control控件,及引申在单/多文档中使用   查阅MSDN文档,对于创建Tab Control控件,MSDN上说明如下: To use CTabCtrl directly in a dialog box 1.     In the dialog editor, add a Tab Control to your dialog template resource. Sp

64位 atl 控件注册-64Bit atl control 控件注册问题

问题描述 64Bit atl control 控件注册问题 目前我编译了一个atl control控件,名字暂且命名为mydll.dll,mydll.dll32bit 版本运行正常,然后由于内存问题,现在需要编译64bit的,mydll.dll相关的一些库都已经编译成64bit了,然后 在 c://windows//system32 regsvr32 .../.../mydll.dll注册,系统提示注册成功,但是用vs2010新建winform程序,.dll可以引用(工程下手动添加),但是 to

VC中使用Tab Control控件切换窗体

1. 新建一个MFC工程,取名xyTabControl,选择Dialog based,然后Finish. 2. 删除对话 框上默认添加的三个控件.添加Tab Control控件并在Property属性中设置ID为IDC_TAB1,添加变量 m_tabctrl,类型为CTabCtrl. 3. 在对话框的初始化函数OnInitDialog里面添加如下代 码: m_tabctrl.InsertItem(0,"memo0"); //添加参数一选项卡 m_tabctrl.InsertItem(1

一起学Windows Phone7开发(十三.控件)

Windows Phone7提供了丰富的silverlight控件,但是和silverlight又有一定的区别的,其中有很多控件都是不可用的,另外有些控件即使可以用,但有一些属性也是不可用的.后面将一一介绍各个控件的基本使用方法和一些特别的属性用法. 这里两个列表说明了可用和不用控件. 可用控件: 开发(十三.控件)-windows phone">不可用控件: 不过这些控件随然不能用了,但是有一些还是可以用其他控件来替代的,比如: Label:被TextBlock取代了. ScrollBa

C++中MFC Tab Control控件的使用详解

  这篇文章主要介绍了C++中MFC Tab Control控件的使用详解的相关资料,需要的朋友可以参考下 1. 新建一个MFC工程, 取名MyTab, 选择Dialog based, 然后Finish. 2. 删除对话框上默认添加的三个控件. 添加Tab Control控件并在Property属性中设置ID为IDC_TABTEST 在More Styles里勾上Bottom. 调速尺寸使其布满整个对话框, 我这边Tab Control的尺寸最后为164X203. 在ClassWizard为其添

在windows窗体上滚动条控件的起始位置是怎么自定义的?

问题描述 在windows窗体上滚动条控件的起始位置是怎么自定义的? 在windows窗体上滚动条控件的起始位置是怎么自定义的?怎么修改窗口上滚动条的布局,在上面插入快捷定位的按钮呢? 解决方案 Win32窗体的所有控件都认为是窗体,所以创建一个自定义的控件跟创建一个win32的窗体是相似的 参考此篇文章http://www.codeproject.com/KB/miscctrl/custbutton001.aspx 先通过RegisterClassEx注册一个window class,然后就在

图片-mfc如何判断picture control控件是否为空

问题描述 mfc如何判断picture control控件是否为空 mfc如何判断picture control控件是否为空,就是有没有图片 解决方案 没办法判断,你必须用GetPixel获取像素点,而且可能需要遍历整个客户区才知道. 为此,最好你自己加上一个bool值,如果你绘图了,就设置它,这样判断就容易了. 解决方案二: 这个你需要自己设置一个flag标志去判断了. 解决方案三: 最好是你设置图片的时候用一个标志位来控制,这样最简单u有效. 解决方案四: 还是添加一个flag标志比较简单

怎么把windows中的listview控件的图标搬到第二列?

问题描述 怎么把windows中的listview控件的图标搬到第二列? 怎么把windows中的listview控件的图标搬到第二列?怎么在第二列显示listview的图标呢? 解决方案 这个需要子类化窗体消息,然后通过窗体重绘去实现了.