c# - is there a e.ClickedItem for holding event -



c# - is there a e.ClickedItem for holding event -

hi in clicked event able details of button clicked this

private async void bedgridview_itemclick(object sender, itemclickeventargs e) { commonvariables.patientdetailsdict["bed_number"] = (e.clickeditem bedmodelv2).bed_number; }

i wondering if there similar holding event info of selected item. code below not work holdingstate or originalsource.

private async void bedgridview_holding(object sender, holdingroutedeventargs e) { commonvariables.patientdetailsdict["bed_number"] = (e.originalsource bedmodelv2).bed_number;

}

i'm guessing you're using wp8.1 because gridview supported in wp8.

to reply question can selecteditem of gridview referencing name or converting sender object in holding event so:

<!-- define gridview --> <gridview x:name="mygv" holding="mygv_holding"></gridview> class="lang-c# prettyprint-override">private void mygv_holding(object sender, holdingroutedeventargs e) { var selecteditem = this.mygv.selecteditem; // reference name // var selecteditem = (sender gridview).selecteditem; // reference converting sender }

once got .selecteditem object based off viewmodel can convert did in original code.

commonvariables.patientdetailsdict["bed_number"] = (selecteditem bedmodelv2).bed_number;

c# wpf xaml windows-phone-8

Comments

Popular posts from this blog

java Multi query from Mysql using netbeans -

c# - DotNetZip fails with "stream does not support seek operations" -

c++ - StartServiceCtrlDispatcher don't can access 1063 error -