1.

<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions> <!--TitlePanel 包含应用程序的名称和页标题-->
<StackPanel Grid.Row="" Margin="12,17,0,28">
<TextBlock Text="我的应用程序" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock Text="Slider" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel> <!--ContentPanel - 在此处放置其他内容-->
<Grid x:Name="ContentPanel" Grid.Row="" Margin="12,0,12,0">
<TextBlock HorizontalAlignment="Left" Height="" Margin="26,14,0,0" TextWrapping="Wrap" Text="红色" VerticalAlignment="Top" Width=""/>
<TextBlock HorizontalAlignment="Left" Height="" Margin="193,14,0,0" TextWrapping="Wrap" Text="绿色" VerticalAlignment="Top" Width=""/>
<TextBlock HorizontalAlignment="Left" Height="" Margin="341,14,0,0" TextWrapping="Wrap" Text="蓝色" VerticalAlignment="Top" Width=""/>
<Slider x:Name="RedSilder" HorizontalAlignment="Left" Height="" Margin="10,72,0,0" VerticalAlignment="Top" Width="" Maximum=""/>
<Slider x:Name="GreenSlider" HorizontalAlignment="Left" Height="" Margin="152,72,0,0" VerticalAlignment="Top" Width="" Maximum=""/>
<Slider x:Name="BlueSlider" HorizontalAlignment="Left" Height="" Margin="294,72,0,0" VerticalAlignment="Top" Width="" Maximum=""/>
<TextBlock x:Name="RedText" HorizontalAlignment="Left" Height="" Margin="26,159,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width=""/>
<TextBlock x:Name="GreenText" HorizontalAlignment="Left" Height="" Margin="167,159,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width=""/>
<TextBlock x:Name="BlueText" HorizontalAlignment="Left" Height="" Margin="312,159,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width=""/>
<Ellipse x:Name="ColorEll" Fill="#FFF4F4F5" HorizontalAlignment="Left" Height="" Margin="90,274,0,0" Stroke="Black" VerticalAlignment="Top" Width=""/> </Grid>
</Grid>

2.

namespace PhoneApp1
{
public partial class Slider : PhoneApplicationPage
{
public Slider()
{
InitializeComponent();
RedSilder.Value = ;
GreenSlider.Value = ;
BlueSlider.Value = ;
RedSilder.ValueChanged += RedSilder_ValueChanged;
GreenSlider.ValueChanged += GreenSlider_ValueChanged;
BlueSlider.ValueChanged += BlueSlider_ValueChanged;
BindColor();
} void BlueSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
BindColor();
} void GreenSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
BindColor();
} void RedSilder_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
BindColor();
} private void BindColor()
{
Color c = Color.FromArgb(, (byte)RedSilder.Value, (byte)GreenSlider.Value, (byte)BlueSlider.Value);
ColorEll.Fill = new SolidColorBrush(c);
RedText.Text = c.R.ToString("X2");
GreenText.Text =c.G.ToString("X2");
BlueText.Text = c.B.ToString("X2");
} }
}

