Winforms application shakes when loading if a background image is set - winforms

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.

Related

Why may setting Image or BackgroundImage have no effect?

I'm trying to figure out why setting a control's Image property on one form has no visible effect, while setting the same property of a control that belongs to a different Form works perfectly. My target form has non-default background color (it's all black with a white foreground color) and no border style. Setting the other form to the same color and border style does not affect its ability to display images. So what's wrong with my target form? What settings could I have tripped that make my image sets do nothing?
Turns out the problem was that I was initializing the form from within itself, so it had no suitable graphics context to give itself to display images on. Moving the form's field outside its own class to the main form solved the problem.

Silverlight button background image change while switching button State

I am having an issue about buttons in silverlight on windows phone 7. My button has a background image, and as I press it, it goes white like all the buttons in wp7 by default. What I want it to do, is to change its background image to different one. I found topic that describes something quite similar, but regarding the button color Windows Phone 7 (WP7) Change a button's background color on click.
Problem is that whenever I adjust any of the basic styles (Pressed, Disabled etc), I can only change everything besides the background image, because when I change it for one style, it stays changed for all the rest of them.
How can I make button change its background image while going into Pressed state? And why cant I do it the way the above link says?
ImageButton for Wp7 http://silvergeek.net/2011/01/14/imagebutton-control-for-win-phone-7/
If its not exactly what you need it might give you some hints.

Devexpress winforms -using the "ErrorText" on textEdit removes background image

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?

WPF AppBar autohide implementation

I'm a beginner learning WPF, and need to create an Application Bar that launches applications. I need it to auto hide, but I'm struggling with this. I implemented the docking aspect fine, and registered it as an autohide toolbar with windows, but am unsure how to go about actually implementing the autohide functionality. Currently, my window using a storyboard event to "hide" by changing to opacity to 0, but then the bar will still be 'on top' and block all of the other applications, so this doesn't quite work.
In addition to setting your opacity, set the visibility to collapsed at the end. Once the element is transparent, the collapsed status will make it unable to be hit by mouse. Do the opposite (Visibility set to Visible, then change opacity or whatever) on the opening animation.

TextBox Style issue for Panorama with dark image background

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.

Resources