开发者

wpf imagesource bad trigger

开发者 https://www.devze.com 2023-03-06 20:52 出处:网络
I want to cre开发者_JS百科ate a data trigger in pure xaml (as in, no events or convertors or any bhind code), that will trigger if an image source doesn\'t have an image.

I want to cre开发者_JS百科ate a data trigger in pure xaml (as in, no events or convertors or any bhind code), that will trigger if an image source doesn't have an image. For example I have an image browser and image preview, and I want to do something if the the browser selected a file that isn't an image.


Is it mandatory using Data Trigger ? Can't you just set de Property Trigger in style ?

Something like :

<Style.Triggers>
<Trigger Property="Source" Value="">
  Something here...
</Trigger>

Tell me if it's not the behaviour you expect

0

精彩评论

暂无评论...
验证码 换一张
取 消