xamarin/Xamarin.Forms

[Bug] [iOS] CheckBox SetImage(UIControlState.Normal) had no effect

Offen

#7.180 geöffnet am 16.08.2019

 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C# (1.926 Forks)batch import
a/customrenderere/5 :clock5:help wantedp/iOS 🍎t/bug :bug:up-for-grabs

Repository-Metriken

Stars
 (5.644 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Description

SetImage() method in CheckBoxRender doesn't set Image for Normal state.

Steps to Reproduce

  1. Create Xamarin.Forms 4.1 project.
  2. Create a custom checkbox and place it on view.
  3. Add CheckBoxRenderer in the iOS project for the created checkbox.
  4. Set two image for Normal and Selected state's.
  5. Add code below to set Selected state for Control:
         Element.CheckedChanged += (s, ev) =>
         {
            Control.Selected = Element.IsChecked;
         };
  1. Run the app. Check and uncheck the checkbox.

Expected Behavior

The checkbox in a Normal state does not have a default icon.

Actual Behavior

The checkbox in a Normal state has a default icon.

Basic Information

  • Version with issue: 4.1.x
  • Visual Studio Enterprise 2019 Version 16.0.3
  • Xamarin.iOS Version: 12.8.0.2

Reproduction Link

https://github.com/TarasBounty/XamFormsCheckboxImage

Contributor Guide