Maui
                                
                                 Maui copied to clipboard
                                
                                    Maui copied to clipboard
                            
                            
                            
                        [BUG] MediaElement.Opacity doesn't work
Is there an existing issue for this?
- [X] I have searched the existing issues
Did you read the "Reporting a bug" section on Contributing file?
- [X] I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug
Current Behavior
Hi, the Opacity property appears to be completely ignored on the MediaElement. The element's opacity cannot even fade when the opacity of the parent is changed... It remains at 100% until the element becomes not visible anymore (IsVisible = false).
Expected Behavior
The opacity should fade the element and the parent element opacity should fade a child MediaElement as well.
Steps To Reproduce
Create a new .net8 Maui project using available VS template. Install mentionned NuGet package. Add a MediaElement on the page or add it programatically... Add some video to the app folder. Wire the image source. After you have tested that the video loads correctly. Play with the opacity, you'll see right away that it doesn't work. Look at the repo for an example, but really it's 5 lines of code.
Link to public reproduction project repository
https://bitbucket.org/ba81f149/workspace/projects/COM
Environment
- .NET MAUI CommunityToolkit: 3.0.1
- OS: Windows 11 Pro 22H2 22621.2861
- .NET MAUI: 8.0.3 on .net8
Tested on Windows WinUI platform only. Targeted framework: 10.0.19041.0
Anything else?
I suppose not many people need this, but I happen to need this. Any help is appreciated.
I just noted that for some reason, Opacity only apply on controls and not in Player, but yes, this is needed to make effects with multiple media/channels
Looks like this could be done here: https://github.com/CommunityToolkit/Maui/issues/1891
@vhugogarcia this is being discussed as a proposal to add support for texture view.
Thanks @ne0rrmatrix for pointing out. Thanks @olographio for reporting the issue, however, this is not an issue but rather a new feature request which is actually being discussed on this issue: https://github.com/CommunityToolkit/Maui/issues/1891
I'm closing this issue, so we all can follow-up there.