void Handle_Clicked(object sender, System.EventArgs e) { Syncfusion.XForms.Buttons.SfButton button = (sender as Syncfusion.XForms.Buttons.SfButton); if (button == centerAlignButton) { textStack.HorizontalOptions = LayoutOptions.Center; hellowWorld.HorizontalTextAlignment = TextAlignment.Center; centerAlignButton.BackgroundColor = Color.LightGray; leftAlignButton.BackgroundColor = Color.Transparent; rightAlignButton.BackgroundColor = Color.Transparent; } else if (button == leftAlignButton) { textStack.HorizontalOptions = LayoutOptions.Start; hellowWorld.HorizontalTextAlignment = TextAlignment.Start; centerAlignButton.BackgroundColor = Color.Transparent; leftAlignButton.BackgroundColor = Color.LightGray; rightAlignButton.BackgroundColor = Color.Transparent; } else if (button == rightAlignButton) { textStack.HorizontalOptions = LayoutOptions.End; hellowWorld.HorizontalTextAlignment = TextAlignment.End; centerAlignButton.BackgroundColor = Color.Transparent; leftAlignButton.BackgroundColor = Color.Transparent; rightAlignButton.BackgroundColor = Color.LightGray; } }
private void FontButton_Clicked(object sender, System.EventArgs e) { Syncfusion.XForms.Buttons.SfButton button = (sender as Syncfusion.XForms.Buttons.SfButton); if (button == boldButton || button == italicButton) { if (boldButton.IsChecked && italicButton.IsChecked) { hellowWorld.FontAttributes = FontAttributes.Bold | FontAttributes.Italic; } else if (boldButton.IsChecked) { hellowWorld.FontAttributes = FontAttributes.Bold; } else if (italicButton.IsChecked) { hellowWorld.FontAttributes = FontAttributes.Italic; } else { hellowWorld.FontAttributes = FontAttributes.None; } } else if (button == underlineButton) { underlineBoxView.IsVisible = underlineButton.IsChecked; } }