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

Setting a Generic Control as a TargetType to a Style in Xaml.

$
0
0

I'm trying to define a tag in XAML and setting the TargetType property to a control that is a generic control. What is the proper syntax for that? There is probably some simple syntax, I'm just not sure what it is.

This is the syntax I'm trying but I'm getting a null reference exception:

<Style x:Key="PickerColumnStyle" TargetType="{x:Type controls:ExtendedPicker(x:String)}" >
                <Setter Property="HorizontalOptions" Value="FillAndExpand" />
                <Setter Property="TextColor" Value="#FFFFFF" />
            </Style>

Viewing all articles
Browse latest Browse all 58056

Trending Articles



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