question

6666666 avatar image
0 Votes"
6666666 asked ColeXia-MSFT answered

is There a property like VisualElement.InputTransparent Property but not to the child controls?

false if the element and its children should receive input;

Is there a property that set to true to make the element and its parent should not receive the input?

dotnet-xamarin
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ColeXia-MSFT avatar image
0 Votes"
ColeXia-MSFT answered

Hello,

Welcome to Microsoft Q&A!

Is there a property that set to true to make the element and its parent should not receive the input?

Xamarin does not provide such a property .

As a workaround , you can get the element 's parent and set InputTransparent as true .

SetMyMethod(element,true);

 void SetMyMethod(VisualElement element , bool p)
        {
            var parent = element.Parent as VisualElement;
            if (parent != null)
            {
                parent.InputTransparent = p;
            }
        }


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.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.