Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.
This repository was archived by the owner on May 5, 2021. It is now read-only.

IsEnabled does not work as expected in UWP #175

@aparent-emgs

Description

@aparent-emgs

Description

I have a custom renderer implemented for UWP for a control in my Xamarin.Forms application that uses the SignaturePadCanvasView class as its native control. I want the control to be disabled by default when it is first displayed in the view. The problem I've stumbled upon is that the canvas only seems to be disabled when IsEnabled is changed while the control is being displayed.

You can see the reason why here

		public SignaturePadCanvasView ()
		{
			DefaultStyleKey = typeof (SignaturePadCanvasView);

			IsEnabledChanged += delegate
			{
				var ip = inkPresenter;
				if (ip != null)
					ip.IsInputEnabled = IsEnabled;
			};
		}

inkPresenter.IsInputEnabled is only mutated when the value of IsEnabled is changed, but it should ideally also be mutated to the current value of IsEnabled as soon as it becomes available, otherwise inkPresenter remains enabled until IsEnabled is set to true, then back to false

Expected Behavior

The control should be disabled if IsEnabled is set to false at instanciation.

Actual Behavior

The control is still enabled.

Basic Information

  • Version with issue: 3.0.0
  • Last known good version: N/A
  • IDE: Visual Studio 15.9.13
  • Platform Target Frameworks:
    • UWP: 16299
    • Xamarin.Forms: 3.0.0.482510
  • Target Devices:
    • PC - Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions