-
Notifications
You must be signed in to change notification settings - Fork 467
[Bug] XCT:StatusBarEffect.Color clashes with Rg:Plugins.Popup on iOS #1856
Comments
@maxchu92 what is the exception that is thrown? |
|
@maxchu92 I tried your sample, without prism and it fails when we try to get the I don't know too much about the Rg.Popup implementation, I just know it uses the For reference, when I use the normal I would say that's not on us because that works for normal |
@pictos I suspect that this is occurring because of changing the applications |
@bijington, yeah we can say that's not a good practice to set the
Looking at the code the StatusBarColor will not be changed, but I don't know what could happen during runtime |
Understood. Really appreciate your time on checking this. Thank you. |
I faced the same problem.
|
I found the reason that causes the application to crash. If I comment out the code below in the App.xaml file, then the application works fine. <Style TargetType="NavigationPage">
<Setter Property="BarBackgroundColor" Value="{DynamicResource BarBackgroundColor}" />
<Setter Property="BarTextColor" Value="{DynamicResource BarTextColor}" />
<Setter Property="xct:StatusBarEffect.Color" Value="{DynamicResource BarBackgroundColor}" />
<Setter Property="xct:StatusBarEffect.Style" Value="{AppThemeBinding Dark={x:Static xct:StatusBarStyle.LightContent}, Light={x:Static xct:StatusBarStyle.DarkContent}}" />
</Style>
<Style
ApplyToDerivedTypes="True"
TargetType="{x:Type ContentPage}">
<Setter Property="BackgroundColor" Value="{DynamicResource AppBackgroundColor}" />
<Setter Property="xct:StatusBarEffect.Color" Value="{DynamicResource BarBackgroundColor}" />
<Setter Property="xct:StatusBarEffect.Style" Value="{AppThemeBinding Dark={x:Static xct:StatusBarStyle.LightContent}, Light={x:Static xct:StatusBarStyle.DarkContent}}" />
</Style> Tested on iOS 17 |
Description
When replacing the
Application.Current.MainPage
with a page that hasxct:StatusBarEffect.Color
from aPopupPage
, an error withRootViewController
will occur on iOS. It was first occured to me when I was trying to reset the entire navigation stack, from a PopupPage, while I was navigating using Prism._navigationService.NavigateAsync("/NavigationPage/MainPage");
. I had reproduced this issue in both environment, Xamarin.Forms independently, and Xamarin.Forms + Prism.Forms. By changing theApplication.Current.MainPage
in a PopupPage, it will occur as well. This error will occur if I am trying to reset the navigation stack to a page with StatusBarEffect.Exception
Stack Trace
Link to Reproduction Sample
Xamarin.Forms Version
Xamarin.Forms + Prism.Forms Version
Steps to Reproduce
Expected Behavior
Navigation stack is reset and go to MainPage without any error.
Actual Behavior
Error occurs when stack is reset.
Basic Information
Version with issue:
v5.0.0.2401
v2.0.2
v2.1.0
v8.1.97
v8.0.76
Last known good version:
IDE:
Platform Target Frameworks:
Nuget Packages:
v1.7.3
v1.7.3
I had already create a bug report in Rg.Plugins.Popup repository as well.
The text was updated successfully, but these errors were encountered: