Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/design-patterns/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在另一页中调整toggleswitch时,如何将主页中的文本从大写转换为小写_C#_Textblock_Windows Phone - Fatal编程技术网

C# 在另一页中调整toggleswitch时,如何将主页中的文本从大写转换为小写

C# 在另一页中调整toggleswitch时,如何将主页中的文本从大写转换为小写,c#,textblock,windows-phone,C#,Textblock,Windows Phone,当在另一个示例页面中单击切换开关时,如何将textblock文本在主页中从上到下转换?通过页面,我猜测另一个类,我也猜测这是winForms,要做到这一点,您可以让包含文本的类侦听一个事件,然后转换其内容 范例 //add this where you start your form page2.radiobutton.checkedChanged += onToggle; //this function is what listens for the change private void

当在另一个示例页面中单击
切换开关时,如何将
textblock
文本在主页中从上到下转换?

通过页面,我猜测另一个类,我也猜测这是winForms,要做到这一点,您可以让包含文本的类侦听一个事件,然后转换其内容

范例

//add this where you start your form
page2.radiobutton.checkedChanged += onToggle;

//this function is what listens for the change
private void onToggle(object sender, EventArgs e)
{
      if(page2.radiobutton.Checked)
           textarea.text = textarea.text.tolower();
      else
            textarea.text = textarea.text.toupper();
}

由于它被标记为windows phone 7问题,我怀疑他是否需要winforms,但逻辑是一样的。噢,哈哈,我没有注意到,下次我会注意,我只是看了问题,没有注意到标记。但是是的,就像你说的一样