Click here to Skip to main content
15,890,438 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Visual Web Developer express 2010 Pin
Abhinav S1-Sep-11 21:00
Abhinav S1-Sep-11 21:00 
GeneralRe: Visual Web Developer express 2010 Pin
arkiboys1-Sep-11 22:07
arkiboys1-Sep-11 22:07 
GeneralRe: Visual Web Developer express 2010 Pin
Abhinav S1-Sep-11 22:29
Abhinav S1-Sep-11 22:29 
AnswerRe: Visual Web Developer express 2010 Pin
Columbus-MCSD2-Sep-11 4:37
Columbus-MCSD2-Sep-11 4:37 
QuestionWpf Pin
radhika 51-Sep-11 18:57
radhika 51-Sep-11 18:57 
AnswerRe: Wpf Pin
Abhinav S1-Sep-11 21:17
Abhinav S1-Sep-11 21:17 
GeneralRe: Wpf Pin
radhika 51-Sep-11 21:23
radhika 51-Sep-11 21:23 
GeneralRe: Wpf Pin
Saksida Bojan9-Sep-11 23:45
Saksida Bojan9-Sep-11 23:45 
There are sevral ways you can send complex information from child.

If you use modal mode you can always loog into child while variable is stil accsessible.

C#
if (true)
{
   ChildForm frm = new ChildForm();
   frm.ShowDialog(this); // Modal accsess
   MessageBox.Show(frm.StringToGet();
}
// MessageBox.Show(frm.StringToGet(); // This is outside scope of frm. Here form no longer exsist


You can use static class, so that class does not need to be intilaized and can be accsessd from any Form.

C#
public static class staticClass
{
   static staticClass() // static class constructior
   {
      SomeText = "Intalized in constructior";
   }
   static ~staticClass(){} // destructor of static class

   public static String SomeText;
}

// parentForm
if (true)
{
   MessageBox.Show(staticClass.SomeText); // returns Intalized in constructior
   ChildForm.ShowDialog(); 
   MessageBox.Show(staticClass.SomeText); // returns other string that was changed in child form
}


And the third option is to pass a reference to a class or to a variable. This one is the most complex. But the static class should be the best option if first option is not enough.
QuestionSwitch between diffrent languages with indexers Pin
Mc_Topaz31-Aug-11 21:37
Mc_Topaz31-Aug-11 21:37 
AnswerRe: Switch between diffrent languages with indexers Pin
Wayne Gaylard31-Aug-11 23:13
professionalWayne Gaylard31-Aug-11 23:13 
GeneralRe: Switch between diffrent languages with indexers Pin
Mc_Topaz31-Aug-11 23:36
Mc_Topaz31-Aug-11 23:36 
GeneralRe: Switch between diffrent languages with indexers Pin
Wayne Gaylard31-Aug-11 23:40
professionalWayne Gaylard31-Aug-11 23:40 
GeneralRe: Switch between diffrent languages with indexers Pin
Mc_Topaz1-Sep-11 1:57
Mc_Topaz1-Sep-11 1:57 
GeneralRe: Switch between diffrent languages with indexers Pin
Pete O'Hanlon1-Sep-11 2:09
mvePete O'Hanlon1-Sep-11 2:09 
GeneralRe: Switch between diffrent languages with indexers Pin
Mc_Topaz1-Sep-11 2:23
Mc_Topaz1-Sep-11 2:23 
GeneralRe: Switch between diffrent languages with indexers Pin
Pete O'Hanlon1-Sep-11 3:27
mvePete O'Hanlon1-Sep-11 3:27 
GeneralRe: Switch between different languages with indexers Pin
Wayne Gaylard1-Sep-11 21:50
professionalWayne Gaylard1-Sep-11 21:50 
GeneralRe: Switch between different languages with indexers Pin
Pete O'Hanlon1-Sep-11 22:27
mvePete O'Hanlon1-Sep-11 22:27 
GeneralRe: Switch between different languages with indexers Pin
Wayne Gaylard1-Sep-11 23:05
professionalWayne Gaylard1-Sep-11 23:05 
GeneralRe: Switch between different languages with indexers Pin
Pete O'Hanlon1-Sep-11 23:29
mvePete O'Hanlon1-Sep-11 23:29 
GeneralRe: Switch between different languages with indexers Pin
Mycroft Holmes1-Sep-11 23:45
professionalMycroft Holmes1-Sep-11 23:45 
GeneralRe: Switch between diffrent languages with indexers Pin
Wayne Gaylard1-Sep-11 2:39
professionalWayne Gaylard1-Sep-11 2:39 
AnswerRe: Switch between diffrent languages with indexers Pin
Abhinav S1-Sep-11 1:13
Abhinav S1-Sep-11 1:13 
Questionsilverlight - backgroundworker process [modified] Pin
arkiboys31-Aug-11 18:41
arkiboys31-Aug-11 18:41 
AnswerRe: silverlight - backgroundworker process Pin
Mycroft Holmes31-Aug-11 19:28
professionalMycroft Holmes31-Aug-11 19:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.