edit textblock's maxheight when it's embedded within a datatemplate

146 Views Asked by At

how do i pass in a 2nd parameter to a Silverlight application (Application_Startup()), edit a textblock's attribute 'MaxHeight' (textblock is embedded within a datatemplate)? Users set the maxheight via the Silverlight control's properties.

2

There are 2 best solutions below

2
Thorsten Hans On

you can pass multiple parameters by using Silverlight's initparams. you have to use a comma as delimiter

<param name="initParams" value="favColor=Blue,callbackUrl=http://abc.def.com/mycallback.svc"/>

Thorsten

5
Vinit Sankhe On

Assuming that your MaxHeight value is available on the web page (in HTML or Javascript) there are many ways to interact with the HTML / DOM from Silverlight plugin... you could use the ScriptObjects... http://pietschsoft.com/post/2008/06/Silverlight-and-JavaScript-Interop-Basics.aspx.

Is this what you are looking for?