<!--button style start- <style x:key= "Notifybtnstyle" targettype= "{x:type commondcontrol:i Mgbutton} "> <setter property=" FocusVisualStyle " value= "{x:null}"/> <setter property= "Cursor" value= "Hand"/> <setter property= "Template" > <Setter.Value> <controltemplate targettype= "{x:type Commondcontrol:imgbutton}" > <grid name= "BG" height= "{TemplateBinding Height}" width= "{ TemplateBinding Width} "> <Grid.ColumnDefinitions> <columndefinition width= "Auto"/> <columndefinition width= "*"/> </Grid.ColumnDefinitions> <image name= "Buttonimage" horizontalalignment= "Center" verticalalignment= "Center" stretch= "Fill" width= "{Binding imagewidth, Relativesource={relativEsource TemplatedParent}} " height= "{ Binding Imageheight,relativesource={relativesource TemplatedParent}} " source= "{Binding imagenormal,relativesource={relativesource TemplatedParent}}" /> <textblock x:name= "Text" grid.column= "1" text= "{TemplateBinding Content}" margin= "3,0,0,0" foreground= "{TemplateBinding Foreground}" horizontalalignment= "Center" verticalalignment= "Center"/> </Grid>
</ControlTemplate> </Setter.Value> </Setter> </Style>
Relativesource={relativesource TemplatedParent}