get user info from popup windows phone 8 -
i have question how user info popup control ? got code msdn cant figer out how user input text box , checkbox ... found windows phone 7 , not same ...
popup p = new popup(); private void showpopup_click(object sender, routedeventargs e) { // create content show in popup. typically // create user control. stackpanel panel1 = new stackpanel(); button button1 = new button(); border border = new border(); border.borderbrush = new solidcolorbrush(colors.black); border.borderthickness = new thickness(5.0); panel1.background = new solidcolorbrush(colors.blue); button1.content = "close"; button1.margin = new thickness(5.0); button1.click += new routedeventhandler(button1_click); textblock textblock1 = new textblock(); textblock1.fontsize = 30; textblock1.text = "the popup control"; textblock1.margin = new thickness(5.0); panel1.children.add(textblock1); panel1.children.add(button1); checkbox cb = new checkbox(); cb.name="check"; panel1.children.add(cb); textbox tb = new textbox(); tb.name = "tb"; panel1.children.add(tb); border.child = panel1; border.name = "bd"; // set child property of popup border // contains stackpanel, textblock , button. p.child = border; // set popup show on screen. p.verticaloffset = 25; p.horizontaloffset = 25; // open popup. p.isopen = true; } void button1_click(object sender, routedeventargs e) { // close popup. //i need info here ... //p.findname("bd");//doesnt work... p.isopen = false; }
i suggest take @ coding4fun toolkit's inputprompt. can see more on codeplex repository.
you can style pretty way want , tested component.
Comments
Post a Comment