c# - Binding RibbonGroup.GroupSizeDefinitions does not work -
we using microsoft ribbon control library .net 4.0.
i trying bind ribbongroup.groupsizedefinitions property of viewmodel. if declare binding in xaml follows working fine.
<ribbon:ribbongroup header="group1" groupsizedefinitions="{binding groupdefinitions}" />
however if set using style not working.
<style targettype="{x:type ribbon:ribbongroup}" basedon="{staticresource {x:type ribbon:ribbongroup}}"> <setter property="groupsizedefinitions" value="{binding groupdefinitions}" /> </style>
how can bind view model ?
thanks.
finally able make work.
i added attached property , binded collection in view model. on attached property change call back, new ribbongroupsizedefinitionbasecollection created , added items of collection. assigned new ribbongroupsizedefinitionbasecollection ribbongroup.groupsizedefinitions property.
Comments
Post a Comment