Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

PixelSnapper Class

Enables pixel snapping.

Namespace: DevExpress.Xpf.Core

Assembly: DevExpress.Xpf.Core.v24.2.dll

NuGet Package: DevExpress.Wpf.Core

#Declaration

public class PixelSnapper :
    PixelSnapperBase

#Remarks

Dpi independence can create irregular edge rendering due to anti-aliasing. These artifacts, commonly seen as blurry or semi-transparent edges, can occur when the location of an edge falls in the middle of a device pixel rather than between device pixels. To avoid blurring of visuals in WPF applications, locate them inside the PixelSnapper.

<dx:PixelSnapper>
    <Image Source="{Binding Path=Link.Item.Glyph, RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="Center"/>
</dx:PixelSnapper>

#Inheritance

Object
DispatcherObject
DependencyObject
Visual
UIElement
FrameworkElement
Decorator
DevExpress.Xpf.Core.Internal.PixelSnapperBase
PixelSnapper
See Also