I would like to know how to set the color of the main window in a WINUI 3 C# application. By default, it matches whatever theme color is applied to the Windows computer. In this example, it is a purple color. Can I set/override this color with a specific color of my own?
I don't think it's possible "for the moment".
I tried overriding the ThemeResources but it only applied to the controls inside the app not its window border. But there is a discussion on GitHub to make the app window borderless, so there's a chance that they make it possible to change the border color.
https://github.com/microsoft/microsoft-ui-xaml/issues/1247
Related
I'm using MetroFramework in my desktop application, and I already set all themes to dark and green. But I have a problem with the TabControl when the second Tab is within the first one; tabs colors are changing theme to light.
How can I make it dark?
On Package.Appmanifest we can define SplashScreen background color that is used for:
1) SplashScreen background - pretty obvious
2) to fit the space between new window border and not (yet) resized content when user is resizing the app window
If you don't know what I am writing about under 2) - just run Xbox app (or any other written with UWP), grab window border and then quickly move the window border back and forward.
The problem is that I would like to have two separate colors for that. Color A for SplashScreen background and Color B that would be visible during this resize. Apparently they are the same colors by default.
Is there any way to declare different colors for this two places within the app or any way to change the SplashScreen background color at runtime (to have the Color A during launch time and then after app has already lunched I could override this color with Color B to get the behaviour I need)?
I am making app in Windows Forms. I've added MenuStrip and changed it colors using ToolStripProfessionalRenderer. The problem is that whenever I am trying to change dropdown border color it only changes the outside border ( image below ).
How can I change the remaining white border that still is visible inside? Or how to just disable border there?
All you have to do is to override properties that you need to set the color.
This article will help you to do that.
And this is another link about how to implement your class
HK
I have an issue with the XAML designer for MainPage.xaml, it does not show the black screen of the phone. Instead it shows the invisible background. This means that just the body of the phone is visible but the screen matches the phone background.
When a Button is added to the Grid, just the outline for changing the size of the Button in seen and not the contents of the Button.
This answer works for any project in Visual Studio, not just windows phone.
Set the background of the Page or Grid or specific control to the color desired.
Background="Green"
If this is only a design time issue...one can change the colors of the background of the designer to an alternate color.
Go to Options -> Fonts and Colors and select XAML Designer in the Show settings for drop down. The in the Artboard Background change both colors to a color which works for you. Mixing the colors will create a checkerboard view, so its usually best to use, black or white.
I am working on Windows Phone 8 application.
I have Application Bar with icon, I have set the Background and Foreground color to the icons as well.
ApplicationBar.BackgroundColor // Orange
ApplicationBar.ForegroundColor // White
So now the Application bar looks like this :
Now my phone theme settings i have set the Accent color as pink so when i tap on the icon it looks like this :
But when i tap on the icon i want the effect to be is like this, even if my Phone setting Accent color is pink or some other color and background is set to light or dark.
It is not possible to change the behaviour of the ApplicationBar in the way you describe.
The ApplicationBar is not a regular control and it is not possible to alter it's behaviour in this way.
If you really, really want to get the behaviour you're after you'll need to create your own replacement for the ApplicationBar.