Click here to Skip to main content
15,884,177 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Q2: Implement TreeView with multi level of data Pin
Pete O'Hanlon1-Jul-11 1:30
mvePete O'Hanlon1-Jul-11 1:30 
GeneralRe: Q2: Implement TreeView with multi level of data Pin
Mc_Topaz1-Jul-11 2:14
Mc_Topaz1-Jul-11 2:14 
GeneralRe: Q2: Implement TreeView with multi level of data Pin
Pete O'Hanlon1-Jul-11 2:22
mvePete O'Hanlon1-Jul-11 2:22 
QuestionQ3: Implement TreeView with two data source classes [modified] Pin
Mc_Topaz3-Jul-11 23:45
Mc_Topaz3-Jul-11 23:45 
QuestionSync call to WCF Methods Pin
NTheOne30-Jun-11 19:03
NTheOne30-Jun-11 19:03 
AnswerRe: Sync call to WCF Methods Pin
Pete O'Hanlon30-Jun-11 21:41
mvePete O'Hanlon30-Jun-11 21:41 
QuestionCreate event in UserControl Pin
jadughar30-Jun-11 10:55
jadughar30-Jun-11 10:55 
AnswerRe: Create event in UserControl Pin
Mark Salsbery30-Jun-11 13:43
Mark Salsbery30-Jun-11 13:43 
jadughar wrote:
I want to notify the page (somehow, through event) that the "SelectedValue" is changed. How can i???


You can add an event to your usercontrol class which is raised when the property is changed. The page can subscribe to this event. For example:
public event EventHandler<EventArgs> SelectedValueChanged;

object _selectedValue;
public object SelectedValue
{
    get { return _selectedValue; }
    set
    {
        if (_selectedValue != value)
        {
            _selectedValue = value;

            EventHandler<EventArgs> evnt = SelectedValueChanged;
            if (evnt != null)
                evnt(this, new EventArgs());
        }
    }
}

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Create event in UserControl Pin
jadughar30-Jun-11 21:12
jadughar30-Jun-11 21:12 
GeneralRe: Create event in UserControl Pin
Mark Salsbery1-Jul-11 6:26
Mark Salsbery1-Jul-11 6:26 
GeneralRe: Create event in UserControl Pin
jadughar1-Jul-11 7:59
jadughar1-Jul-11 7:59 
GeneralRe: Create event in UserControl Pin
Mark Salsbery1-Jul-11 8:09
Mark Salsbery1-Jul-11 8:09 
GeneralRe: Create event in UserControl Pin
jadughar1-Jul-11 10:45
jadughar1-Jul-11 10:45 
GeneralRe: Create event in UserControl Pin
Mark Salsbery1-Jul-11 12:04
Mark Salsbery1-Jul-11 12:04 
GeneralRe: Create event in UserControl Pin
jadughar2-Jul-11 0:11
jadughar2-Jul-11 0:11 
GeneralRe: Create event in UserControl Pin
Mark Salsbery2-Jul-11 6:19
Mark Salsbery2-Jul-11 6:19 
GeneralRe: Create event in UserControl Pin
jadughar3-Jul-11 22:15
jadughar3-Jul-11 22:15 
QuestionTwo-way binding requires Path or XPath error Pin
SledgeHammer0130-Jun-11 6:46
SledgeHammer0130-Jun-11 6:46 
AnswerRe: Two-way binding requires Path or XPath error Pin
Pete O'Hanlon30-Jun-11 6:56
mvePete O'Hanlon30-Jun-11 6:56 
GeneralRe: Two-way binding requires Path or XPath error Pin
SledgeHammer0130-Jun-11 7:08
SledgeHammer0130-Jun-11 7:08 
GeneralRe: Two-way binding requires Path or XPath error Pin
SledgeHammer0130-Jun-11 9:20
SledgeHammer0130-Jun-11 9:20 
QuestionRuntime Error 4008... Layout Cycle Detected... Layout Could Not Complete. Pin
NTheOne30-Jun-11 1:59
NTheOne30-Jun-11 1:59 
AnswerRe: Runtime Error 4008... Layout Cycle Detected... Layout Could Not Complete. Pin
Pete O'Hanlon30-Jun-11 2:34
mvePete O'Hanlon30-Jun-11 2:34 
QuestionIs this possible with HierarchicalDataTemplates? Pin
SledgeHammer0129-Jun-11 11:47
SledgeHammer0129-Jun-11 11:47 
QuestionShift path Pin
Lutosław27-Jun-11 22:37
Lutosław27-Jun-11 22:37 

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.