문제

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