Click here to Skip to main content
15,891,597 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: A few newb MVVM (WPF) questions... Pin
Pete O'Hanlon18-Oct-10 9:55
mvePete O'Hanlon18-Oct-10 9:55 
GeneralRe: A few newb MVVM (WPF) questions... Pin
SledgeHammer0118-Oct-10 10:37
SledgeHammer0118-Oct-10 10:37 
GeneralRe: A few newb MVVM (WPF) questions... Pin
Pete O'Hanlon19-Oct-10 2:18
mvePete O'Hanlon19-Oct-10 2:18 
AnswerRe: A few newb MVVM (WPF) questions... Pin
si61821-Oct-10 19:33
si61821-Oct-10 19:33 
AnswerRe: A few newb MVVM (WPF) questions... [SOLUTION] Pin
AndrewSmith22-Oct-10 17:08
AndrewSmith22-Oct-10 17:08 
QuestionConnect silverlight project to web project. Pin
dbrenth15-Oct-10 10:55
dbrenth15-Oct-10 10:55 
AnswerRe: Connect silverlight project to web project. Pin
Abhinav S15-Oct-10 18:41
Abhinav S15-Oct-10 18:41 
QuestionDynamically instantiate UserControl, try to find which UserControl fired an event in an event Handler? Pin
Jean DUSUD14-Oct-10 11:38
Jean DUSUD14-Oct-10 11:38 
I wrote a UserControl with a button inside: btn1

In the Main code, I dynamically instantiate some of my UserControl and dynamically wire an event handler to the click event of the UserControl Button btn1.
In this event Handler I want to find which object fired the event: oUserControl1, oUsercontrol2, oUserControlN ???
Thanks

Jean

public partial class MainWindow : Window
{
int i = 0;

public MainWindow()
{
  InitializeComponent();
}

private void newUserControl_Click(object sender, RoutedEventArgs e)
{

  MyUserControl oMyUserControl = new MyUserControl();

  oMyUserControl.Name = "UC" + i;
  i++;

  oMyUserControl.btn1.Click += new RoutedEventHandler(btn1_Click);

  MyStackPanel.Children.Add(oMyUserControl);
}

void btn1_Click(object sender, RoutedEventArgs e)
{
  // Want to get the name of the instance of MyUserControl who call this Handler. 
}
}

AnswerRe: Dynamically instantiate UserControl, try to find which UserControl fired an event in an event Handler? Pin
Abhinav S14-Oct-10 17:24
Abhinav S14-Oct-10 17:24 
AnswerRe: Dynamically instantiate UserControl, try to find which UserControl fired an event in an event Handler? Pin
#realJSOP15-Oct-10 9:04
mve#realJSOP15-Oct-10 9:04 
GeneralRe: Dynamically instantiate UserControl, try to find which UserControl fired an event in an event Handler? Pin
Jean DUSUD18-Oct-10 11:00
Jean DUSUD18-Oct-10 11:00 
QuestionDataGrid SelectionChanged event is firing only on first row selected. Pin
Member 392066714-Oct-10 4:56
Member 392066714-Oct-10 4:56 
AnswerRe: DataGrid SelectionChanged event is firing only on first row selected. Pin
torken214-Oct-10 20:37
professionaltorken214-Oct-10 20:37 
QuestionReportViewer does not export PDF for wingdings fonts Pin
ausadmin12-Oct-10 11:15
ausadmin12-Oct-10 11:15 
AnswerRe: ReportViewer does not export PDF for wingdings fonts Pin
phil.o13-Oct-10 2:24
professionalphil.o13-Oct-10 2:24 
GeneralRe: ReportViewer does not export PDF for wingdings fonts Pin
ausadmin17-Oct-10 10:51
ausadmin17-Oct-10 10:51 
GeneralRe: ReportViewer does not export PDF for wingdings fonts Pin
ausadmin31-Oct-10 12:46
ausadmin31-Oct-10 12:46 
AnswerRe: Prism- Can't add reference to Unity Pin
Abhinav S12-Oct-10 4:59
Abhinav S12-Oct-10 4:59 
GeneralRe: Prism- Can't add reference to Unity Pin
Abhinav S12-Oct-10 5:51
Abhinav S12-Oct-10 5:51 
GeneralRe: Prism- Can't add reference to Unity Pin
Abhinav S12-Oct-10 6:45
Abhinav S12-Oct-10 6:45 
QuestionFail to do binding Template Property Pin
Yanshof12-Oct-10 3:42
Yanshof12-Oct-10 3:42 
AnswerRe: Fail to do binding Template Property Pin
Ravi Mori14-Oct-10 21:29
Ravi Mori14-Oct-10 21:29 
QuestionChange the text in the URL as a hyperlink. Pin
rus20411-Oct-10 3:44
rus20411-Oct-10 3:44 
QuestionHow to install a desktop WPF application Pin
Aseem Sharma10-Oct-10 17:01
Aseem Sharma10-Oct-10 17:01 
AnswerRe: How to install a desktop WPF application Pin
Abhinav S10-Oct-10 20:29
Abhinav S10-Oct-10 20:29 

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.