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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -