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

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -