WP8滑动条(Slider)控件的使用
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)控件的使用的更多相关文章
- VC++ 中滑动条(slider控件)使用 [转+补充]
滑动控件slider是Windows中最常用的控件之一.一般而言它是由一个滑动条,一个滑块和可选的刻度组成,用户可以通过移动滑块在相应的控件中显示对应的值.通常,在滑动控件附近一定有标签控件或编辑框控 ...
- 示例:WPF中Slider控件封装的缓冲播放进度条控件
原文:示例:WPF中Slider控件封装的缓冲播放进度条控件 一.目的:模仿播放器播放进度条,支持缓冲任务功能 二.进度: 实现类似播放器中带缓存的播放样式(播放区域.缓冲区域.全部区域等样式) 实现 ...
- [WPF]Slider控件常用方法
WPF的Slider控件继承自RangeBase类型,同继承自RangeBase的控件还有ProgressBar和ScrollBar,这类控件都是在一定数值范围内表示一个值的用途. 首先注意而Rang ...
- Unity3D 之UGUI 滑动条(Slider)
这里来讲解下UGUI 滑动条(Slider)的用法 控件下面有三个游戏对象 Background -->背景 Fill Area --> 前景区域 Handle Slide Area -- ...
- 【jQuery UI 1.8 The User Interface Library for jQuery】.学习笔记.7.Slider控件
默认slider的安装启用 为slider自定义风格 修改配置选项 创建一个垂直的slider 设置最大最小值,和默认值 启用多个 手柄 和 范围 slider内置的回调事件 slider的方法 这个 ...
- Cocos2d-X中的Slider控件
Slider控件事实上就是滑块控件.经常使用于音乐中的音量控制,在Windows编程中开发音乐播放器就须要用到滑块控件控制音量 首先在project文件夹下的Resource文件夹中放 在Skider ...
- SilverLight:基础控件使用(6)-Slider控件
ylbtech-SilverLight-Basic-Control:基础控件使用(6)-Slider控件 Slider 控件 Slider 控件的 ValueChanged 事件 1.A,返回顶部 S ...
- anjularjs slider控件替代方案
做项目需要一个slider控件,找了很久没有找到合适的指令集,无意间看到可以直接用range替代,不过样式有点丑. <label> <input type="range&q ...
- 用uGUI开发自定义Toggle Slider控件
一.前言 写完<Unity4.6新UI系统初探>后,我模仿手机上的UI分别用uGui和NGUI做了一个仅用作演示的ToggleSlider,我认为这个小小的控件已能体现自定义控件的开发过程 ...
- WP8.1 Study2:MapControl控件的应用
总的界面布局如下:
随机推荐
- Codeforces 626 C. Block Towers-二分 (8VC Venture Cup 2016-Elimination Round)
C. Block Towers time limit per test 2 seconds memory limit per test 256 megabytes input standard ...
- CF 1003C Intense Heat【前缀和/精度/双层暴力枚举】
The heat during the last few days has been really intense. Scientists from all over the Berland stud ...
- while(scanf("%d",&n)!=EOF)
scanf的返回值由后面的参数决定 scanf("%d%d", &a, &b); 如果a和b都被成功读入,那么scanf的返回值就是2 如果只有a被成功读入,返回值 ...
- jmeter 线程组之间的参数传递
http://www.cnblogs.com/wnfindbug/p/5817277.html 场景测试中,一次登录后做多个接口的操作,然后登录后的uid需要关联传递给其他接口发送请求的时候使用. 1 ...
- Android开机过程
韩梦飞沙 韩亚飞 313134555@qq.com yue31313 han_meng_fei_sha Android开机过程 BootLoder引导,然后加载Linux内核. 0号进程ini ...
- AtCoder - 2567 RGB Sequence
Problem Statement There are N squares arranged in a row. The squares are numbered 1, 2, …, N, from l ...
- HDOJ 4903 The only survival
Discription: There is an old country and the king fell in love with a devil. The devil always ask th ...
- 【枚举】【贪心】 Codeforces Round #398 (Div. 2) B. The Queue
卡题意……妈的智障 一个人的服务时间完整包含在整个工作时间以内. 显然,如果有空档的时间,并且能再下班之前完结,那么直接输出即可,显然取最左侧的空档最优. 如果没有的话,就要考虑“挤掉”某个人,就是在 ...
- [美团 CodeM 初赛 Round A]数列互质
题目大意: 给出一个长度为n的数列a1,a2,a3,...,an,以及m组询问(li,ri,ki),求区间[li,ri]中有多少数在该区间中的出现次数与ki互质. 思路: 莫队. f[i]记录数字i出 ...
- new beginning
新的一年开始. BLOG搬到CNBLOG. 往事太匆匆, 一切终成风. 他日再相逢, 依旧笑语中. -----AT.Y