Page view counter

Did You Know That... the Silverlight object has properties, methods and events and a sub-object called content

It is useful to think of the Silverlight object as having its own object model. Within that object model, some properties, methods and events are directly accessible, such as onError,  Settings,  Source, InitParameters and CreateObject.

In addition, the Silverlight object has a sub-object named content and a second sub-object named settings

The content sub-object

it is common to access properties of the content sub-object, especially as this is how you access FindName().

plugIn.content.FindName("myRect");

However other useful properties of the content sub-object include ActualHeight. ActualWidth, CreateFromXaml, FullScreen and OnResize, among others.

The settings sub-object

Perhaps the most important properties of the settings sub-object are Background and Windowless. This sub-object also includes MaxFrameRate and a few others.

All of this is well documented under the topic Silverlight Object Models and Scripting to the Silverlight Plug-In in the Silverlight 1.0 Documentation. Scroll down to Scripting to the Silverlight Plug-In where you'll find three very useful tables

kick it on DotNetKicks.com
Published Friday, January 04, 2008 10:00 AM by jesseliberty

Comments

# re: Did You Know That... the Silverlight object has properties, methods and events and a sub-object called content

Thanks for these tips. I was wondering about the need for unique x:Name(s) within Silverlight. In some Silverlight Control examples, I have seen developers 'programatically' change the names to ensure uniqueness when adding the control multiple times. For example: www.adefwebserver.com/.../Silverlight11Control.htm

However, in my Controls, that is Silverlight Controls contained in a DLL and used in other projects, I have had no issues with adding the same control multiple times. Is this something I should be concerned with?

PS. Thank's to your video's I have been able to create some interesting albiet completely useless silverlight examples:

blogs.delphiforums.com/.../blog.aspx

Friday, January 04, 2008 11:07 AM by webm0nk3y

# re: Did You Know That... the Silverlight object has properties, methods and events and a sub-object called content

Oops. I pasted the wrong link...

www.obrienjd.com/.../Silverlight.aspx

Friday, January 04, 2008 11:14 AM by webm0nk3y

# Silverlight object's sub-objects

You've been kicked (a good thing) - Trackback from DotNetKicks.com

Sunday, January 06, 2008 1:23 PM by DotNetKicks.com

# Did You Know... How to create XAML objects in Javascript?

I have had a very strong positive reaction to focusing on the Javascript in code behind for Silverlight

Monday, February 04, 2008 1:14 PM by Blogs

# Tips of the Day: Setting properties in custom controls in 1.0

Got a nice international email today that said in part... ...things get more interesting it is a common

Tuesday, February 05, 2008 2:10 PM by Jesse Liberty - Silverlight Geek

# Tips of the Day: Setting properties in custom controls in 1.0

Got a nice international email today that said in part... ...things get more interesting it is a common

Tuesday, February 05, 2008 3:08 PM by Jesse Liberty

# Webcast Follow-up - CreateFromXAML

Today's Webcast focused on factoring out repeated creation of objects in XAML (and their manipulation

Wednesday, February 06, 2008 6:27 PM by Jesse Liberty - Silverlight Geek

# Webcast Follow-up - CreateFromXAML

Today's Webcast focused on factoring out repeated creation of objects in XAML (and their manipulation

Wednesday, February 06, 2008 7:29 PM by Blogs

# Tips of the Day: Setting properties in custom controls in 1.0

Got a nice international email today that said in part... ...things get more interesting it is a common

Wednesday, February 20, 2008 2:55 AM by Mirrored Blogs

# Webcast Follow-up - CreateFromXAML

Today's Webcast focused on factoring out repeated creation of objects in XAML (and their manipulation

Wednesday, February 20, 2008 2:55 AM by Mirrored Blogs

# Did You Know... How to create XAML objects in Javascript?

I have had a very strong positive reaction to focusing on the Javascript in code behind for Silverlight

Wednesday, February 20, 2008 2:55 AM by Mirrored Blogs