Questions tagged [snapstodevicepixels]

9 questions
70
votes
4 answers

When should I use SnapsToDevicePixels in WPF 4.0?

Can anyone suggest a guideline on when to use SnapsToDevicePixels in WPF 4.0? Should it only be used occasionally if there is an issue, liberally throughout an App, only on certain controls or what?
Mike B
  • 2,592
  • 3
  • 33
  • 46
15
votes
2 answers

What does SnapsToDevicePixels in WPF mean in layman terms?

Anybody? Say I have a Window Class and I give SnapsToDevicePixels = true? what happens?
abmv
  • 7,042
  • 17
  • 62
  • 100
7
votes
1 answer

how to avoid a single pixel line disappear in wpf?

I use a Path element(StrokeThickness="1" SnapsToDevicePixels="True") in Grid. I want to resize the window, the Grid element is wrapped by a Viewbox element. Problem When I resize the window, the Path will disappear some time. If I turn…
RambleInX
  • 143
  • 11
4
votes
1 answer

SnapsToDevicePixels, UseLayoutRounding and BitmapScalingMode seems not to work

when im programming with Visual Studio C# 2010 on WPF, some Text is very unclear, regardless of setting SnapsToDevicePixels to true, UseLayoutRounding to true and BitmapScalingMode to HighQuality. You can see the Problem in the…
3
votes
2 answers

SnapsToDevicePixels seems to not work in StackPanel

I have more expanders in StackPanel (Orientation=Vertical). When I expand one, the others below the expanded one seem to be blured. Like it would SnapsToDevicePixels=False. I think the problem could be in StackPanel because it doesn't support…
karel
  • 1,297
  • 1
  • 10
  • 22
3
votes
1 answer

WPF Listbox border on right side blurry

I have a WPF application with a listbox showing some data. When i have the listbox in the center of the window and the window is an uneven width, on the right side the listbox is blurry. (Green is Rectangle, the blue part is a textbox) I tried to…
user1515791
  • 675
  • 4
  • 20
2
votes
2 answers

How can I create beveled corners on a border in WPF?

I'm trying to do simple drawing in a subclass of a decorator, similar to what they're doing here... How can I draw a border with squared corners in wpf? ...except with a single-pixel border thickness instead of the two they're using there. However,…
Mark A. Donohoe
  • 28,442
  • 25
  • 137
  • 286
0
votes
2 answers

How can I create an opacity mask in wpf that doesn't scale?

Ok, I've created a PNG-24 with transparency. It's basically a grayscale image that uses 'colors' in between black and transparent instead of black and white. I did this so I can use this as the Opacity Mask of a colored rectangle, thus rendering…
Mark A. Donohoe
  • 28,442
  • 25
  • 137
  • 286
0
votes
0 answers

WPF: can't make a dotted line 1 pixel wide

I have two components in wpf and want to make a 1 pixel dotted line between them. Have not managed to achieve this using any on the tricks mentioned at stackoverflow. This empty project with just this wpf code added demonstrates the problem, when…
GulPaprika
  • 31
  • 5