The below code can be used for Android
Xamarin.Forms.Forms.ViewInitialized += (object sender, Xamarin.Forms.ViewInitializedEventArgs e) =>
{
if ((e != null) && (e.NativeView != null) && (e.View != null) && (!string.IsNullOrWhiteSpace(e.View.StyleId)))
{
e.NativeView.ContentDescription = e.View.StyleId;
}
};
and this for iOS
Forms.ViewInitialized += (object sender, ViewInitializedEventArgs e) =>
{
if ((e != null) && (e.NativeView != null) && (e.View != null) && (!string.IsNullOrWhiteSpace(e.View.StyleId)))
{
e.NativeView.AccessibilityIdentifier = e.View.StyleId;
}
};
What is the equivalent script for Windows phone? or Will StyleId automatically assigned to each of the UI element(Name)? Need help on this