xaml - Command Bar in Windows Phone -
i using command bar in windows phone using below code
<page.bottomappbar> <commandbar foreground="white"> <commandbar.primarycommands> <appbarbutton x:uid="share"> <appbarbutton.icon> <bitmapicon urisource="/assets/share.png"/> </appbarbutton.icon> </appbarbutton> <appbarbutton icon="favorite"></appbarbutton> <appbarbutton icon="comment"></appbarbutton> </commandbar.primarycommands> </commandbar> </page.bottomappbar>
i getting footer icon below out background. icon image showing.
but need footer icon rounded background each icon foreground white
please guide me achieve expected
try follow below:
1) open page in blend want modify. click on actual control , right click.
2) popup window choose create new template , define in application
3) creates copy of default template in app.xaml. tag contentpresenter
before end of style. wrapped in stackpanel name contentroot. wrap border.
<border borderbrush="{templatebinding foreground}" cornerradius="50" borderthickness="2" margin="10,0">
finally should below.
<border borderbrush="{templatebinding foreground}" cornerradius="50" borderthickness="2" margin="10,0"> <stackpanel x:name="contentroot" minheight="{themeresource appbarthemecompactheight}"> <contentpresenter x:name="content" automationproperties.accessibilityview="raw" content="{templatebinding icon}" foreground="{templatebinding foreground}" horizontalalignment="center" height="20" width="20" margin="0,12,0,4"/> <textblock x:name="textlabel" foreground="{templatebinding foreground}" fontsize="12" fontfamily="{templatebinding fontfamily}" margin="0,0,0,6" textalignment="center" textwrapping="wrap" text="{templatebinding label}"/> </stackpanel> </border>
now go page , set style style key. below.
<appbarbutton icon="favorite" style="{staticresource appbarbuttonstyle1}" ></appbarbutton>
this beauty of blend. not control, can modify control has style template.
good luck.
Comments
Post a Comment