Search code examples
winui-3acrylic-material

The property 'backgroundsource' was not found in type 'AcrylicBrush' WinUI


i'm trying to realise how to work with WinUI 3.0 acrylic, but i've stuck on create a custom acrylic brush, cos Visual Studio says there is no property for BackgroundSource in AcrylicBrush, but the docs says it must be, maybe i've missed updates, but i'm trying to do it same as it in official documentation and its confusing me(also in official documentation there is media:acrylic, but now its just AcrylicBrush, i'm sure its cos of updates). Thanks in advance for answer.


Solution

  • Sounds like you are looking at the WinUI 2 documentation (which has BackgroundSource) but you are using WinUI 3. AcrylicBrush changed a lot in the new WinUI and BackgroundSource is gone now.
    URL for version 1.3:
    https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.media.acrylicbrush?view=windows-app-sdk-1.3

    URL to v 2.8. (thanks @Trevor Davis) https://learn.microsoft.com/en-us/windows/winui/api/microsoft.ui.xaml.media.acrylicbrush?view=winui-3.0