我目前在我的项目中有一个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)