WP8滑动条(Slider)控件的使用的更多相关文章

  1. VC++ 中滑动条(slider控件)使用 [转+补充]

    滑动控件slider是Windows中最常用的控件之一.一般而言它是由一个滑动条,一个滑块和可选的刻度组成,用户可以通过移动滑块在相应的控件中显示对应的值.通常,在滑动控件附近一定有标签控件或编辑框控 ...

  2. 示例:WPF中Slider控件封装的缓冲播放进度条控件

    原文:示例:WPF中Slider控件封装的缓冲播放进度条控件 一.目的:模仿播放器播放进度条,支持缓冲任务功能 二.进度: 实现类似播放器中带缓存的播放样式(播放区域.缓冲区域.全部区域等样式) 实现 ...

  3. [WPF]Slider控件常用方法

    WPF的Slider控件继承自RangeBase类型,同继承自RangeBase的控件还有ProgressBar和ScrollBar,这类控件都是在一定数值范围内表示一个值的用途. 首先注意而Rang ...

  4. Unity3D 之UGUI 滑动条(Slider)

    这里来讲解下UGUI 滑动条(Slider)的用法 控件下面有三个游戏对象 Background -->背景 Fill Area --> 前景区域 Handle Slide Area -- ...

  5. 【jQuery UI 1.8 The User Interface Library for jQuery】.学习笔记.7.Slider控件

    默认slider的安装启用 为slider自定义风格 修改配置选项 创建一个垂直的slider 设置最大最小值,和默认值 启用多个 手柄 和 范围 slider内置的回调事件 slider的方法 这个 ...

  6. Cocos2d-X中的Slider控件

    Slider控件事实上就是滑块控件.经常使用于音乐中的音量控制,在Windows编程中开发音乐播放器就须要用到滑块控件控制音量 首先在project文件夹下的Resource文件夹中放 在Skider ...

  7. SilverLight:基础控件使用(6)-Slider控件

    ylbtech-SilverLight-Basic-Control:基础控件使用(6)-Slider控件 Slider 控件 Slider 控件的 ValueChanged 事件 1.A,返回顶部 S ...

  8. anjularjs slider控件替代方案

    做项目需要一个slider控件,找了很久没有找到合适的指令集,无意间看到可以直接用range替代,不过样式有点丑. <label> <input type="range&q ...

  9. 用uGUI开发自定义Toggle Slider控件

    一.前言 写完<Unity4.6新UI系统初探>后,我模仿手机上的UI分别用uGui和NGUI做了一个仅用作演示的ToggleSlider,我认为这个小小的控件已能体现自定义控件的开发过程 ...

  10. WP8.1 Study2:MapControl控件的应用

    总的界面布局如下:

随机推荐

  1. Centos6.5安装mysql5.7详解

    最近在linux上面安装mysql5.7上真是遇到了很多坑,真是让人头疼,在这里跟大家简单分享一下流程跟注意的地方. 1.查看linux版本是6.5 cat /etc/redhat-release 2 ...

  2. HDU1754I Hate It(线段树)

    I Hate It Time Limit: 9000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total S ...

  3. 【MySQL笔记】Excel数据导入Mysql数据库的实现方法——Navicat

    很多公司尤其有点年头的公司,财务业务部门的各种表单都是excel来做的表格,随着互联网的发展各种业务流程都电子化流程化了,再在茫茫多的文档中去查找某一个年份月份的报告是件相当枯燥的事,所以都在想办法将 ...

  4. iOS开发技巧——关闭Autoresizing开启Autolayout

    在使用Autolayout时有时候会有莫名其妙的错误,是因为UIView是默认同时开启Autoresizing和Autolayout的. 但我们的Autolayout很容易和Autoresizing冲 ...

  5. dwz中弹出的窗口页面如何获取前页面(点击按钮的页面)的元素???

    在页面A.jsp中点击一个按钮,使用$.pdialog.open()方法弹出b.jsp页面(对话框窗口),我要在b.jsp中选中值然后关闭窗口(b.jsp)返回值给A.jsp~ =========== ...

  6. git新建和删除远程分支

    创建远程分支: 新建本地分支 git checkout -b branch_name 推送到远程分支,分支名字和本地分支名字相同 git push origin branch_name:branch_ ...

  7. 基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境:2.搭建环境-2.8. 配置用户环境

    2.8.配置用户环境 2.8.1. 配置节点RAC1 配置grid用户环境变量: cat >> /home/grid/.bash_profile <<EOF export TM ...

  8. centos7修改yum下载源为阿里源

    在国内很多yum源不好用,所以改成国内的源很有必要 首先,切换到yum源目录 cd /etc/yum.repos.d 备份一下 sudo mv CentOS-Base.repo CentOS-Base ...

  9. javascript快速入门20--Cookie

    Cookie 基础知识 我们已经知道,在 document 对象中有一个 cookie 属性.但是 Cookie 又是什么?“某些 Web 站点在您的硬盘上用很小的文本文件存储了一些信息,这些文件就称 ...

  10. [Python爬虫] 之二十六:Selenium +phantomjs 利用 pyquery抓取智能电视网站图片信息

    一.介绍 本例子用Selenium +phantomjs爬取智能电视网站(http://www.tvhome.com/news/)的资讯信息,输入给定关键字抓取图片信息. 给定关键字:数字:融合:电视 ...