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

Can't we directly use add ControlTemplate in element style?

$
0
0

Like this:

<Label>
    <Label.Style>
               <Setter Property="ControlTemplate">
                       <ControlTemplate >
                                  <Label Text="{Binding No}" HorizontalOptions="Fill"/>
                                  <Label Text="." HorizontalOptions="Fill"/>
                       </ControlTemplate>
               </Setter>
     </Label.Style>
</Label>

It will throw :An item with the same key has already been added. Key: Xamarin.Forms.Xaml.XmlName


Viewing all articles
Browse latest Browse all 81910

Trending Articles



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