Back to Devexpress

PixelSnapper Class

wpf-devexpress-dot-xpf-dot-core-89e3512b.md

latest1.9 KB
Original Source

PixelSnapper Class

Enables pixel snapping.

Namespace : DevExpress.Xpf.Core

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public class PixelSnapper :
    PixelSnapperBase
vb
Public Class PixelSnapper
    Inherits 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.

xaml
<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

PixelSnapper Members

DevExpress.Xpf.Core Namespace