I was wondering if you could help me with a problem:

Consider the following dialog which contains two screens. The first screen shows a StringElement (called 'address') along with a RootElement which navigates to the second screen which has an EntryElement (called 'searchAddress').

RootElement root = new RootElement("Welcome");
StringElement address = new StringElement("Address","");
EntryElement searchAddress = new EntryElement("Enter an address","");

root.Add(new Section(){
     address,
     new RootElement("Search for Address"){
         searchAddress
     }
}
Root = root;

Problem: How do I pass the contents/Value of searchAddress (EntryElement) back to address (StringElement) on the previous screen?

有帮助吗?

解决方案

You just have to implement the Changed event on the EntryElement and then call to Dialog.ReloadData(),something like this:

    searchAddress.Changed += (s,e) => {
            address.Value = searchAddress.Value;
            this.ReloadData();
        };
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top