xaml - Phone 8.1 EventTraiggerBehavior pass parameter to converter -


i have following xaml markup in phone 8.1 universal app

<grid x:name="authproviders" >     <interactivity:interaction.behaviors>         <core:eventtriggerbehavior eventname="tapped">             <core:invokecommandaction                  command="{binding logincommand, mode=oneway}"                 inputconverter="{staticresource griditemselconverter}"/>         </core:eventtriggerbehavior>     </interactivity:interaction.behaviors>     <grid.columndefinitions>         <columndefinition width="auto"/>     </grid.columndefinitions>     <grid.rowdefinitions>         <rowdefinition height="auto"/>         <rowdefinition height="auto"/>     </grid.rowdefinitions>     <listview x:name="authenticationproviders"  itemssource="{binding authenticationproviders}">         <listview.itemtemplate>             <datatemplate>                 <stackpanel>                                             <button style="{staticresource loginbuttonstyle}">                         <button.content>                             <image source="{binding name, converter={staticresource loginconverter}}"/>                         </button.content>                     </button>                 </stackpanel>             </datatemplate>         </listview.itemtemplate>     </listview> </grid> 

now in griditemselconverter need include following code

return ((value tappedroutedeventargs).originalsource frameworkelement).datacontext myactualdatamodel 

i dont since need original source , there lot of conversion, there easier way obtain underlying data model instead of going way?


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -