xaml - classic binding works but compiletime binding acts only onetime -




i not sure if retard not seeing mistake day googling can't see it. have flipview has multiple datatemplates. want view updated on propertychange in vm - use databinding. if use compile time binding, binding behave set onetime - if mode set oneway or twoway. thought may wrong onpropertychanged event- not find anything. therefore tried switch classic binding - and works. question doing wrong x:bind?

here simplified version of xaml

<page    [...]     datacontext="{binding source={staticresource locator}, path=galleryviewmodelinstance}">      <page.resources>         [...]          <datatemplate x:name="flipimagetemplate"  x:datatype="gallery:imediaattachmentviewmodel">             <image stretch="uniformtofill"horizontalalignment="center" >                 <image.source>                     <bitmapimage urisource="{binding attachmentviewmodel.relativeattachmentpath, mode=oneway, converter={staticresource uriconverter}}" />                 </image.source>             </image>         </datatemplate>          <datatemplate x:name="flipvideoaudiotemplate" x:datatype="gallery:imediaattachmentviewmodel">             [...]         </datatemplate>          <datatemplate x:name="flippdftemplate"  x:datatype="gallery:imediaattachmentviewmodel" >             [...]         </datatemplate>          <datatemplate x:name="flipothertemplate" >             [...]         </datatemplate>          <local:bigpicturedatatemplateselector x:key="bigpicturedatatemplateselector"                                                imagetemplate="{staticresource flipimagetemplate}"                                               videoandaudiotemplate="{staticresource flipvideoaudiotemplate}"                                               pdftemplate="{staticresource flippdftemplate}"                                               othertemplate="{staticresource flipothertemplate}"/>     </page.resources>      <relativepanel x:name="relativepanel" background="{themeresource applicationpagebackgroundthemebrush}"                    padding="40,40,40,40">              <flipview x:name="flipview"                   selectedindex="{x:bind viewmodel.filpviewindex, mode=twoway}"                 itemssource="{x:bind viewmodel.gallerydataviewmodels, mode=twoway}"                 itemtemplateselector="{staticresource bigpicturedatatemplateselector}">             </flipview>        [...]     </relativepanel> </page> 

so if change binding x:bind not updating view (as mode set onetime)

 <bitmapimage urisource="{x:bind attachmentviewmodel.relativeattachmentpath, mode=oneway, converter={staticresource uriconverter}}" /> 





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -