I\'m styling the items in a WPF ListBox, and want to put a border around each item. With BorderThickness set to 1, for example, the top-bottom borders
ListBox
BorderThickness
Use BorderThickness="1,0,1,1" and a DataTrigger which checks for RelativeSource={RelativeSource Mode=PreviousData} being null to set BorderThickness="1,1,1,1":
BorderThickness="1,0,1,1"
DataTrigger
RelativeSource={RelativeSource Mode=PreviousData}
null
BorderThickness="1,1,1,1"
Alice Bob Colleen