View Issue Details

IDProjectCategoryView StatusLast Update
0003224NoesisGUIC++ SDKpublic2024-05-06 12:51
Reporterlaudaicat Assigned Tosfernandez  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.2.3 
Target Version3.2.4Fixed in Version3.2.4 
Summary0003224: Cant set MinHeight thumb of ScrollBar
DescriptionWhen using a ScrollViewer, if the content is too long, the thumb button of the scrollbar becomes too small. I want to set the minimum height of that thumb. I followed an example from https://learn.microsoft.com/en-us/dotnet/desktop/wpf/controls/how-to-customize-the-thumb-size-on-a-scrollbar?view=netframeworkdesktop-4.8

          <Track.Resources>
              <!-- Set the Thumb's minimum height to 50.
            The Thumb's minimum height is half the
            value of VerticalScrollBarButtonHeightKey. -->
              <sys:Double
                x:Key="{x:Static SystemParameters.VerticalScrollBarButtonHeightKey}">
                100
              </sys:Double>
            </Track.Resources>

However, it does not work.
TagsNo tags attached.
PlatformAny

Activities

sfernandez

sfernandez

2024-04-10 11:47

manager   ~0009362

Last edited: 2024-04-10 11:48

Unfortunately we don't support SystemParameters. And the ScrollBar style defined in our NoesisTheme has no option to modify the ScrollBar thumb size from outside, other than defining a new implicit style (without a key, only the TargetType) for the ScrollBar, could you try that?

You can use our theme as reference: https://github.com/Noesis/Managed/blob/master/Src/NoesisApp/Theme/Theme/NoesisTheme.Styles.xaml#L803
laudaicat

laudaicat

2024-04-11 02:31

reporter   ~0009367

Yes, I tried that approach, but it didn't achieve what I wanted. My goal is to set the minimum height of the thumb bar to accommodate my thumb image fully, to prevent it from being cut off.

In the function Noesis::Track::ThumbSize, I noticed that it uses a MinThumbSize of 8. Ideally, I would like this value to be set to 25. However, I can't modify this value because it's declared as a constant and is an internal variable within Noesis.

I'm hoping you can suggest a way to change this.
example.png (34,282 bytes)   
example.png (34,282 bytes)   
sfernandez

sfernandez

2024-04-11 12:08

manager   ~0009368

I see what is happening, the arrange code for the Track is using a predefined min size of 8px for the Thumb when it is used inside a ScrollBar, so the thumb gets clipped if you specify a bigger MinHeight.
We will have to implement something similar to WPF, thanks for the feedback.
sfernandez

sfernandez

2024-05-06 12:51

manager   ~0009468

Solved in changeset r13863

Issue History

Date Modified Username Field Change
2024-04-09 17:36 laudaicat New Issue
2024-04-10 11:47 sfernandez Assigned To => sfernandez
2024-04-10 11:47 sfernandez Status new => feedback
2024-04-10 11:47 sfernandez Note Added: 0009362
2024-04-10 11:48 sfernandez Note Edited: 0009362
2024-04-11 02:31 laudaicat Note Added: 0009367
2024-04-11 02:31 laudaicat File Added: example.png
2024-04-11 02:31 laudaicat Status feedback => assigned
2024-04-11 12:04 sfernandez Target Version => 3.2.4
2024-04-11 12:08 sfernandez Status assigned => feedback
2024-04-11 12:08 sfernandez Note Added: 0009368
2024-05-06 12:51 sfernandez Status feedback => resolved
2024-05-06 12:51 sfernandez Resolution open => fixed
2024-05-06 12:51 sfernandez Fixed in Version => 3.2.4
2024-05-06 12:51 sfernandez Note Added: 0009468