wpf - dynamic binding of Button Content to an image button'sTextBlock? -
I have a style for an image button, as I am following, how can I create a text block, Where equals "POSITION" 'below, similar to button content? Thank you. '
style x: key = "top button style" target type = "button" & gt; & Lt; Setter property = "padding" value = "0" /> & Lt; Setter Property = "Button. BorderBrush" Value = "Steelblue" /> gt; & Lt; Setter property = "button. BorderThickness" value = "0" /> gt; & Lt; Setter Property = "ContentTemplate" & gt; Setter.value & gt; & Lt; DataTemplate & gt; Grid background = "steelblue" & gt; & Lt; Image source = "picture / blue_button_up.png" horizontal align = "center" margin = "0,0,0, 0" height = "auto" width = "auto" statch = "uniformtofil" gt; & Lt; Text block text = "position" horizontal alignment = "center" foreground = "white" margin = "5,5,0,0" / & gt; & Lt; / Grid & gt; & Lt; / DataTemplate & gt; & Lt; /Setter.Value> & Lt; / Setter & gt; post-text "itemprop =" text "> {binding} because DataTontext has ContentTemplate Content .
Comments
Post a Comment