C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




How to dynamically load view at runtime in SCSF & CAB


Posted Date: 23 Apr 2008    Resource Type: Code Snippets    Category: C# Syntax

Posted By: Hitesh Chauhan       Member Level: Bronze
Rating:     Points: 10



You can find alot example for loading view at runtime but in this code it is somthing different which you rarely find as i did not find so i worte this. In this you can load second view onclick on button click that is part of first view. Before loading second view you have to check whether it is already been added or not.

_presenter is the first view presenter from where we are loading second view.

PrimaryWorkspace: is workspace name


private void changeColorButton_Click(object sender, EventArgs e)
{

if (_presenter.WorkItem.SmartParts.FindByType().Count == 0)
{
secondView = _presenter.WorkItem.SmartParts.AddNew();
_presenter.WorkItem.Workspaces["PrimaryWorkspace"].Show(secondView );

}

}



If any one interested to learn SCSF & CAB please let me know i'll show u the way to start SCSF..




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Instance and Static Constructors
Previous Resource: How do I get the path to my running EXE?
Return to Discussion Resource Index
Post New Resource
Category: C# Syntax


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

conference calls

Contact Us    Privacy Policy    Terms Of Use