Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

How to assign the StyleId for windows phone UI

$
0
0

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


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>