I have been having a look at the net trying to find an answer but came up unlucky.
I am trying to make a Dropdown search Bar for my application but would like to to be just plain. I can't seem to find a way to remove all the background just leaving the text box by itself.
This is an example of what I have --
This is an example of what I want--
I just want to know if the is a way to remove the bits to the left and right.
Any help would be appreciated.
enter image description here
enter image description here
You can achieve this by setting the BackColor Property of your ToolStripMenuItem. In your case, change it to White.
Related
I began to work with DataGrid in WPF and i have a little problem.
I want to let the user re-ordering the column and it's working but i can't find the way to move the location of the sort arrow icon on the right side the header itself and not in the top of it. (look at the picture)
I think it's something simple but i can't find the solution.
Arrow
Thank you for your help.
I'm working on a program using C# and WPF and I was curious about getting the text color of some text I have to change dynamically based on what the background image I set is.
The background images are loaded by random (I will have no control over what they are) and I need to maintain readability of the fonts depending on what it is.
As you can see here: http://i.gyazo.com/820c45dde9d767dcd7ab2a92bd1de898.png
With this background image set, there's no way to read what the text has to say. Meanwhile, it would look fine on a lighter background.
Basically what I think needs to happen is
Get the most used color in that image
Find out if it's a "light or dark color"
Change the text accordingly
How could I do this? Whether it's programmatically or in the WPF XAML (i'm still new to using WPF so bear with me there).
Thanks in advanced,
Mike
I would agree that trying to select a text colour dynamically isn't ideal. Even if you select a colour that makes some of the text visible there is no guarantee it won't pass through a portion of your images which hides it.
Personally I would use a label with a white background but reduce the background opacity to show some part of the image behind. That way your text will always sit on a lightened area and dark text will always work.
Andy.
When a toolstrip menu is not enabled, its text color turns into grey. Is there any way to keep it black? Or any other color?
Already tried with ForeColor but it only makes a difference when the menu is enabled.
For the record, I agree with both #PeterRitchie and #DonBoitnott. Just don't do it. And I saw in your comments where you already answered your own question, but you have not posted your answer and accepted it here on SO.
So, in order to accomplish this with WinForms, you'll need to do Custom Drawing of your control in order to override the standard, default behavior of Windows with regards to these UI elements.
Again, I know you said you already accomplished this, but please, do the rest of your users a favor and don't do it. It may look good to you, but the changing the text to gray when the toolbar is disabled gives users a cue about what they can/can't do with your application in a given state.
I've been fiddling with a property of a control in Windows Forms, and suddenly, I don't know how, I clicked something in the Properties Panel, and all the text in the panel got aligned to the right. I have a picture here to show you. I am stuck with this panel, and it is really annoying. Could you please help me? Thank you so much!
It looks like you have Right-to-Left reading order enabled. To fix it, find a text box in the properties window that you can enter free text (like where you would enter the ID/Name for a control). Right click in the text box, and uncheck "Right to left Reading order":
Remember the good old key stroke: "CTRL + Z" It will take you right back!
enter image description here
Right Click on the text Property textbox there is a option to change it !
Ok so I am trying to do something extremely simple but its turning out to be extremely complicated. I wanted to be able to select my text for all of my labels. Since you can't do that I had to convert them all to textbox's. Now that I have that done I want the user to be able to drag their mouse across an area on the form and select whatever text they roll over. A good example would be a web browser.
EDIT
Ok I need to make this a little more clear and what better than some imagery.
Look at the picture above. I cannot drag my mouse across the form to select the text. I have to click inside the TextBox and then I can only select the data that is inside that specific field. I just want to be able to click and drag my mouse over whatever textbox is in my area of selection.
have you "set its BorderStyle to none and set the background color to the color of your form. Also don't forget to set the readonly property to false"
from http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/5ac4267d-2642-4d05-ae84-1562bf16d068/