1

I am trying to add the toogle switch in windows phone application, I had searched in Internet also but didn't find the solution for using toogle switch. I followed the example as shown below. but it's showing some error , and saying toogle switch did't exist. Can anybody suggest what is happening here and a better way to use toogle switch. The Code which I used is from C# corner, and is like this.

  xmlns:tool="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" // 

  <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">


            <tool:ToggleSwitch x:Name="tglSwitch" 
                               Header="wifi" 
                               Checked="tglSwitch_Checked" 
                               Unchecked="tglSwitch_Unchecked"/>
        </Grid>
4

1 回答 1

2

ToggleSwitch是一个可以在Windows Phone Toolkit库中找到的控件。

您可以通过 NuGet 轻松将该库添加到您的项目中:右键单击您的项目 ->“管理 NuGet 包”,然后搜索“WPtoolkit”。

于 2013-10-02T12:30:08.100 回答