dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.13k stars 1.74k forks source link

Default styling for controls does not work! #17414

Open mobynet1 opened 1 year ago

mobynet1 commented 1 year ago

Description

By default, I mean that I have completely turned off styling by not loading the Styles.xaml and Colors.xaml in App.xaml. Supposedly with ALL styling left to the defaults of the controls, some defaults are being set that should not be. Case in point, where is the corner radius coming from in the flyout menu?

image

I had also opened an issue, There is no way to set the text color of a Switch control #8965, a long time ago and @jfversluis unilaterally closed the issue by telling me to go write some platform-specific code. This is truly a poor way to run things. When customers open issues, it is not acceptable to simply close them because MS doesn't want to do something. I have ranted MANY times that you guys thought that the xamarin rewrite would satisfy everyone, but you have screwed the desktop community completely. Why can't a Switch control be styled?

So, some controls have styling that cannot be overcome without a TON of work on the customer's behalf. We, the customers, are under tight enough deadlines as it is to make this stuff work without having to resort to billions of lines of platform-specific code to make things work. If that were the case, who needs MAUI??????? EVERYTHING WAS EASILY STYLABLE IN WPF!!!

Steps to Reproduce

  1. Create new unmodified Maui app
  2. Comment out the loading of Colors and Styles:
    <ResourceDictionary.MergedDictionaries>
    <!--<ResourceDictionary Source="Resources/Styles/Colors.xaml" />
    <ResourceDictionary Source="Resources/Styles/Styles.xaml" />-->
    </ResourceDictionary.MergedDictionaries>
  3. Set FlyoutBehavior="Flyout"
  4. Run this VERY simple app...

Link to public reproduction project repository

No response

Version with bug

7.0.92

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

net7.0-windows10.0.19041.0

Did you find any workaround?

Nooooooooooooooooooooooooo

Relevant log output

No response

ghost commented 1 year ago

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

XamlTest commented 1 year ago

Verified this on Visual Studio Enterprise 17.8.0 Preview 2.0. Repro on Windows 11(8.0.0-rc.1.23419.4) with below Project: 17414.zip

CobaltGoldCS commented 1 year ago

I've been having various styling issues related to this as well

mattleibow commented 4 months ago

I think the corner radius is from the default OS styles. You can override this by creating your own style to override the OS default style in the Windows platform App.xaml file.

mobynet1 commented 4 months ago

@mattleibow, no that is not the case. I know I can create my own style. The point of opening this is that there should only be minimal defaults for controls. The control was a frame and there should never be rounded corners as the default. That is sugar that should be added by the developer on.