c# - Which event is fired when Content property is changed -
i have 2 pages productsearch
,productdetail
, im changing content
property navigate between pages. want know if events fired can write code in it?
on productdetail
page have uielement
property
public uielement maincontent { get; set; }
on productsearch
page navigate productdetail
setting content
property this:
private void ongetdetailsclick(object sender, routedeventargs e) { productdetail productdetail = new productdetail(); productdetail.maincontent = this.content; this.content = productdetail; }
on productdetail
page's back
button navigate productsearch
:
private void onbackbuttonclick(object sender, routedeventargs e) { this.content = maincontent; }
now want know how can call method when navigate productsearch
page i.e how know have navigated productdetail
page? tried check if loads page found out when change content of control doesn't fire load
event of page. solution?
yea not execute load event since changing content obviously.
if want take advantage of navigation should check out video. if done blend concepts apply visual studio: https://vimeo.com/6599527 (simple silverlight master/detail navigation app blend 3)
you should check out articles on master detail binding one: https://msdn.microsoft.com/en-us/library/cc645060(v=vs.95).aspx
the key take advantage of powerful binding concepts come silverlight. , if not using deep linking might want consider using user control hide/show details instead of page.
hth
Comments
Post a Comment