Untitled
unknown
plain_text
a year ago
1.1 kB
9
Indexable
using System;
using System.Runtime.CompilerServices;
using Microsoft.Maui.Controls;
namespace Module01Activity02
{
public partial class MainPage : ContentPage
{
public string Firstname { get; set; }
public Color ColorRed { get; set; }
public MainPage()
{
InitializeComponent();
Firstname = "Hello, MAUI!";
ColorRed = Colors.Blue;
this.BindingContext = this;
}
private void OnChangedLabelName(object sender, EventArgs e)
{
this.Resources["StaticUsername"] = "Peter Butter";
}
private void OnChangeLabelNameDynamic(object sender, EventArgs e)
{
this.Resources["DynamicUsername"] = "Mr. Juan Dela Cruz";
}
private void OnChangeBackgroundColor(object sender, EventArgs e)
{
this.Resources["LocalBackgroundColor"] = Colors.Beige;
}
private void OnChangeBoxViewColor(object sender, EventArgs e)
{
this.Resources["DynamicBoxColor"] = Colors.Red;
}
}
}
Editor is loading...
Leave a Comment