1
votes

First question

My app is only for internal use so I never ever need dark theme support. I use the newest xamarin forms. How to disable dark theme globally in app? It's pretty easy in ios subproject.

Second question

How to change color of border of text entry in light and dark mode? I can change it in subprojects with custom reneders but I need comprehensive solution for shared project.

1
It is not very clear what you are asking.. if you are not setting it up then the style used for your app is independent from dark/light theme. devblogs.microsoft.com/xamarin/app-themes-xamarin-formsCfun
@NightCity10932 You want to change app theme? If yes, please take a look Theme a Xamarin.Forms ApplicationCherry Bu - MSFT
Put this in App.xaml.cs constructor : Xamarin.Forms.Application.Current.UserAppTheme = OSAppTheme.Light; It will keep your app in Light theme.MilanG
Possible duplicate: stackoverflow.com/q/64755827Cfun
It isn’t duplicate because there is no real answer in your link. Create project with shell or tabbed page in the newest visual studio from template and deploy it to your smartphone. I use Huawei P30 and my app is not theme independent. I don’t want to use appthemebinding. I prefer disable it for real.NightCity10932

1 Answers

1
votes

You will need to create a new CustomerRenderer, like this one: https://www.youtube.com/watch?v=pWvYNZOQo-A&ab_channel=AyberkZeray

then modify the info.plist with this lines (open the file with a text editor):

<key>UIUserInterfaceStyle</key>
<string>Light</string>