简体   繁体   English

如果选中了Xamarin Android C#,如何将复选框重定向到应用程序中的另一个页面?

[英]How do I redirect a checkbox to another page in my app if checked Xamarin Android C#?

I am making an android app using C# in Xamarin studio. 我正在Xamarin Studio中使用C#制作一个android应用。 I managed to make the checkboxes and among other things. 我设法使复选框等。 I need to know what code I would need to use make a the checkbox go to redirect to another page if checked. 我需要知道使用什么代码,如果选中该复选框,将复选框转到重定向到另一个页面。 I am new to programming so I am sure this is an easy question but I am having trouble. 我是编程新手,所以我敢肯定这是一个简单的问题,但我遇到了麻烦。

This is what you need to do 这就是你要做的

private void MainPage_Load(object sender, EventArgs e)
{
    checkBox1.CheckedChanged += checkBox1_CheckedChanged;
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
    if (checkBox1.Checked)
    {
        // your code to go to the other page.
    }
}

暂无
暂无

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

相关问题 将Checkbox文本数据传递到Xamarin C#Android中单独活动页面上的另一个Checkbox中? - Pass Checkbox text data into another checkbox on a seperate activity page in Xamarin C# Android? Xamarin Forms:如何从另一个 c# 类导航到另一个页面 - Xamarin Forms : How do i navigate to another page from another c# class 如何在不关闭 C# xamarin forms android 的应用程序的情况下关闭侧边栏? - How could I close my sidebar without closing my app in C# xamarin forms android? 在 c# Xamarin 表单中完成 aync 调用后,如何转换到新页面? - How do I transition to a new page after my aync call is complete in c# Xamarin form? 如何将Windows Phone C#应用程序重定向到设置页? - How to redirect my Windows Phone C# app to a setting page? How do I start a page with a function always in C# xamarin forms android? - How do I start a page with a function always in C# xamarin forms android? Xamarin/XAML/C# - 如何设置我的 App.Current.Properties 字典? - Xamarin/XAML/C# - How do I set up my App.Current.Properties dictionary? C#如何检查另一个表单上是否选中了复选框? - C# How can I check to see if a checkbox is checked on another form? C#Selenium Webdriver findelement如何在页面上选中复选框 - C# Selenium webdriver findelement how to checked checkbox on page 如何使用 Xamarin.Android 中的 C# 找到所选图像的文件路径? - How do I find the file path to my selected image using C# in Xamarin.Android?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM