Setting the Scrollbar Thumb size

后端 未结 5 1132
醉梦人生
醉梦人生 2021-02-05 17:01

I am attempting to work out the algorithm associated with sizing of the WPF Scrollbar thumb element.

The thumb element can be sized using the Scrollbar.ViewportSi

5条回答
  •  你的背包
    2021-02-05 17:24

    Here's a method that will override the thumb minimum width for all ScrollBars. There's 2 important reasons for using this setup.

    1) This will not resize the ScrollBar RepeatButtons. (Why the style overrides Track)

    2) This will only resize the thumbs for Track controls that are used in ScrollBars. (Why the Track style is contained in a ScrollBar style.

    
    
        
    
    
    
    
    
        
            
                
            
        
    
    

提交回复
热议问题