c# - WPF -- Binding Not Working -


i'm having rather frustrating problem here... have wpf page contains tabcontrol, , content of various tabitems wpf page (hosted in frame because page can have frame or window parent). though flowcalibrationsummaryview being displayed, on empty because data binding of summaryviewmodel not working reason. here's part of xaml:

<tabcontrol grid.row="0">     <tabitem header="current calibration">         <tabitem.content>             <frame>                 <frame.content>                     <view:flowcalibrationsummaryview datacontext="{binding summaryviewmodel}"/>                 </frame.content>             </frame>         </tabitem.content>     </tabitem> </tabcontrol> 

i have break point on of summaryviewmodel, , getting hit code constructing in parent view model. here's property being bound to:

    public const string summaryviewmodelpropertyname = "summaryviewmodel";     private flowcalibrationsummaryviewmodel _summaryviewmodel;     public flowcalibrationsummaryviewmodel summaryviewmodel     {         { return _summaryviewmodel; }         set         {             if (_summaryviewmodel == value)                 return;              _summaryviewmodel = value;             raisepropertychanged(summaryviewmodelpropertyname);         }     } 

at point i'm stumped, cannot life of me figure out why binding not working. appreciated.

update: has being in frame. tried changing flowcalibrationsummaryview usercontrol instead of page see if helped, , didn't, tried taking out of frame wrapped in , worked. of views in project done pages consistency's sake i'd prefer page, have host in frame. there i'm missing here, or proper usage usercontrol?

i take @ answer provided in this question. seems provide specific explanation of behavior of frame in case.

unless there specific reason have chosen frame on usercontrol, better off re-implementing (and other sub-view) usercontrol instead.


Comments

Popular posts from this blog

Java 8 + Maven Javadoc plugin: Error fetching URL -

css - SVG using textPath a symbol not rendering in Firefox -

order - Notification for user in user account opencart -