简体   繁体   English

Windows Phone 8中具有开/关行为的用户控件

[英]User control with on/off behavior in Windows Phone 8

I'm developing a simple Windows Phone 8 application and I need a user control to activate/deactivate a generic option. 我正在开发一个简单的Windows Phone 8应用程序,并且需要一个用户控件来激活/停用通用选项。 In other words, I'm looking for something link the Proxy field in this image . 换句话说,我正在寻找链接此图片中 Proxy字段的内容。

I tried using System.Windows.Controls.Slider, but it allows only double value and I can't find a way to configure it to a on/off mode. 我尝试使用System.Windows.Controls.Slider,但是它只允许使用double值,我找不到将其配置为on / off模式的方法。 Which user control i should use? 我应该使用哪个用户控件?

I believe you are wanting the ToggleSwitch control http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.toggleswitch 我相信您想要ToggleSwitch控件http://msdn.microsoft.com/zh-cn/library/windows/apps/windows.ui.xaml.controls.toggleswitch

The toggle switch can be found as part of the later versions of the Phone SDK http://phone.codeplex.com/ 拨动开关可以在Phone SDK的更高版本http://phone.codeplex.com/中找到。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM