0
votes

I have a stacklayout containing many elements and one of them is a button. I want to be able to click this button but I want the other elements in there (and the stacklayout itself) to be IsEnabled false.

This stacklayout is on top of a map so therefor it is very important that a user can use the maps basic features on top of it.

Right now i have something like this (I have removed all attributes in there to make the code more readable)

<StackLayout IsEnabled = "false" >
<Image />
<Label />
<Button Clicked = "ClickEvent" />
</StackLayout>

So right now i set the stack to IsEnabledfalse which makes it not clickable when its on top of the map which is good, but I cannot click my button now.

How do i come around this issue?

2
try using InputTransparent insteadJason
This may or not be your use case but you can also make a custom fly up on a map winstongubantes.blogspot.com/2017/11/…Patrick Goode

2 Answers

0
votes

Try using InputTransparent instead

Setting InputTransparent only disables inputs and instead causes them to be passed to the VisualElement that is visually behind the element.

0
votes

Couldn't you just use the z-index of XAML elements? Wrap this in another container (e.g. StackLayout or Grid), like so:

<StackLayout>
    <StackLayout IsEnabled = "false" >
        <Image />
        <Label />
    </StackLayout>
    <Button Clicked = "ClickEvent" />
</StackLayout>

This will show the Button above the StackLayout