I am developing a navigation menu in silverlight that has 6 images. As you mouseover each image grows and clicking on an image will take you to a page on the website. The customer I am doing this for decided that straight rectangular images were boring and I showed him a design where I have slanted each image so each one is now a rhomboid shape. Horizontal top and bottom with sides slanting about 30deg from vertical.
I have been unable to figure out any way of growing each image on mouseover without putting a white block over the adjacent images. Would be grateful for any pointers.
If your images are PNGs with Transparency, why are you getting white blocks?
Normally the only issue to worry about is Z-order if adjacent options get larger, which you can fix by parenting all the buttons on a canvas and animating the Z-order as well as the scale.
Hope this helps.
Related
Is there a way to change the flow direction of the slider for the vertical orientation? If not, is there a way to change the background color to a color without it having that weird shaded effect? I want the bright color of the slider to be on top and the shaded portion to be on the bottom.
Thanks for all the great responses, but I ended up solving this one on my own. After much research, I finally discovered that I should edit the slider's template and that it can be easily done in Expression Blend. I found a pretty good tutorial for editing templates here. Once I started editing the template, I went to the vertical fill portion of the vertical slider and changed the transparency to 20% and changed the vertical track portion of the the vertical slider to 100%. This is where the shaded effect comes from. Then, I just switched the Fill properties for the vertical fill and the vertical track, so that the top part would be referenced by the slider's Foreground property and the bottom (now shaded part) would be referenced by the slider's Background property.
I'm building a form with two layers of controls. The bottom layer is a set of Panels with defined properties, one of which is a color different from the form background. The top layer is a set of picture boxes I'm using to display a circle. I've set the PictureBox Background to Color.Transparent, and I've offset it from the underlying Panel by one pixel to get the form to draw the underlying Panel. However, the area around the circle in the PictureBox is displaying the Form Background color, not the panel color. I don't want to draw the circle in the Panel, because I want the circles to move between Panels, and actually look like just a circle that's floating across the form independent of the Panel board underneath. Think of the effect as moving a piece on a board game (you see the peg move across the board, possibly on a diagonal not following the normal game path, then stop in a place on the game).
How can I get the PictureBox to have the underlying Form and panels show through, not just the form background color? I'm using C# Visual Studio 2010, and I'm not a terribly experienced programmer, so a code example would be helpful. An image of the form is at:
http://www.imageurlhost.com/images/salgmpcxvcz830c3flt.jpg
Found a way around the problem. I got rid of the Panels for the spaces in the game, and instead drew them as rectangles on the form's background image.
Alright, try as I might, I cannot for the life of me get rid of this tiny little border around my buttons.
Edit: I should mention, in case I didn't make it clear, these are buttons with an image on them, set to flat with the button sized to the image.
Images below:
Number one, I can't for the life of me get these borders to GO AWAY. I've checked everything I can think of. They're:
flat
border 0
no margins
no padding
manually sized to the size of the image (75px)
in a table layout where the columns are all:
manually sized to the width of the image (75px)
borderless
Nothing seems to really "work" to get rid of these. If I size the columns down to be 74px instead of 75px, most of them go away, but a few remain. I've triple and quadruple checked the images, and they don't have anything that I can pick up on that should be causing this... no transparency around the borders, definitely no border that looks like that.
Which leads me to the second problem:
Settings button when dialog is small...
Settings button when dialog is stretched out.
Settings button is also in the same table layout panel.
I've checked all the settings on the table layout panel as well.. I can't find any padding or margin or anything settings that suggest this should be happening.
Does anyone have any experience with this? What am I missing..?
Simple solution: using directly a PictureBox as if it was a button. You can change your image on mouse over or mouse click.
Have you tried a Toolbar/strip/whatever it's called these days? Probably not going to help as I believe it pads on your behalf, but worth a shot.
In the end you can toss the buttons in the trash and write your own control. A single control that manages N buttons will work well here.
I don't understand your second problem. What's the problem? It'll be fixed if you roll your own control anyhow.
While not a fix for the spacing issue, as a workaround you can make that gray gradient currently "behind" the "tabs" and control panel image into a BackgroundImage for the TableLayoutPanel using BackgroundImageLayout of Stretch. While not fixing the spacing issue, it would make it unnoticeable.
Writing a winforms control has its challenges (experience speaking here). I would agree that that is whats needed however. Depending on your project you may consider using XAML and WPF. It provides that fine detail you seem to be looking for in you application.
There are ways to host XAML controls in a winform app, but if you went this route it would be best to create a native WPF application. The reverse is also true (winform controls in a WPF app).
Did you check if the image has transparent pixels around the graphic pixels you want?
May be a simple crop solution.
I want to create a custom splash screen where some text on the page will end up being the progress bar. I need the text to flood fill with color from left to right based on the % loaded. My first thought (since I'm not use to doing this type of UI related stuff) was to have a textblock with the forecolor being trasparent layered over something like a border with its backcolor set and then grow the border control based on the %, but this is such a hack, there has to be something better with all the wonderful things silverlight can do. I had also thought about using a image so I could outline the text, but noticed the image was slow and was the last thing to load on my splash screen.
Any ideas on the right way to acomplish this?
I just want ask for your comments/suggestions on how to create a customized listview (if that's a good implementation) in WPF that displays images coming from a table from a database (more like a playlist) that rotates similar to a film (moving horizontally - on loop)
Any ideas?
If you have a list of Images, you can create an Image control for each one, put each Image control in a horizontal StackPanel, put the StackPanel inside a Canvas (of whatever size of the "film"), and animate the Left property of the Canvas to have the images roll.
Of course, if you need that the images wrap (the first one after the last one), you could forget about the StackPanel and move each Image separately.