Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button/ImageButton's Border has a default value on Windows #9871

Closed
AllenMiaoFil opened this issue Sep 2, 2022 · 7 comments
Closed

Button/ImageButton's Border has a default value on Windows #9871

AllenMiaoFil opened this issue Sep 2, 2022 · 7 comments
Assignees
Labels
area-controls-border Border p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint partner/cat 😻 this is an issue that impacts one of our partners or a customer our advisory team is engaged with platform/windows 🪟 s/try-latest-version Please try to reproduce the potential issue on the latest public version t/bug Something isn't working

Comments

@AllenMiaoFil
Copy link

Description

When I tried to add a Button and an ImageButton into page, there is a default button border around Button, but I've never set button border. I must set it to 0 explicitly so that the Border is removed. and it also effect ImageButton.
In below screenshot you can see the Button2 has a default BorderThickness(Im not quite sure it is the root issue, but when I tried to modify it's value, the border width is modified).
image

This below screenshot you can see the Button3, I set BorderWidth="0", then it works well(But the default BorderThickness value is 1, I think maybe BorderWidth style override the default value).
image

It also has seem issue on ImageButton, but I can't reproduce in this simple project, can do you a research on ImageButton?
I can show my pervious screenshot.
image

Steps to Reproduce

1.Create a MAUI project
2. Add a Image button and set button BackgroundColor to Transparent.
3. Add a Button set button BackgroundColor to Transparent.
4. Run program.

This issue only on Windows, I checked on MacOS, it works well. I also attached a simple project.
ImageButton.zip

Link to public reproduction project repository

No repository

Version with bug

6.0.486 (current)

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Window10

Did you find any workaround?

No response

Relevant log output

No response

@AllenMiaoFil AllenMiaoFil added the t/bug Something isn't working label Sep 2, 2022
@ghost ghost added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Sep 2, 2022
@rmarinho rmarinho added this to the Backlog milestone Sep 2, 2022
@ghost
Copy link

ghost commented Sep 2, 2022

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@mikeparker104 mikeparker104 added the partner/cat 😻 this is an issue that impacts one of our partners or a customer our advisory team is engaged with label Sep 7, 2022
@samhouts samhouts added the p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint label Sep 8, 2022
@jsuarezruiz
Copy link
Contributor

The default value of StrokeThickness is -1 and with that value, Windows is using the default value. We can solve this, and the attached example would be:

image

However, buttons without a background color would look different:
image

From the current behavior:
image

@jsuarezruiz
Copy link
Contributor

The default value of StrokeThickness is -1 and with that value, Windows is using the default value. We can solve this, and the attached example would be:

image

However, buttons without a background color would look different: image

From the current behavior: image

@Redth What do you think?

@samhouts samhouts modified the milestones: Backlog, .NET 7 Planning Sep 28, 2022
@Redth
Copy link
Member

Redth commented Oct 31, 2022

@mattleibow you did a fair amount of work in this area, to me this seems like we don't want to make this change and it's expected you must override the defaults explicitly.

@ghost
Copy link

ghost commented Jan 26, 2023

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@jsuarezruiz
Copy link
Contributor

Testing with the latest 7.0 version, the behavior is the correct one:
image

By default, set the default BorderWidth, setting 0 remove the Border and setting a custom value modify the border thickness.

@jsuarezruiz jsuarezruiz self-assigned this Apr 13, 2023
@samhouts samhouts modified the milestones: Backlog, .NET 7 + Servicing May 2, 2023
@samhouts samhouts added the s/try-latest-version Please try to reproduce the potential issue on the latest public version label May 3, 2023
@ghost
Copy link

ghost commented May 3, 2023

Hi @AllenMiaoFil. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.

You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@ghost ghost locked as resolved and limited conversation to collaborators Jun 2, 2023
@Eilon Eilon removed the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-border Border p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint partner/cat 😻 this is an issue that impacts one of our partners or a customer our advisory team is engaged with platform/windows 🪟 s/try-latest-version Please try to reproduce the potential issue on the latest public version t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants