Quantcast
Channel: Caliburn.Micro: Xaml Made Easy
Viewing all articles
Browse latest Browse all 1760

New Post: TabViewModel - Data not displaying

$
0
0
Was looking over your code again...

use the constructor to setup your CallerId only, don't pass any other data in when you do your activateditem call only the ID...

[ImportingConstructor]
public CallerDetailsViewModel(int callerID)
{
   CallerId = callerId;     
}

there are more than one override take a look at them while you are at it..

protected override void OnActivate(){
do your service call here see what happens...

CallerService.Caller serviceCaller = new CallerServiceClient().GetCaller(callerID);
  Caller = new Caller
  {
    CallerID = serviceCaller.CallerID,
    Surname = serviceCaller.Surname,
    GivenNames = serviceCaller.GivenNames,
    EmailAddress = serviceCaller.EmailAddress,
    Phone = serviceCaller.Phone
  };
}

Also you won't have to do update triggers it's built into CM already. Just make sure if you wanted to make changes to values of the said underlying property you have to set Mode = TwoWay.

One other thing to give a try on is AllActive on the inherited Conductor for your Shell since your Shell is another UserControl, at least from what I see on snippets provided.

Viewing all articles
Browse latest Browse all 1760

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>