wpf - Alternate Background ListBox empty rows colors? -
i have made research , found way set alternate background color each listboxitem
, want background continue if list box empty.
<style x:key="listboxstyle" targettype="listbox"> <setter property="width" value="288"></setter> <setter property="borderbrush" value="#d2d2d2"></setter> <setter property="borderthickness" value="1"></setter> <setter property="margin" value="1,0,1,0"></setter> <setter property="alternationcount" value="2"></setter> <setter property="horizontalcontentalignment" value="stretch"></setter> </style> <style x:key="listboxitemstyle" targettype="listboxitem"> <setter property="height" value="27"></setter> <setter property="fontweight" value="medium"/> <setter property="fontsize" value="12"/> <setter property="foreground" value="#333333"/> <style.triggers> <trigger property="itemscontrol.alternationindex" value="0"> <setter property="background" value="white"></setter> </trigger> <trigger property="itemscontrol.alternationindex" value="1"> <setter property="background" value="#19000000"></setter> </trigger> </style.triggers> </style>
is possible set alternate background on whole height of listbox?
as far i'm aware, item background
enables this, no, not possible. way imagine produce effect add empty items listbox
. advise not that, these empty items still selectable , confuse users.
Comments
Post a Comment