c# - Catel custom View creation -


i create custom window , show without iuivisualizerservice catel.

the problem is: when create window, bind viewmodel it, seems view not react on properties changes.

i have done following:

var photo = new photo(); newphotowindow newphotowindow = new newphotowindow(); var viewmodel = new newphotowindowviewmodel(photo); newphotowindow.datacontext = viewmodel;  newphotowindow.showdialog(); 

is there way create via kind of viewlocator?

i have tried typefactory, not allow me put photo model viewmodel.

you shouldn't manually doing viewmodel creation in catel. it's done automatically.

this should sufficient:

uivisualizerservice.showdialog<newphotowindow>(); 

this automatically:

  1. resolve vm belongs newphotowindow (newphotowindowviewmodel or newphotoviewmodel).
  2. instantiate vm using iviewmodelfactory
  3. create window , set vm it

Comments

Popular posts from this blog

java - BeanIO write annotated class to fixedlength -

Using Java 8 lambdas/transformations to combine and flatten two Maps -

How to connect android app to App engine -