Remove border from ToolStripMenuItem - c#

I am customizing my MenuStrip to make it look better. I've gone really far from default one but there is 1 thing left which I could not change. My MenuStrip looks like this right now.
As you can see in the image there is a grey border around my ToolStripMenuItem. I want to remove it but I can't. I have try this solution and it changed the color a bit. how can I change toolstripmenuitem border color?
I tried Color.Pink to see the difference and yes it did change the color but it was like around the pink border the grey one was still there. I want to make it totally dissappear. Borderless I mean. I will also show how my menu looks like when I do the solution of given link.
is how its look like when I override ToolStripDropDownBackground

Related

how do I customize my widgets or buttons borders and other advanced properties?

I'm a bit new to winform and I dont know how to change stuff like widget borders or make smooth hover animations for buttons or other widgets, in css we do it like transition: 1s; but in C# I cannot find any property called transition, I'd appreciate if someone who knows what im talking about helps, thank you.
example: in this image here you can see that i've set my button's background color to purple but the border color hasn't changed.

Windows Forms MenuStrip Border Color

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

HubPage and CommandBar control in Windows Phone 8.1 App

I would like to try build my first WP8.1 app and I have a problem with CommandBar in Hub. I want to add different bar to all HubSections but I don't know how to do this :/ I tried to use SectionsInView (like here) but the change of CommandBar items is sooooo slow.
The second question is how can I make transparent CommandBar in HubSection? HubSection contains ListView. Now, when I try to do this, ListView bottom margin is changing and I don't see ListView under CommandBar (I don't know why...). Look at picture.
The third question is how can I change AppBarButton color when I'm pressing it?
Answer 1. You can try to create a new AppBar programmatically in the xaml.cs.
Answer 2. You can change the transparency for your AppBar. You'll also have to do this programmatically. Choose the control that you want the AppBars transparency to change with, select which event you wan't the AppBars transparency to change with. (Make sure you have given you AppBar a name).
Then type this in the following line:
BottomBar.Background = new SolidColorBrush(Color.FromArgb(50, 24, 68, 120));
Make sure you change the value for the option A, from 0-100. This option will decide what transperency you will have. The other options like R, G % B will decide what color the AppBar will have.
Answer 3. It's not really possible, the buttons highlight relies on your devices Accent Color. Therefore it takes a lot of programming to change that one little action.

ToolStrip TextBox Colour

I have set up a ToolStrip in my C# WinForms project and have added a TextBox on it. I'm just curious whether it is normal that the TextBox is barely visible due to the colour of the ToolStrip and TextBox.
I could put a border around it or change the background colour of the TextBox but that just looks odd.
Is there some property which I haven't thought of which I could set to make it stand out more but not look out of place?
Screenshot added:
A very light border would probably be best. if you use the same color as the toolstrip, you won't really notice the border at the bottom, but it will make the top of the search box stand out. you might also want to add a margin around it, or less padding inside of it, so it doesn't fill up the whole hight.

Best way to create button displaying selected color

You know those color picker buttons with a little rectangle in it, displaying the currently selected color? Like in MS Office products.
I would like to implement one using C# / .NET. So I've got a nice little icon with a magenta-colored rectangle (which is to display the color) and a transparent background.
I can think of two ways how this could be done, but they're both not really elegant:
Edit the icon using graphics software to have a solid background color instead of transparency and resize it to be exactly as large as the button containing it. This would allow to use TransparentColor=Manenta in combination with the button Background, however the icon would have to be edited whenever button size, toolbar BackColor or something else changes.
Edit the icon programmatically whenever a new color is selected. Would work, but seems a little bit to complex (regarding development and performance) to me.
So. Maybe I am missing the obvious, easy way to implement such a button?
Thanks in advance for any hints/suggestions/inspiration :)
You can easily override the OnPaint method and draw a rectangle with any color you desire.
Obviously, there is no elegant solution. I chose the first one, using PNG transparency and BackColor, with the drawback of having to color the png background like the background of the containing panel. Seems to be least painful this way.
I see no reason to use an icon, PNG, or any other image resource for this. That seems a complete waste of resources.
Just draw the boxes from code, drawing the colors that are currently part of the control's color list. Ideally, your control will allow the caller to add their own colors. And it wouldn't require any fiddling around with images.
I just used an owner-draw combo box when I did this, but I drew a color box as I'm describing. Very easy.

Categories

Resources