Compatability with Silverlight 4 RC and VS2010 RC

Mar 15, 2010 at 10:25 PM

I was upgrading to the latest Silverlight 4 RC and noticed some compilation issue with TabControl. DynamicGeometry contains a TabControl with exactly the same namespace as the the one provided by the Silverlight. So VS2010 RC is complaining that TabControl exists in both DynamicGeoemtry.dll and System.Windows.Controls.dll during compilation. Anyone has this problem?



Mar 15, 2010 at 10:51 PM

Also, is there a plan to create a leaner version of DynamicGeometry.dll so that only the "viewer" part is included? In my case, I imagine others will have similar situation, the creation of the diagram and the "viewing/displaying" of the diagram are seperate. I only the part to display the saved LFG files. DynamicGeometry.dll weighs about 500KB - a bit on the heavy side.

Mar 16, 2010 at 6:49 AM

Regarding a player-only version of DynamicGeometry.dll - this sounds like a great idea!

Would you like to see a Silverlight .dll or a WPF .dll or both?

Do you want a version for VS 2008 or 2010 or both?

Shall I include these parts in the "player"?

  1. Actions (Undo support) - I think NO?
  2. Behaviors (to create figures) - only the Dragger?
  3. Macros - I think NO?
  4. Expressions - will have to include (also need Irony) to evaluate stuff such as A.X and A.Y for points defined by coordinate equations
  5. PropertyGrid - I think NO? Clicking a figure shouldn't display anything?
  6. Serialization - just the Deserializer?
  7. UI - no Ribbon, no TabControl?

Answering these questions will help me make a decision based on how to implement this:

  • By creating a new .csproj file and including a subset of the .cs files
  • Surround the files I'm not including in the player with #ifdef NOPLAYER - #endif (which will allow you to build the leaner assembly by defining NOPLAYER compilation constant in project properties)
  • Actually create a new assembly DynamicGeometry.Core.dll and put the player-only types there? Make DynamicGeometry.Editor.dll reference the DynamicGeometry.Core.dll?
  • Define a build configuration (PlayerOnly|AnyCPU) and include the editor-specific files in the <ItemGroup Condition= element?
  • Anything else I'm missing?


Mar 16, 2010 at 6:53 AM

As for Silverlight 4 RC - it contains the TabControl built-in, so the workaround of having our custom TabControl isn't necessary anymore. However we still do development on Silverlight 3 and need to support it for a little bit until Silverlight 4 RTW propagates everywhere.

What would you suggest?

  1. Move our TabControl from System to a custom namespace (to prevent the name conflict)?
  2. Define a conditional SILVERLIGHT4 and surround TabControl code with #if !SILVERLIGHT4
  3. Anything else?


Mar 16, 2010 at 2:05 PM

I am also very interested in a player version.  My interest is in allowing teachers to post documents that can be used for investigation and for students to post documents to share their work.  To allow for investigation the dragger would be needed. I agree that the property grid would not be appropriate.  But perhaps one day Live Geometry will have controls, such as a slider bound to a value or a button boundto an action, that could be part of the drawing.

Mar 16, 2010 at 5:58 PM

For me, I only need the Silverlight version. With VS2010 coming out in few weeks, I will vote for VS2010.

I like the idea to create a DynamicaGeometryCore.dll that handles only the display part with the editor on different dll that references the core. The core dll should have none of the Ribbon UI, serialization can also be excluded from the core as it is not needed for display,  Macro, action etc could also be outside of the core. I havn't used PropertyGrid so I can't say much about it. Dragger could stay in the core dll. Expression probably should stay in the core dll.

As for TabControl (I see there is also a WrapPanel), I suggest changing the namespace (the class name can stay);  as this is not part of the official Microsoft supported component (even though you work for MS), it should not re-use any of the out-of-box full type name that conflicts with the out of the box Silverlight controls. Otherwise, the compilation issue could arise as in my case.

Thanks a lot! It is great component and very valuable for what I am working on.




Mar 26, 2010 at 8:34 AM

I've just checked in a prototype of the LiveGeometryPlayer. The size of the .xap file was reduced from 370 KB to 200 KB. You can find it under and you can use it in your web pages like this:

    <div id="silverlightControlHost">
        <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
		  <param name="source" value=""/>
		  <param name="onError" value="onSilverlightError" />
		  <param name="background" value="white" />
		  <param name="minRuntimeVersion" value="3.0.40818.0" />
		  <param name="initParams" value="LoadFile=" />
		  <param name="autoUpgrade" value="true" />
		  <a href="" style="text-decoration:none">
 			  <img src="" alt="Get Microsoft Silverlight" style="border-style:none"/>
	    </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>

It could be used for example here

Hope this helps!

Mar 26, 2010 at 8:37 AM

As for TabControl, Silverlight 4 is coming soon, so I'll wait until we ship SL4 RTW and then rip out the TabControl sources altogether. I took it from Silverlight Toolkit since it wasn't in the box. I will also be moving all projects from Silverlight 3 to Silverlight 4 once it's out.

Sep 11, 2010 at 11:04 PM

FYI, I've just updated Live Geometry to Silverlight 4 and have removed the TabControl sources.