Creating a new Windows Presentation Foundation Application
you
will create an empty WPF application using
the WPF Application Visual Studio
template, and add to the solution the FirstApp project .
- Open Microsoft Visual Studio 2010 from Start | All Programs | Microsoft Visual Studio 2010 | Microsoft Visual Studio 2010.
- Create
a new project in Visual Studio 2010
of type WPF Application like this image.
Create WPF Application in C#
- To do this, point to New on
the File menu, and then click Project. Click Windows in either Visual C# Installed Templates list. In the Templates pane, click WPF Application, and make sure that .NET Framework 4.0 is selected as the target runtime. Finally, set the project's name to FirstApp, set the location,
and then click OK.
- If you use Visual Basic you will do the same step 2 and 3 but chase Visual Basic from Installed Templates list like that
Create WPF Application by VB.net - If you want to change the target framework of the FirstApp to .NET Framework 3.5. In Solution Explorer , right-click the FirstApp project and select Properties.
- For C# projects, click the Application tab and select the .NET Framework 3.5 option in the Target Framework dropdown list like that.
- For Visual Basic projects, select the Compile tab and click the Advanced Compile Options button. In the Advanced Compiler Settings dialog box select the .NET Framework 3.5 option of the Target Framework dropdown list and click OK like that.
- To add references to Workflow assemblies. To do this, in Solution Explorer right-click the FirstApp project and select Add Reference. In the Add Reference dialog box, switch to the .NET tab and select:◦ System.Activities◦ System.Activities.Core.Presentation◦ System.Activities.PresentationClick OK to add the references like this.Adding references to WorkflowModel assemblies
Changing the target framework in C# projects
|
Changing the target framework in Visual Basic projects
|
No comments:
Post a Comment