• USA : +1 973 910 5725
  • INDIA: +91 905 291 3388
  • info@tekslate.com
  • Login

Silver Light Application Project Files

In properties folder we find two files

  1. App Manifest.xml
  2. Assembly info.cs

App Manifest.xml

This is the application manifest file that is required to generate the application package we should not edit this file strictly prohibited

Assembly Info.cs

This file contains the name and version metadata that is embedded into the generated assembly

.xap file:-

This is silver light application package file. This file will be generated when we built the project. This is a compressed zip file which contains all the necessary files that are required to start the application

The references in silver light applications are

  • Ms corlib’dll
  • dll
  • corc.dll
  • Net.dll
  • windows.dll
  • windows.Browser.dll
  • xml.dll

Main Page files

These are the main files of silver light application that is

Page.xaml

Page.xaml.cs

Page.xaml wil contain designing of the page

Page.xaml. cs will contain code behind code in c# this page class is inherited from user control  class

Application or app files

we find two app files with the name

App. Xaml

App.xaml.cs

This App class files are required by the silver light application to display application user interface

This App class is instantiated by the silver light plug in after the .xap file is created

Silver light application project website files  

  • js

This is a java script helper files that contains functions to initialize silver light plug in instances and functions for determining the clients installed version of the plug in.

  • .Html file

html file is used to configure and instantiate the silver light plug in which downloads and runs the silver light application.

In general name of this file is concatenation of the name of the silver light application and test page.html that is if silver light application  name is “A” then html file name is A Test page. Html

If silver light application name is “B” then silver light application name is best page .html

  • .Aspx file

This file is the default startup webpage the name of this file is concatenation of sidelight application name and Testpage.sapx

Eg attest page. Xspx

  • config files

It is used to perform configuration settings of the webpage

Silver light controls

1) border                                             8)   Ellipse                                              15) pass word box

2) button                                             9)   Grid                                                  16) progress box

3) calendar                                          10) Grid splitter                                   17) Radio Button

4) Canvas                                             11) Image                                              18) Rectangle

5) check Box                                       12) list box                                            20) Scroll Bar

6) Content control                           13) Medical element                        21) Scroll viewer

22) slider

Controls added in 3.0 & 4.0 versions

27) Auto complete box                  39) popup

28) child window                              40) Repeat button

29) Data pager                                   41) Rich text Box

31) description viewer                   42) Save file dialog

32) frame                                            43) Tool Tip

33) Headered Items control        44) Tree view

34) Hyper link Button                     45) validation summary

35) link presenter                            46) View box

36) label                                               47) visualizing stickiness

37) open file dialog                          48) web browser

38) page

Text box:-

Silver Light Properties

11Back ground

11Border Brush

11Data context

11Font family

11Font size

11Is Enable

11Margin

11Max Height

11max Length

11Font style

  • Normal (default)
  • italic

11Font weight

  • Normal [Default]
  • Black   —   extra height
  • Bold   —    Light
  • Extra Bold

11min height

11min width

11Foreground

11Height

11opacity

11opacity mask

11Horizontal  alignment

  • alignment
  • center
  • Right
  • Stretch

11Render transform

11Render Transform origin

11selection back Ground

11Horizontal content alignment

  • Stretch
  • left
  • Right
  • Center

11Selection fore Ground

11Text

11Text Alignment

  •  left [default]
  •  Center
  •  Right

11Text wrapping

  • Wrap
  • Now wrap (defaults)

11Visibility visible [Default) collapsed

11Width

11Vertical alignment

  • Top (default)
  • bottom
  • center
  • stretch

11Vertical content alignment

  • Top (default)
  • bottom
  • center
  • stretch

11Horizontal scrollbar visibility

  • Disabled
  • Auto
  • visible
  • Hidden (default)

Sit  any control we create in silver light has as special class and all these controls and all these controls are available in system windows controls name space

Example to create a control at runtime

Go to page.xamlfile and write the following code in page_loaded event or in Layout root_loaded event

Private did layout Root_loaded (object sender, routed even ttrgs e)

{
Button BI = new Button()

BI.content = “Submit”;

BI.width=100;

BI.Height=40;

This layout root _chil(dren:add(d);

Screenshot_36

Run the application & check

Adding an event to the control At Runtime

For the above example additionally add the following code

Private void layout root_loadedc

{

Button BI = ne

This.layout root_children _add(B)

BI.Click +=new routed event handler (f).

}

Private void fill object sender, routed event arg
{
Textboxl.text.”Sathya”;

}
}

Summary
Review Date
Reviewed Item
Silver Light Application Project Files
Author Rating
5

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on Silver Light Application Project Files"

Leave a Message

Your email address will not be published. Required fields are marked *

Site Disclaimer, Copyright © 2016 - All Rights Reserved.