How to insert a background colour between Horizontal and Vertical Scrollbars in Avalonia UI?
03:27 14 Sep 2026

So, I am currently working on a page for looking at the services and I am having an issue with scrollbars.

I had to recreate the scrollbar style and for some reason when they both appear, it would create transparent section, if user scrolls down you will be able to see the grid lines in there as shown in the images below:

Scrollbar issue

Transparent corner between scrollbars

Here are the following codes I have done to create this:
DataGrid User Control



    
        
            
                           
            
        
    

    
        
        
    

    
        
            
                
                
            

            
            
                
                    
                    
                
            
        
    

Scrollbar Viewer (Copied it from GitHub and made some adjustments: ScrollViewer original code)



    
        
            
                
                    
                    
                    
                    
                
                
                
                
                
            
        
    

    
    
    
    

    
        
        
            
                
                    
                
            
        
        
            
                
                
            
        

        
        
        
    

    
        
        
        
        
        
            
                
            
        
    

    
        
        
        
            
                
            
        
        
            
                
            
        

        
        

        
        

        
        
    

    
        
        
        
        
        

        

        

        
            
            
            
            
        
    


What did I do wrong that led to this issue and what should I do to resolve this?

c# avaloniaui avalonia