xaml - Changing border color when a control is selected with c# on windows 8 app store -


i have gridview control images , text xaml:

<grid grid.column="1" margin="0,40,30,0" >      <gridview x:name="celebgridview" margin="0,0,0,0" padding="0,0,0,0">              <gridview.itemspanel>                  <itemspaneltemplate>                      <wrapgrid orientation="horizontal" maximumrowsorcolumns="3"/>                  </itemspaneltemplate>                </gridview.itemspanel>                 <gridview.header>                    <stackpanel width="480" margin="0,4,14,0">                        <stackpanel orientation="horizontal" margin="0,0,0,10">                           <textblock text="most viewed celebs" foreground="black"                                       fontsize="25"/>                            <image source="/images/navigation-right.png"  margin="10,0,0,0"/>                          </stackpanel>                      </stackpanel>                   </gridview.header>                     <gridview.itemtemplate>                                 <datatemplate>                                     <stackpanel>                                         <image source="{binding imagebitmap}" />                                         <textblock horizontalalignment="center" text="{binding name_}" foreground="black"/>                                     </stackpanel>                                 </datatemplate>                             </gridview.itemtemplate>                         </gridview>                     </grid> 

and purple border around selected items in gridview below

selected purple border color around image

how can override behaviour, need change color custom color (#fdeb01).

you edit itemcontainerstyle gridview. easiest way use blend , find selectedborder element , change stroke brush color want.

open xaml blend , create/edit itemcontainerstyle

look selectedborder element

change stroke brush custom color

and should see this


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -