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

VisualBrush triggers a NRE when used in a OpacityMask. #2889

Closed
jmacato opened this issue Aug 27, 2019 · 1 comment · Fixed by #6461
Closed

VisualBrush triggers a NRE when used in a OpacityMask. #2889

jmacato opened this issue Aug 27, 2019 · 1 comment · Fixed by #6461
Labels
Milestone

Comments

@jmacato
Copy link
Member

jmacato commented Aug 27, 2019

To repro: Just set any visual control's OpacityMask with a VisualBrush. On runtime it should trigger an NRE.

@jmacato jmacato added the bug label Aug 27, 2019
@jmacato jmacato added this to the 0.9 milestone Aug 27, 2019
@jmacato
Copy link
Member Author

jmacato commented Jun 18, 2020

Repro:

    <Rectangle Width="300" Height="300" Fill="Red">
      <Rectangle.OpacityMask>
        <VisualBrush>
          <VisualBrush.Visual>
            <Rectangle Height="100" Width="100" Fill="Black" />
          </VisualBrush.Visual>
          
        </VisualBrush>
      </Rectangle.OpacityMask>
    </Rectangle>

@grokys upon checking, seems like that the VisualBrush never do a Measure() call on VisualBrush's Visual if its defined in XAML, hence the null exceptions...

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

Successfully merging a pull request may close this issue.

1 participant