question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BorderColor property

See original GitHub issue

Background and motivation

Now, I can customize only presence of border, but not color. For customizing, it would be cool to have property BorderColor. For example, in Button or Panel.

API Proposal

public
Color
BorderColor
{ get; set; }

API Usage

Panel.BorderColor = Color.Black;

Alternative Designs

No response

Risks

I don’t see risks. The color is set inside realization, or is taken from system settings. The only difference - it will be rised up to user for customization.

Will this feature affect UI controls?

VS Designer need to support the feature.

Issue Analytics

  • State:closed
  • Created 2 months ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mikola-akbalcommented, Aug 8, 2023

ButtonBase-derived controls can customise their border if those are rendered in “flat” style -> https://learn.microsoft.com/dotnet/api/system.windows.forms.flatbuttonappearance.bordercolor?view=windowsdesktop-7.0#system-windows-forms-flatbuttonappearance-bordercolor.

Now I see. Thanks.

Documentation should mark that you have to set Button.FlatStyle = Flat in order to use property FlatAppearance. It is not obvious.

image

0reactions
mikola-akbalcommented, Aug 9, 2023

That border is rendered by Windows, and it’s not really customisable. If you want a custom border you have to draw it yourself.

Sounds like you don’t want additional work 😃 .

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS border-color property
The border-color property sets the color of an element's four borders. This property can have from one to four values. If the border-color...
Read more >
border-color - CSS: Cascading Style Sheets - MDN Web Docs
The border-color shorthand CSS property sets the color of an element's border.
Read more >
HTML DOM Style borderColor Property
The DOM Style borderColor property specifies the color of the element's border. It may be given explicitly, inherit from the parent or by ......
Read more >
What Does HTML Bordercolor Attribute Does To Your ...
The color of the table borders as a whole is set with the BORDERCOLOR attribute of the <TABLE> tag. For example, this code...
Read more >
BorderColor property
Specifies the color of an object's border. Syntax. object.BorderColor [= Long ]. The BorderColor property syntax has these parts: Part ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found