Bind Icon depending on Enum in WPF Treeview

前端 未结 3 868
后悔当初
后悔当初 2020-12-18 19:24

I have at treeview TextBox, and I want convert my Enum:



        
3条回答
  •  一向
    一向 (楼主)
    2020-12-18 20:09

    The most easy solution to this, is to use a value convertor; so create an IValueConverter implementation that converts your enums to the corresponding images.

    For more information see: http://msdn.microsoft.com/en-us/library/system.windows.data.ivalueconverter.aspx

提交回复
热议问题