小编Lal*_*ala的帖子

Xamarin表单按钮OnClick

我目前在我的项目中有一个ContentPage.cs,使用Xamarin Forms作为工作环境,我只是想知道我是否能够为代码末尾的按钮添加OnClick.非常感谢任何帮助.提前致谢.

使用系统;

使用Xamarin.Forms;

namespace DebuggerTestAndroidIOS {public class VSParameters:ContentPage {public VSParameters(){Content = new StackLayout {Children = {new StackLayout {BackgroundColor = Color.FromHex("0ADF80"),Children = {

                        new Label { Text = PatientInformation.PatientName,
                            TextColor= Color.White,
                            FontSize = 25
                        } 
                    }
                },

                //Patient Information Stack Layout
                new StackLayout{ Orientation = StackOrientation.Horizontal, 
                    Children = {

                        //Patient Image, sex and date of birth
                        new StackLayout{Orientation = StackOrientation.Vertical, Padding = new Thickness (30, 0, 0, 0),
                            Children = {

                                new Image {Source = "UserMale.png"},
                                new Label {Text = …
Run Code Online (Sandbox Code Playgroud)

c# button xamarin xamarin.forms

2
推荐指数
1
解决办法
9431
查看次数

标签 统计

button ×1

c# ×1

xamarin ×1

xamarin.forms ×1