How to Change icons of checked and unchecked for Checkbox for in Xamarin form?

crisx 96 Reputation points
2021-01-02T03:41:14.89+00:00

As in android it is possible to give background for a checkbox is it possible to give like a star when the checkbox is check.

Developer technologies | .NET | Xamarin
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. JessieZhang-MSFT 7,716 Reputation points Microsoft External Staff
    2021-01-04T09:33:43.313+00:00

    Hello,

    Welcome to our Microsoft Q&A platform!

    For this, you can check XF-Material-Library, which is a Xamarin.Forms library for Xamarin.Android and Xamarin.iOS to implement Google's Material Design.

    You can check the detail of Checkboxes here: https://github.com/Baseflow/XF-Material-Library#checkboxes

    And there are some properties for it. You can change the value of these properties according to your needs.

    • Choices - The list of string the user will choose from.
    • FontFamily - The font family of the text of each checkboxes. The default is the value of MaterialFontConfiguration.Body1.
    • FontSize - The font size of the text of each checkboxes. The default value is 16.
    • HorizontalSpacing - The spacing between the checkbox and its text.
    • SelectedColor - The color that will be used to tint this control whe selected. The default is the value of MaterialColorConfiguration.Secondary.
    • SelectedIndices - The indices of the selected choices.
    • SelectedIndicesChanged - Raised when there is a change in the control's selected inices.
    • SelectedIndicesChangedCommand - The command that wil run if there is a change in the control's selected indices. The parameter is the list of selected indices.
    • TextColor - The color of the text of each radio button. The default value is #DE000000.
    • UnselectedColor - The color that will be used to tint this control when unselected. The default value is #84000000.
    • VerticalSpacing - The spacing between each checkboxes.

    Best Regards,

    Jessie Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.