xaml - how to assign resx resource to itemtemplate control -
in wp8 app, have radio button customized through datatemplate , embedded textblock in it. question how assign key resx resource file assign text value, can localize these datatemplate control names without issues.
below sample xaml:
<textblock x:name="lbltilecolor" textwrapping="wrap" text="{binding localizedresources.themes_tile_label, source={staticresource localizedstrings}}" /> <radiobutton x:name="accentcolor" groupname="tilecolor" ischecked="true"> <radiobutton.contenttemplate> <datatemplate> <stackpanel orientation="horizontal"> <rectangle width="25" height="25" fill="{staticresource phoneaccentbrush}"/> <textblock width="10"/> <textblock x:name="lbldefaultaccent" text="{binding localizedresources.themes_tile_default, source={staticresource localizedstrings}}" /> </stackpanel> </datatemplate> </radiobutton.contenttemplate> </radiobutton>
here trying assign themes_tile_default resx key textblock named lbldefaultaccent control. above code seeing xaml error (i.e. invalid xaml) in datatemplate section - if assign text value directly hardcoding working...
any resolve this?
Comments
Post a Comment