/CarrsuelTestClick.cs Secret
Last active
March 21, 2021 09:40
this is the function that manages the click
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async void Button_Clicked(object sender, EventArgs e) | |
{ | |
var carousel = this.Content.FindByName<CarouselView>("MyCarrousel"); | |
var listOfControls = carousel.VisibleViews; | |
var gridControl = listOfControls[0] as Grid; | |
var controlsInsideGrid = gridControl.Children; | |
var labelName = controlsInsideGrid[1] as Label; | |
var button = controlsInsideGrid[2] as Button; | |
button.BackgroundColor = Color.Blue; | |
await DisplayAlert("Message", $"The displayed color is {labelName.Text}", "Ok"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment