PrismLibrary / Prism

Prism is a framework for building loosely coupled, maintainable, and testable XAML applications in WPF, Xamarin Forms, and Uno / Win UI Applications..

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] DynamicResource no longer works in .Net 8 MAUI

jamesv-7 opened this issue · comments

Description

Using DynamicResource in xaml is no longer working in .Net 8 MAUI with Prism Maui. The only way to get it to work is use StaticResource which defeates the purpose of DynamicResource.

Steps to Reproduce

  1. Create new .Net 8 MAUI Project.
  2. Add ResourceDictionary with a color to App.xaml
    <Application.Resources>

    #5ACCCC

    </Application.Resources>
  3. Set BackgroundColor="{StaticResource main-color}" of xaml
  4. Change color with button click or another way
    Resources["main-color"] = Colors.Red;
  5. Initial xaml background color is white and color never changes on button click

Platform with bug

.NET MAUI

Affected platforms

iOS, Android

Did you find any workaround?

No

Relevant log output

No response

  1. DynamicResource does work in .net8 maui
  2. This has nothing to Prism library

DynamicResources do work in .Net 8 Maui until you install Prism Maui then it no longer does.

@jamesv-007 a sample reproduction is required for us to look into the issue. I'm not sure how Prism would be breaking this for you as Prism does nothing with regards to resources... Prism 9 doesn't even provide a base application type anymore so it's 100% MAUI

cc: @PureWeen @Redth

I was wrong - you are correct! I got it working.

Glad to know you are here if needed.

When should we expect a production version of Prism for MAUI?

We had originally planned on releasing a stable version last month however due to sudden increase of issues for MAUI the last couple of months we have temporarily decided to delay that. There are a couple of small issues I am planning on getting some PRs for and once those are in we'll do another preview and re-evaluate from there.