Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Shadow Container] Allow clicking on elements below the Spread #1139

Open
11 tasks
rafael-rosa-knowcode opened this issue May 16, 2024 · 2 comments
Open
11 tasks
Labels

Comments

@rafael-rosa-knowcode
Copy link
Contributor

rafael-rosa-knowcode commented May 16, 2024

What would you like to be added:

I would like that when using a ShadowContainer, the area informed to have the Shadow allowed clicking.
Because for some cases we can put the shadow to one side and allow clicking on the other.

As it stands today, if I determine 200 pixels of OffsetY/OffsetX/Spread the element does not allow clicking in the areas in which it is reserving but it is not showing anything.
However, in the areas where it is reserving but is showing the click, it is possible to click.

For example, the image below shows where clicking is and is not allowed.

Assume that each square is 300px and that the shadow is 200.
And in the blue area the click is not allowed.

image

And the Video of the demo.

ShadowsContainer.mp4

Code

      <Grid ColumnDefinitions="300,300,300" RowDefinitions="300,300,300">
        <TextBox Grid.Row="0" Grid.Column="0" PlaceholderText="Grid 0 0" />
        <TextBox Grid.Row="0" Grid.Column="1" PlaceholderText="Grid 0 1" />
        <TextBox Grid.Row="0" Grid.Column="2" PlaceholderText="Grid 0 2" />
        <TextBox Grid.Row="1" Grid.Column="0" PlaceholderText="Grid 1 0" />
        <TextBox  PlaceholderText="Grid 1 1" />

        <ContentControl Grid.Row="1" Grid.Column="1" Style="{StaticResource CardSurfaceStyle}">
            <TextBox PlaceholderText="Grid 1 1" />
        </ContentControl>

        <TextBox Grid.Row="1" Grid.Column="2" PlaceholderText="Grid 1 2" />
        <TextBox Grid.Row="2" Grid.Column="0" PlaceholderText="Grid 2 0" />
        <TextBox Grid.Row="2" Grid.Column="1" PlaceholderText="Grid 2 1" />
        <TextBox Grid.Row="2" Grid.Column="2" PlaceholderText="Grid 2 2" />
      </Grid>

There is a Repro project attached to this issue.

ShadowsIssue.zip

Why is this needed:

To allow the user uses the ShadowsContainer and other elements.

For which Platform:

  • WebAssembly
  • Android
  • iOS
  • macOS (AppKit)
  • Mac Catalyst
  • Skia
    • WPF
    • GTK (Linux)
    • Linux Framebuffer
    • Tizen
  • Windows

Anything else we need to know?

@rafael-rosa-knowcode rafael-rosa-knowcode added kind/enhancement New feature or request. triage/untriaged Indicates an issue requires triaging or verification. labels May 16, 2024
@Xiaoy312 Xiaoy312 added control/shadows and removed triage/untriaged Indicates an issue requires triaging or verification. labels May 16, 2024
@agneszitte
Copy link
Contributor

agneszitte commented May 17, 2024

@rafael-rosa-knowcode is this a blocker for any project/sample at the moment?
fyi @kazo0

@rafael-rosa-knowcode
Copy link
Contributor Author

No. We have removed the Shadows for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants