WPF UI provides the Fluent experience in your known and loved WPF framework. Intuitive design, themes, navigation and new immersive controls. All natively and effortlessly.
Is your feature request related to a problem? Please describe
Hello, last year I introduce the UiApplication to fix the issue when the Application.Current was null.
Now I have a different problem, the Application.Current exist but I'm not the owner, I still don't have access to the App.xaml.
The ApplicationThemeManager.Apply(this); is not gonna work because the Application.Current exist and don't have the styles.
Describe the solution you'd like
A way to fix that would be to add a option in the UiApplication to set the System.Windows.Application manually as null.
UiApplication.Current.SetApplication(null);
// or
UiApplication.Current.SetApplication(Application.Current);
and
public SetApplication(Application application)
{
_application = application;
}
There is another option as well to check if the Application.Current contain the the basic resources style, if does not contain any resource means is not the Application owner and assumes that is running outside of the desktop app context.
I like the second option.
Describe alternatives you've considered
I gonna try to create a pr with the second option to disable the Application.Current if does not have any sytle related to the Wpf.UI
Additional context
This issue is related for Revit 2025 plugins.
This happens if I inject the resources in the Application.Current, breaks some ui from other windows. 😅
Is your feature request related to a problem? Please describe
Hello, last year I introduce the UiApplication to fix the issue when the
Application.Current
was null.Now I have a different problem, the
Application.Current
exist but I'm not the owner, I still don't have access to theApp.xaml
.The
ApplicationThemeManager.Apply(this);
is not gonna work because theApplication.Current
exist and don't have the styles.Describe the solution you'd like
A way to fix that would be to add a option in the
UiApplication
to set theSystem.Windows.Application
manually as null.and
There is another option as well to check if the
Application.Current
contain the the basic resources style, if does not contain any resource means is not theApplication
owner and assumes that is running outside of the desktop app context.I like the second option.
Describe alternatives you've considered
I gonna try to create a pr with the second option to disable the
Application.Current
if does not have any sytle related to the Wpf.UIAdditional context
This issue is related for Revit 2025 plugins.
This happens if I inject the resources in the
Application.Current
, breaks some ui from other windows. 😅