[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

C# WPF functionality

Posted on 2016-08-16
6
Medium Priority
?
26 Views
Last Modified: 2016-08-24
Could anybody help, I need to call a method in main window from a WPF user control and I changed this method to "static" and now for all field involved in this method I also got a message "an object reference is required for the non-static field method or property".
How can I resolve this?
0
Comment
Question by:ybt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 45

Expert Comment

by:AndyAinscow
ID: 41757973
Simply by changing it back to what it was originally.  The 'static' keyword should only be used if it is really needed.  You can probably do what you want without having to make a major underlying change as to how things operate (by using static) in the background.
0
 

Author Comment

by:ybt
ID: 41757995
By changing it back, how can I call it from WPF user control?
0
 
LVL 45

Assisted Solution

by:AndyAinscow
AndyAinscow earned 2000 total points
ID: 41758999
Have a look at the following.  I think it will supply all the information you need.
http://stackoverflow.com/questions/25020916/interaction-between-two-usercontrols-in-wpf-without-using-mvvm
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 45

Expert Comment

by:AndyAinscow
ID: 41759001
You need to use events to communicate
Also look at
https://msdn.microsoft.com/en-us/library/ff725477(v=expression.40).aspx
0
 

Accepted Solution

by:
ybt earned 0 total points
ID: 41762529
0
 

Author Closing Comment

by:ybt
ID: 41768454
It makes exactly what I needed.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question