c# - WinRT XAML Bind to Parent Data Context in DataTemplate -


i trying figure out how bind a combo box parent data context within componentone flexgrid. saw tyler's question , tried but, when run winrt app, combo box empty. able working setting viewmodel static resource on page, unclear if there negative implications doing instead of setting page.datacontext. appreciated.

working example:

                <resourcedictionary>                 <datatemplate x:key="permission">                     <checkbox horizontalalignment="center"                          ischecked="{binding ischecked, mode=twoway}"/>                 </datatemplate>                 <vm:permissiondetailsviewmodel x:key="viewmodel" />             </resourcedictionary> 

and

        <c1:c1flexgrid margin="35 10"                     grid.row="2"                     grouprowposition="abovedata"                    name="c1flexgrid"                    itemssource="{binding permissionscollectionview}"                    borderthickness="1"                    autogeneratecolumns="false">          <c1:c1flexgrid.columns >             <c1:column binding="{binding name}" header="permission name" width="3*"></c1:column>             <c1:column celltemplate="{staticresource permission}" header="user has permission" width="1*" />             <c1:column width="1*">                 <c1:column.celltemplate>                     <datatemplate>                         <!-- bind parent (viewmodel) data context -->                         <combobox itemssource="{binding path=scopes, mode=twoway, source={staticresource viewmodel}}"                                   style="{staticresource combobox}"/>                     </datatemplate>                 </c1:column.celltemplate>             </c1:column>             <c1:column></c1:column>         </c1:c1flexgrid.columns>      </c1:c1flexgrid> 


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -