1
Vote

A rich Silverlight UI for editing InitParams and still remain Generic.

description

Motivation-
You have a slide show Silverlight application deloyed in SharePoint. The customization of this Application using the raw InitParams route is cumbersome. It would be nice to have an UI that would let the user chose a SharePoint Picture library and the pictures in that library that would be displayed in the application at runtime. The approach below provides an answer to this problem without losing the Generic-ness of the web part.

Simple Approach-
Use the existing Grid like UI to edit the InitParams

Avanced approach-
The Generic Web Part should be modified such that the end user could specify an additional .XAP file that would be emit the InitParams comma separated string

Presently, the Grid like UI reads the CSV string out of a HTML element and writes back to the same. This is the fundamental approach and it should be extended to custom editor Silverlight Applications.

Details -
In the Advanced Editor Part
Provide a check box (use Custom UI) and a tex box (URL of custom XAP). Both these properties will be persisted.
If check box is checked then enable the text box, otherwise disable. This should be done using Java script.
Alongside the text box, provide a popup button. Clicking the button should popup a multi-line text box where the user could specify the path to the .XAP representing the custom UI

In the Basic Editor Part,
Modify the underlying implementation such that when the user clicks on the 'Advanced Init Params' button, the popup dialog should render the custom UI .XAP

Challenge -
Would the code of the custom UI .XAP know about the context. E.g. From which site it has been invoked, so that it can initialize it's UI accordingly. E.g. The custom UI may want to show artefacts from the current site.

comments