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

Can a Style be added to a custom renderer?

$
0
0

I have a button renderer to show a gradient color and I was wondering if it was possible to have a style on it like below?

<ContentPage.Resources>
        <ResourceDictionary>
            <Style x:Key="ButtonStyle" TargetType="local:GradientButton">
                <Setter Property="TextColor" Value="White"/>
                <Setter Property="BackgroundColor" Value="Silver" />
            </Style>
        </ResourceDictionary>
    </ContentPage.Resources>

Viewing all articles
Browse latest Browse all 75885

Trending Articles



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