WPF: Change ListBox ItemTemplate depending on whether the ScrollBar is visible or not?

The ScrollViewer has two properties: ComputedHorizontalScrollBarVisibility and ComputedVerticalScrollBarVisibility that are read-only dependency properties and we can use them in Triggers in the ControlTemplate of our ListBox (here I'm considering only the vertical property).

The ScrollViewer has two properties: ComputedHorizontalScrollBarVisibility and ComputedVerticalScrollBarVisibility that are read-only dependency properties and we can use them in Triggers in the ControlTemplate of our ListBox (here I'm considering only the vertical property) NOTE: for clarity of the answer, this is a stripped-down, bare-bones template for a ListBox. I removed the Border that should wrap around the ScrollViewer and all the properties that are defined on the ScrollViewer.

Thank You! I didn't know that property "ComputedVerticalScrollBarVisibility" must be used like this. Now my listbox works like I want.

– Kirahvi Aug 1 at 6:46.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions