How to Add a Javascript Resource File to a Skinnable or Custom Control
Step by step - how to add a JavaScript resource file to a control
Categories: Custom Controls, Skinnable and Inherited Controls
|
Tags: Developers, JavaScript, 2. Intermediate, 3. Advanced, Customization, DHTML, v6.4 and Later
Revision:
1
Posted:
26/July/2011
Updated:
27/July/2011
Status:
Publish
Types: Walkthrough
|
OverviewThis article details how to properly add a JavaScript file resource to a current skinnable or custom Visual WebGui control. If you do not already have a skinnable control and would like to create one, view this article here. If you do not already have a custom control and would like to create one, view this article here. Adding the File Through the Skin Designer1. Build the project that contains the skinnable or custom control you wish to add the script resource to. 2. Right click on the control's skin class item in the Solution Explorter pane and select "View Designer".  3. Open the resource type drop-down on the top and select "Scripts".  4. Open the "Add Resource" drop-down and select "Add New..."  5. At this point you have a new resource file with a default name. You are allowed to change the default name, to make it correspond with other resources or any other reason. Setting the script resource file propertiesSelect the script resource item of the file we just added on the Skin Designer. You should be able to see that the PropertyGrid of ther properties pane reflects the properties of the selected resource item.  We now need to set the following properties accordingly: - ComplierActions: Set what the Visual WebGui resource complier should do with this resource. All three: "RemoveComments", "RemoveWhitespaces" and "ApplyObscuring" should be selected".
- Presentation: The "Browser" option should be set as this resource is only relevant for a DHTML presentation layer.
- PresentationEngine: This setting determines to what browser/s this resource file should be available. The default is "Agnostic" which means - to all. You can alternatively select specific browser types, as shown in the image below.
 - PresentationRole: Should be set to "BrowserCode". The other options are not relevant to script files.
Related Articles
About the author
Related Articles
|
Custom Controls
|
|
|
I played a bit around with the new 6.4 ListView control, its quite amazing what you can do with it. It opens a lot of new ways to present data in a better and more userfriendly way.
Tags:
Architects, Developers, Data Binding, C#, 2. Intermediate, 3. Advanced, Customization, Data Binding, v6.4 and Later
|
|
|
In this How to we are going to learn the basic usage of Visual WebGui RIA Platform Theme & Control designer.
Tags:
Developers, Graphic Designers, Theme, 1. Beginner, 2. Intermediate, Customization, v6.4 and Later, 3. Advanced
|
|
|
Tags:
Developers, Events, JavaScript, 1. Beginner, 2. Intermediate, Integration, Pre v6.3, v6.3, 3. Advanced
|
|
|
Tags:
Developers, Events, JavaScript, 2. Intermediate, 3. Advanced, Integration, Pre v6.3, v6.3
|
|
|
Tags:
Developers, Graphic Designers, Theme, 1. Beginner, 2. Intermediate, Customization, v6.4 and Later, 3. Advanced
|
|
|
Tags:
Developers, Events, JavaScript, 3. Advanced, Customization, v6.3
|
|
|
|