Overlaying Texture over Panel
Posted: 03 Jan 2025, 15:02
I want to overlay a texture (basically a transparent texture with a lock on it to signify that some part of the UI is not "unlocked" yet) above arbitrary panels.
My initial approach would have been to write an Effect that takes the overlay texture and blends it with the color of the element (GetInput).
But it seems that the EffectHelpers doesn't have a SetTexture method like BrushHelpers and I'm not sure how I would go about passing a texture to the shader otherwise without access to the source code.
I think an ImageBrush won't work for my case where I want to apply it to the rendered element that is not only an image but a Panel with various content instead.
Is there some other way I could achieve my desired effect? Perhaps overlaying an Image in some other way in XAML?
My initial approach would have been to write an Effect that takes the overlay texture and blends it with the color of the element (GetInput).
But it seems that the EffectHelpers doesn't have a SetTexture method like BrushHelpers and I'm not sure how I would go about passing a texture to the shader otherwise without access to the source code.
I think an ImageBrush won't work for my case where I want to apply it to the rendered element that is not only an image but a Panel with various content instead.
Is there some other way I could achieve my desired effect? Perhaps overlaying an Image in some other way in XAML?