I am using Devexpress with Winforms
i am using validating event to check my input,
but when i try using the "ErrorText" (on wrong input)
the error icon appears but the also removes background image from my textEdit component- when the user retype the background image returns as normal.
how can i avoid the background from changing?
Related
I have an Excel-dna addin which creates a WPF window with a Textbox in it and show it.
When i call Window.Show() and type something into the Textbox, the keyboard input is redirected to the selected Excel-Cell instead of into the Textbox.
When i call Window.ShowDialog() it works as expected.
My goal is to have something like a tool window being able to react on changing cell selection in Excel (but also being able to type into Textboxes in that tool window).
How can I get only the changed context of a telerik radrichtextbox in WPF? For example, I need to get the changes that a user made in a text like writing/deleting characters. I am using DocumentContextChanged event to detect that a change has occurred, but I cannot get the content of the actual change.
I set a background image for my forms, but when I run the application, the form shakes. If I remove the background image, the form doesn't shake. How can I set the background image without my form shaking?
Have you tried setting the "DoubleBuffer" property on the form to true?
I had the same problem with a background flashing when the mouse was passing over a trasparent button.
I have a WP7 panorama application that uses a dark image for the panorama's background. The issue is when the device is set to light theme. The issue root cause is the Focus state transition animation for the TextBox sets the background color to transparent.
Since my panorama is always dark I'd like my textbox to always be white background.
First attempt set textbox background to white.
FAIL: transition changes background back to transparent when textbox gets focus.
Next attempt programmatically set textbox background to white on gotfocus.
FAIL: transition changes background back to transparent when textbox gets focus.
Next attempt override control template and change transition.
FAIL: never could get this happy with WP7, not sure if I used right version
Next attempt override control template using Blend 4.
FAIL: might have missed something but every state looked correct.
I see where lots of others are having this same problem but no here's exactly what you need to do so you don't trip up some minor detail.
If you can help us with a solution please do share.
Here's what I tried with Blend 4.
Opened my project in Blend 4, selected my textbox, right-clicked on it, chose Edit Template, and then Edit a Copy.
Here's where I'm not exactly sure what I need to do.
I went to FocusStates, and selected Focused. What I see in the preview pane looks like what I want. A nice textbox with a white background.
I look on http://msdn.microsoft.com/en-us/library/cc645061%28v=vs.95%29.aspx and I see there is a storyboard animation for the various FocusStates and I figure in WP7 there must be one that makes textboxes have a transparent background when they have focus in the light theme.
My goal of making my textbox have a white background since I have a panorama with a dark background image has proven difficult to say the least.
You were on the right path with this retemplating the control in blend. You can control formating of each constituent component of the control and for each state.
If you're still having trouble with this, post your resulting xaml for the TextBox in your question once you've made the changes.
Re your edit: Focused -> Grid-EnabledBorder-Background uses static resource PhoneTextBoxEditBackgroundBrush. You can change this to a local value then choose your colour.
I'm developing a winforms application (using .NET 3.5)
In a form I have a panel control ,and a datagridview control inside of it .
I want to have some control ( let's say for the simplicity - a label)
to appear in front of the datagridview , and I want this label to be transparent - which means : I want to see the data displayed in the gridview behind .
I just want to see the text that is in the label , but not the whole rectangle .. and behind that text - to see the data I have in the gridview.
The problem is the following : the parent control of the label is not the gridview
(since it's not a container control ) . The parent of the label , is the panel control .
So when I set the label to be transparent .. I actually get transparency to the panel , and not to the datagridview.
Check out this CodeProject article:
How to Use Transparent Images and Labels in Windows Forms
Also, you could always use GDI (System.Drawing) and just draw what you want directly onto a transparent panel?
Set the panel to also be transparent. It shouldn't cause any trouble with the panel, since you'll still have the form itself behind it.
There is one other issue to warn you about as well. Transparency in winforms controls is only simulated or faked, in that when you create the control it takes an image of the form behind the control and uses that for the background, rather than truly making it transparent. This can cause issues if that background changes or the controls moves around on the form.