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.
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.
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
inkPresenter.IsInputEnabled
is only mutated when the value ofIsEnabled
is changed, but it should ideally also be mutated to the current value ofIsEnabled
as soon as it becomes available, otherwiseinkPresenter
remains enabled untilIsEnabled
is set totrue
, then back tofalse
Expected Behavior
The control should be disabled if IsEnabled is set to false at instanciation.
Actual Behavior
The control is still enabled.
Basic Information