c# - avalondock how I can programmatically bind the Title, IsSelected, etc, property -


i'm using avalondock version 2. know how can programmatically bind title, isselected, etc, property. layoutdocument viewmodel. wanted use setbinding unfortunately layoutdocument has no such method.

update know approach unfortunately not suit me. dockingservice control windows , dockingservice have method

public void showdocumentwindow<tviewmodel>() tviewmodel : documentitemviewmodel     {         var viewmodel = this.createviewmodel(typeof(tviewmodel));         var view = this.createview(viewmodel);          var documentpane = this.dockingmanager.layout.descendents().oftype<layoutdocumentpane>().firstordefault();          if (documentpane != null)         {             var layoutdocument = new layoutdocument             {                 content = view             };              documentpane.children.add(layoutdocument);         }     } 

but don't know how bind properties title, isselected in method

you have set instance of viewmodel datacontext in view. after able use e.g. text="{binding path=yourproperty}" on properties want bind..


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

c# - Retrieve google contact -

javascript - How to insert selected radio button value into table cell -