Quantcast
Channel: patterns & practices: Prism
Viewing all articles
Browse latest Browse all 1878

New Post: How to activate an existing order details view in StockTraderRI ?

$
0
0
Hi,

In the code snippet you posted it seems that you are not raising the PropertyChanged event (using the RaisePropertyChanged method) for the HeaderText and BodyText properties, unless they are being raised in their corresponding setters. If that is not the case, please try adding a RaisePropertyChanged invocation for both properties at the end of the setter.

Take into account that when you change the value of a property, you need to raise the aforementioned event to inform the view of this change. If not, the view will keep showing the older values.

Regarding the "stack overflow" part, such a thing can happen if a property is accessing itself in its setter or getter. For example:
privatestring headerText;

publicstring HeaderText
{
    get { returnthis.headerText; }    // We return the value of the headerText attribute, OK.set { this.HeaderText = value; }  // We made a typo and as a result the code access this property again instead of the attribute, resulting in a stack overflow.
}
I hope this helps,

Damian Cherubini
http://blogs.southworks.net/dcherubini

Viewing all articles
Browse latest Browse all 1878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>