Tuesday, 15 July 2014

Elements Scope in Expression Blend For Visual Studio

In Expression Blend our elements can have two types of scopes a project/Application Scope and a Document Scope. In easy words you can take the example of Local and Global variables in Object Oriented Programming in which local variables can be accessed in their specific class where as global variables can be accessed by any other class also. Same is the case here.
Difference between both scopes:-
Project Scope
The project scope can have the following features :
  1. Elements declared as project scope can be accessed from anywhere in your project.
  2. The project scope means that the element can be used in any procedure or subroutine in the program.
Document Scope
The document scope can have the following features:
  1. The project scope means that the element can only be used within the subroutine or program block they were declared in.
  2. You can not use the element with document scope in any other page.
So this was the difference between Project and Document Scope of your elements in expression blend, now there’s another thing in expression blend which you will find while using sample data, known as Enable sample data when application is running.
You can check this option while creating sample data. If you have checked this option it means you are going to use and display the sample data in your application or if you are going to use live data then simply unchecked this option.

No comments:

Post a Comment