c# - How to toggle image based on BooleanToVisibilityConverter? -


in wpf datagrid, have datagridtemplatecolumn:

<datagridtemplatecolumn>   <datagridtemplatecolumn.celltemplate>     <datatemplate>       <image visibility="{binding showimage, mode=oneway, convert{staticresource booleantovisibilityconverter}}" source="{staticresource image1}" />     </datatemplate>   </datagridtemplatecolumn.celltemplate> </datagridtemplatecolumn> 

this column starts no image. processing occurs. if showimage assigned true, image displayed. else, nothing displayed.

how toggle between 2 images based on assignment showimage?

just use converter (maybe can call booltoimagecoverter) assign 1 image if showimage true , different image if showimage false.


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -