How to use Attached property within a style?
Here is how you can set your attached property in a style <Style x:Key=”ToolBarButtonStyle” TargetType=”Button”> <Setter Property=”PrismExt:ImgSourceAttachable.ImgSource” Value=”./Images/New.png”/> <!–…–> </Style> When binding to attached properties then the Path should be within parentheses so try to use RelativeSource Binding with TemplatedParent instead <Setter Property=”Template”> <Setter.Value> <ControlTemplate TargetType=”Button”> <Image x:Name=”toolbarImage” Source=”{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(PrismExt:ImgSourceAttachable.ImgSource)}” Width=”48″ Height=”48″> </Image> … Read more