c# - get value from var item? -
I have a wp8 app in which the list picker binding is XML data growth and when I select the item, Src location file location I have this function when I inspect the item which I selected with the name src
Private Wide Sodalist Picture Selection Switch (Object Sender, System.Wind Controls: Selection Changed Avenues Eg. E) {// Tudo: Add Event Handler Implement here. Var items = (Sender as listPicker). Selected item; MessageBox.Show ("The selected item is:" + item); }
var the resulting type is correct - Object This is the case. To see this property you must enter SelectedItem for this is the actual type. Private Zero Glitch picture checkon changed (Object Sender, System. Windows. Control Selection, Changing Event Errs) {// TODO: Add an implementation of the event handler here. var item = (The sender in the form of ListPicker). As the selection) as expression. Blend.SampleData.soundsEFXSampleDataSource3.sound; If (item! = Null) message box Showing ("The selected item is:" + item.src); }
Comments
Post a Comment