Is it possible to dynamically create a ResourceKey for a StaticResource? (eg using a Binding)

后端 未结 2 1513
有刺的猬
有刺的猬 2021-01-15 03:33

Suppose the object I\'m binding to has a property with a string representing the ResourceKey - how do I get a StaticResource to dynamically acquire it\'s ResourceKey based o

2条回答
  •  粉色の甜心
    2021-01-15 04:31

    It's also possible to do it in the XAML code

    
        
        
        
     
    

    All you need is a string property ImageType to choose the image you are going to use

提交回复
热议问题