I can assign value in the button click event. It works fine
public void NewVendor_Clicked(object sender, ClickedEventArgs e)
{ e.Source.SelectSingleNode("my:ControlSwitch", NamespaceManager).SetValue("ShowComponent");}
But I got error when I tried to do the same thing in dropdown box selection change event
public void VendorList_Changed(object sender, XmlEventArgs {
e.Site.SelectSingleNode("my:ControlSwitch", NamespaceManager).SetValue("ShowComponent");
}
The function is triggered from here
EventManager.XmlEvents["/my:myFields/my:Purchase/my:PurchaseDetails/my:Quote/my:VendorList"].Changed += new XmlChangedEventHandler(VendorList_Changed);