XamarinFormsPinView icon indicating copy to clipboard operation
XamarinFormsPinView copied to clipboard

Its possible to change the style

Open mfandre opened this issue 7 years ago • 8 comments

How I can change the color or increase the button sizes?

mfandre avatar Oct 05 '18 21:10 mfandre

2.1.0-pre1 supports color styling. Unfortunately, there is no ability to change button sizes atm.

UPD: You can try Scale property, but I'm not sure if it works.

lassana avatar Oct 07 '18 10:10 lassana

@lassana The scale worked... But I want more control like:

  • Rowspacing
  • Colspacing
  • Button Circle or Square
  • Text Size

At this version its possible to change the border size of the rounded buttons?

mfandre avatar Oct 07 '18 13:10 mfandre

Button background and border (size) are good too.

mfandre avatar Oct 08 '18 15:10 mfandre

Thanks, I put it into the TODO list

lassana avatar Oct 08 '18 16:10 lassana

@lassana The scale worked... But I want more control like:

* Rowspacing

* Colspacing

* Button Circle or Square

* Text Size

At this version its possible to change the border size of the rounded buttons?

@mfandre may know how you implemented scale

shuklajay avatar Oct 22 '18 07:10 shuklajay

@shuklajay at your XAML set the scale attribute (1 is the normal size, 2 is two times bigger...)

<pin:PinView
                    BackgroundColor="Transparent"
                    HorizontalOptions="CenterAndExpand"
                    VerticalOptions="CenterAndExpand"
                    PinLength="{Binding PinLength}"
                    Validator="{Binding ValidatorFunc}"
                    ClearAfterSuccess="false"
                    Success="Handle_Success"
                    ErrorCommand="{Binding ErrorCommand}"
                    SuccessCommand="{Binding SuccessCommand}" 
                    x:Name="pinView"
                    Color="{Binding TextColor}"
                    BorderColor="{Binding BorderColor}"
                    RippleColor="{Binding RippleColor}"
                    **Scale="{Binding Scale}"**
                    />

mfandre avatar Oct 22 '18 12:10 mfandre

Any news?

mfandre avatar Dec 20 '18 21:12 mfandre

Sorry, I've been busy with my work in the past weeks. Changing button size is quite simple actually: all you need is to make these properties settable from outside and use them in the renderer instead of hard-coded values. Button color can be set in the renderer (it requires to declare a new bindable property to make it configurable from cross-platform code).

lassana avatar Dec 21 '18 05:12 lassana