添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams <Style TargetType="Image"> <Style.Triggers> <DataTrigger Binding="{Binding Gender}" Value="Male"> <Setter Property="Source" Value="/Resources/Client_Male.png"/> </DataTrigger > <DataTrigger Binding="{Binding Gender}" Value="Female"> <Setter Property="Source" Value="/Resources/Client_Female.png"/> </DataTrigger > </Style.Triggers> </Style> </Image.Style> </Image> That's a much cleaner solution than the usual "you have to create a converter bla bla bla", thanks! Monsignor Nov 12, 2015 at 18:39 With binding specified in the Tag property of image all DataTrigger bindings in <Image.Style> should be referencing image's Tag , i.e. Binding="{Binding Path=Tag, RelativeSource={RelativeSource Self}}" zmechanic Jan 7, 2016 at 15:50