"Unhandled Exception:
System.InvalidCastException: Specified cast is not valid."
private void SwitchCell_OnChanged(object sender, ToggledEventArgs e)
{
if (tæ.On.Equals(true))
{
abcde.SetValue(IsVisibleProperty, true);
//abcde.SetValue(IsVisibleProperty, false);
}
else
{
abcde.SetValue(IsVisibleProperty, false); //xamarin forms is marking this code, and informing me that it causes the error, but how do I make it work, without the application crashing? (BTW, "abcde" is a imagecell that has the x:name="abcde" in the xaml code.
}
}