Home > Net >  XAML binding phase
XAML binding phase

Time:09-20

Xamarin xaml corresponds to a viewmodel in MinePage. Xaml in the constructor of binding,
 
Public MinePage ()
{
This. BindingContext=Container. Default. Get (a);
InitializeComponent ();
}


I want to ask is, such as Tabepage inside three PAGE (PAGE1, PAGE2, MinePage) in open the app, initialize a three PAGE at the same time,
There are two questions:

1. MineViewModel and MinePage. Xaml bindings in the initialization phase only?

From page1 to MinePage repeatedly, from MinePage to page1. When MinePage show, there will be a binding,

2. Sqlite database Shared by three interface, if the operation of the database in the page1, how in MinePage display, also update the interface,

I want to call in the event of onAppearing update, but don't know how to manipulate MineViewModel objects to read database, MinePage. It seems to operation in the xaml. Cs is less than

MineViewModel object, I have don't want to move the logic of MineViewModel to MinePage. The xaml. Cs,

CodePudding user response:

Remember where seen, *. Xaml. Cs can operation to the binding class viewmodel object, is can't think of it, also don't know what this technology is called belong to, reflection??
  •  Tags:  
  • C#
  • Related