c# - DevExpress TabbedDocumentUIService.DocumentPanelStyle -> CloseCommand Property doesn't work after binding -


at below code don't know why close command not work after binding although work via button command

<setter property="closecommand" value="bindingpath=content.datacontext.closedocumentcommand, relativesource=relativesource self}}" />  

full code docklayoutmanager

 <dxdo:docklayoutmanager  allowcustomization="true">                 <dxdo:layoutgroup orientation="horizontal" allowminimize="false">                      <dxmvvm:interaction.behaviors>                         <dxdo:tabbeddocumentuiservice                             documentgroup="{binding elementname=documnetgroup}">                             <dxdo:tabbeddocumentuiservice.documentpanelstyle>                                 <style targettype="dxdo:documentpanel">                                     <setter property="caption"                                              value="{binding path=content.datacontext.caption,                                         relativesource={relativesource self}}" />                                     <setter property="allowmaximize"                                             value="{binding path=content.datacontext.allowmaximize,                                         relativesource={relativesource self}}" />                                     <setter property="allowsizing"                                             value="{binding path=content.datacontext.allowmaximize,                                         relativesource={relativesource self}}" />                                     <setter property="closecommand"                                             value="{binding path=content.datacontext.closedocumentcommand,                                         relativesource={relativesource self}}" />                                 </style>                              </dxdo:tabbeddocumentuiservice.documentpanelstyle>                         </dxdo:tabbeddocumentuiservice>                     </dxmvvm:interaction.behaviors>                      <dxdo:documentgroup mdistyle="mdi" x:name="documnetgroup" itemheight="100" />                  </dxdo:layoutgroup>                  <dxdo:docklayoutmanager.autohidegroups>                     <dxdo:autohidegroup docktype="left">                         <dxdo:layoutpanel caption="navigation" allowclose="false" allowdrag="false" itemheight="auto" itemwidth="auto"/>                     </dxdo:autohidegroup>                 </dxdo:docklayoutmanager.autohidegroups>              </dxdo:docklayoutmanager> 

bankviewmodelcode using viewmodelbase :

    public class bankviewmodel : idocumenthelper     {         public string caption { get; set; }         public bool allowmaximize { get; set; }          private delegatecommand _closedocumentcommand;         public delegatecommand closedocumentcommand         {             { return _closedocumentcommand ?? (_closedocumentcommand = new delegatecommand(onclosedocument)); }         }          public bankviewmodel()         {             caption = "banks";         }           public void onclosedocument()         {             messagebox.show("dddd");         }     } } 

i searched lot on google can not result

thanks in advance


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -