Try this;
silverlightControl.Width = new Unit("100%");
It seems to work for me except that my control isn't showing up when I add
it to the controls. Not sure what I've missed there. Can you post the web
form so I can compare it with mine?
cheers,
Stephen
On Mon, Sep 1, 2008 at 2:55 PM, Philip Beadle <[EMAIL PROTECTED]>wrote:
>
>
> Any ideas how to set the control width and height in code to 100%?
>
>
>
>
>
>
>
> Dim silverlightControl As
> NewSystem.Web.UI.SilverlightControls.Silverlight
>
> silverlightControl.ID = "TechEd2008"
>
> silverlightControl.MinimumVersion = "2.0.30523"
>
> silverlightControl.Source = "~/ClientBin/SL_TechEd.xap"
>
> silverlightControl.Width = 700
>
> silverlightControl.Height = 700
>
> Dim initParams As String = String.Format(
> "ModuleId={0},IsEditable={1}", ModuleId.ToString, Me
> .ModuleContext.IsEditable)
>
> silverlightControl.InitParameters = initParams
>
> phSilverlight.Controls.Add(silverlightControl)
>
>
>
> Regards,
>
> *Philip Beadle*
> Readify | Principal Consultant
> Microsoft MVP - ASP/ASP.NET <http://asp.net/>, MCAD, MCT
>
> [image: cid:[email protected]]
>
> Suite 206 Nolan Tower | 29 Rakaia Way | Docklands | VIC 3008 | Australia
> M: +61 417 301 024 | E: [EMAIL PROTECTED] | C:
> [EMAIL PROTECTED] | W: www.readify.net
> ------------------------------
>
> The content of this e-mail, including any attachments is a confidential
> communication between Readify Pty Ltd and the intended addressee and is for
> the sole use of that intended addressee. If you are not the intended
> addressee, any use, interference with, disclosure or copying of this
> material is unauthorized and prohibited. If you have received this e-mail in
> error please contact the sender immediately and then delete the message and
> any attachment(s).
>
> *P** **Please consider your environmental responsibility before printing
> this e-mail*
>
>
> -------------------------------------------------------------------
> OzSilverlight.com - to unsubscribe from this list, send a message back to
> the list with 'unsubscribe' as the subject.
> Powered by mailenable.com - List managed by www.readify.net
-------------------------------------------------------------------
OzSilverlight.com - to unsubscribe from this list, send a message back to the
list with 'unsubscribe' as the subject.
Powered by mailenable.com - List managed by www.readify.net
<<image001.gif>>
