The latest build of this product (v25.1.0) was released 1 month ago, which was before this thread was created.
Posted 8 days ago by Alex
Version: 24.1.3
Avatar

Title says it all. Even in the sample application, the slider thumbs are blurry.
Setting `RenderOptions.EdgeMode="Aliased"` makes them sharp, but they became non-symmetric horizontally, which is even worse.

Any workaround for this? Maybe a way to replace the thumb with something rectangular?

Comments (4)

Posted 8 days ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Thanks for reporting this.  We've updated the templates on all the sliders seen in the "Themes / Native Control Themes" sample to better align everyting and prevent thumb blurriness.  These updates will be in the next release.  If you are referring to other styles seen elsewhere, please let us know.


Actipro Software Support

Posted 7 days ago by Alex
Avatar

Since we touched sliders, if you open the control samples, the thumb in its leftmost position is not properly centered relative to the leftmost drawn tick. Pentagon-shaped thumbs are displayed 1px to the left of its optimal position, while box-shaped ones are 1px to the right for some reason.

Is there a simple way to substitute the thumb with my custom one while the fix is not ready?

Posted 7 days ago by Alex
Avatar

Currently, I have to use an ugly hack that works globally via `EventSetter` in a `Style` defined for all Sliders for this.


private void OnSliderLoaded(object sender, RoutedEventArgs e)
{ 
    if (sender is not Slider slider) return;
    if (slider.FindVisualChild<Path>() is not { } p) return;
    if (VisualTreeHelper.GetChild(p.Parent, 2) is not Path realPath) return;
    var roundedPathData = "M-5.5,-9.5A1,1,0,0,1,-4.5,-10.5L3.5,-10.5A1,1,0,0,1,4.5,-9.5L4.5,9.5A1,1,0,0,1,3.5,10.5L-4.5,10.5A1,1,0,0,1,-5.5,9.5z";
    var rectangularPathData = "M-4.5,-10.5L4.5,-10.5L4.5,10.5L-4.5,10.5z";
    realPath.Data = Geometry.Parse(roundedPathData);
}

I am honestly not a fan of this but so far it looks ok. Perhaps make the thumb use a dynamic resource for its geometry? That way the solution would allow custom-shaped thumbs and would survive potential future xaml structure changes...

Posted 6 days ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

We addressed all the alignments in the template updates yesterday made for the next release, making sure all thumbs have an odd length along their short size to allow them to center over the target value. 

I see you already have a temporary workaround.  Making the geometry a resource would only allow some customization since the template also sets Width/Height and render transforms in some cases that need to be in sync with the size of the geometry.

The only straightforward fix is to retemplate the thumbs, which externally would also require you to retemplate Slider since the native Slider control doesn't have a Style property for the thumb.  If you are a WPF Studio customer, you can download our default styles/templates from your account and clone them as needed.  And per above, our next release will have the updates in them for better alignment.


Actipro Software Support

Add Comment

Please log in to a validated account to post comments.