﻿function createPolygons() {
  Silverlight.createObjectEx( {
    source: "Xaml/Polygons.xaml", 
    parentElement: document.getElementById("polygonPlaceHolder"),
    id: "silverlightControl",
    properties: {
      width: "330", height: "330", version: "1.0", background: "White", isWindowless: "true", inplaceInstallPrompt: true },
    events: { onLoad: LoadPolygons }
    }
  );
}

function LoadPolygons(control, context, rootElement) {
  rootElement.findName("Show_Polygons").begin();
}