I would like to remove the border which is between the border of ListView and ListViewItem which looks like it is a border of LVItem.
I really need to get rid of it, since I wanna the selected item to be connected with the right lightgray area. (Sure without that white border which was only testing border, to see whats going on with those borders in listview)
This is my styling code:
http://pastebin.com/TH83CaL0
And my listview xaml code looks like this:
http://pastebin.com/zvyJem02
Edit:
I am newbie with wpf and xaml, since I started with 1 week ago.
I think you can't get rid of this border only by Styling, but you could move the "right lightgray area" a little to the left and let it overlap your ListView by setting Margin="-1.5 0 0 0" Panel.ZIndex="1" or (as you did) hide a little of the ListBox behind the gray area by setting its Margin="-1".
Related
I have a stackpanel with a background image. Inside the stackpanel there is a ListBox and its background is set to transparent, what I need is to blur (glass effect) the background image only the part that comes under the listbox item. I tried to add a rectangle to transparent color in the listbox item template and then added a blurred effect but it doesn't work. This is what I am trying to achieve.
I came across this some time ago, maybe will help with what you're after.
I'm changing the look of some Controls that I use in my Microsoft Surface Application at the moment. And today I'm working on a SurfaceListBox.
I have the template for it and already changed background and borders and other stuff.
But I really cannot find where I can change the color of the rectangle that appears on the ListBoxItem when you touch the ListBox. At the moment it's just white and I want to change that.
It's not something like the effect that you can see when the item is selected. I already found that and changed that so my selected item now appears in a different color. But the effect in the second when you touch the item stays white.
So where can I change this effect?
If you mean the bright, white highlight that happens when you press your finger against an item you should look into the SurfaceShadowChrome. It's used by (almost) all surface controls to give feedback when the user is pressing on a control.
It does have a Color property that you can modify to suit your needs. Apart from the color, and the tweaking of corner radius and shadow offset, it's not a very flexible decorator. But hopefully, you'll be able to make it do what you need.
I need to display a 1 pixel wide border around all wrap panel cells, kinda like excel grid. Unfortunately the wrap panel does not implement the grid ShowGridLines property. I can't put a border inside every cell because adjacent cells will have a 2 pixel border instead of 1 pixel.
Since the wrap panel arranges it's layout dynamically and does not expose it's properties I can't evaluate the correct value for a border inside a cell. Any workaround possible?
There is no way to show grid lines because it's just not a grid. Even in a WPF grid control, you have very little control over the appearance of lines: How can I change the color of the gridlines of a Grid in WPF?. They're really just for debugging. The workaround is to put a border inside each cell that only has thickness on the bottom and on the right: BorderThickness="0,0,1,1"
I currently have the following red Border, signifying invalid entry, around TextBoxes in an application.
It just doesn't look right to me, it has square borders around rounded corners and the drop shadow is the wrong colour.
What is the best way of achieving a decent looking border around the text boxes?
Valid XHTML http://www.gumpshen.com/images/window.gif
Extract the TextBox template using Expression Blend and modify the ValidationStates to suit your desires.
This doesn't directly answer your question, but as a user, I almost prefer that the Background color change to a shade of red, with a low opacity value. It catches the eye well without being too "in your face".
That said, can you get the desired Border effect to look better simply by specifying the red border's CornerRadius value, while changing the TextBox's BorderThickness to 0?
I'm using a controlTemplate of the ListBox to show a collection.
I want to display all the items with a border like in a grid (all lines same size).
When I give every listBoxItem a border, the line between 2 items has a double size.
(made from the bottom border of the first item, and the top border of the second item)
So the question is:
Can I set/hide the border on a single side of an item? (like 'border-top' in css)
The border property is a thickness, just like margin and padding, so you can do Border="2,0,2,2" to get a border of 2 everywhere except the top.