Convert into a production project
You can remove SketchFlow references from a SketchFlow project to convert it into a production project. The following procedures describe how to convert a SketchFlow prototype into a production-ready project.
To convert a WPF application using Visual C#
Back up your project.
In the Projects panel, right-click the top project folder (for example, WPFPrototype1), and then click Open Folder in File Explorer.
In File Explorer, right-click the .csproj file (for example, WPFPrototype1.csproj), click Open With, and then click Notepad.
注意事項 If Notepad isn't available, click Browse, and then locate Notepad.exe. By default, Notepad.exe is located at C:\Windows\System32.
In the text file, locate and then delete the following two lines (capability flags):
<ExpressionBlendPrototypingEnabled>false</ExpressionBlendPrototypingEnabled> <ExpressionBlendPrototypeHarness>true</ExpressionBlendPrototypeHarness>
Save and close the text file.
In the References folder, locate and right-click Microsoft.Expression.Prototyping.Runtime.dll, and then click Remove from Project.
In the Projects panel, right-click the next project folder (for example, WPFPrototype1Screens), and then click Open Folder in File Explorer.
In File Explorer, right-click the .csproj file (for example, WPFPrototype1Screens.csproj), click Open With, and then click Notepad.
In the text file, locate and then delete the following two lines (capability flags):
<ExpressionBlendPrototypingEnabled>false</ExpressionBlendPrototypingEnabled> <ExpressionBlendPrototypeHarness>true</ExpressionBlendPrototypeHarness>
Save and close the text file.
In the References folder, locate and right-click Microsoft.Expression.Prototyping.Runtime.dll, and then click Remove from Project.
In the top project folder, expand the App.xaml node, and then double-click App.xaml.cs to open the file.
In the App.xaml.cs file, locate the following line of code:
[assembly: Microsoft.Expression.Prototyping.Services.SketchFlowLibraries("MyProject.Screens")]
Note the name of the screens assembly for your project, which appears in place of MyProject.Screens in the code above, for use in step 13. Once you have made note of the name of your screens assembly, delete this line of code.
In the App.xaml.cs file, locate the following code:
this.Startup += (sender, args) => this.StartupUri = new Uri(@"pack://application:,,,/ Microsoft.Expression.Prototyping.Runtime;Component/WPF/Workspace/PlayerWindow.xaml");
Replace it with the following code:
this.StartupUri = new Uri(@"pack://application:,,,/MyProject.Screens;Component/MyFileName.xaml");
提示
Replace MyProject.Screens with the name of the screens assembly for your project (see step 13).
提示
Replace MyFileName with the name of the first screen you want to display when the solution is opened.
注意事項 If, after pressing F5 to build your project, you receive the following error message, click Yes: "The project has no startup scene and may not have a main window visible after running. Do you want to continue?"
To convert a WPF application using Visual Basic
Back up your project.
In the Projects panel, right-click the top project folder (for example, WPFPrototype1), and then click Open Folder in File Explorer.
In File Explorer, right-click the .vbproj file (for example, WPFPrototype1.vbproj), click Open With, and then click Notepad.
注意事項 If Notepad isn't available, click Browse, and then locate Notepad.exe. By default, Notepad.exe is located at C:\Windows\System32.
In the text file, locate and then delete the following two lines (capability flags):
<ExpressionBlendPrototypingEnabled>false</ExpressionBlendPrototypingEnabled> <ExpressionBlendPrototypeHarness>true</ExpressionBlendPrototypeHarness>
Save and close the text file.
In the References folder, locate and right-click Microsoft.Expression.Prototyping.Runtime.dll, and then click Remove from Project.
In the Projects panel, right-click the next project folder (for example, WPFPrototype1Screens), and then click Open Folder in File Explorer.
In File Explorer, right-click the .vbproj file (for example, WPFPrototype1Screens.vbproj), click Open With, and then click Notepad.
In the text file, locate and then delete the following two lines (capability flags):
<ExpressionBlendPrototypingEnabled>false</ExpressionBlendPrototypingEnabled> <ExpressionBlendPrototypeHarness>true</ExpressionBlendPrototypeHarness>
Save and close the text file.
In the References folder, locate and right-click Microsoft.Expression.Prototyping.Runtime.dll, and then click Remove from Project.
In the top project folder, expand the App.xaml node, and then double-click App.xaml.vb to open the file.
In the App.xaml.cs file, locate the following code:
[assembly: Microsoft.Expression.Prototyping.Services.SketchFlowLibraries("MyProject.Screens")]
Note the name of the screens assembly for your project, which appears in place of MyProject.Screens in the code above, for use in step 13. Once you have made note of the name of your screens assembly, delete the line of code.
In the App.xaml.vb file, locate the following code:
Me.StartupUri = New Uri("pack://application:,,,/ Microsoft.Expression.Prototyping.Runtime;Component/WPF/Workspace/PlayerWindow.xaml")
Replace it with the following code:
Me.StartupUri = New Uri("pack://application:,,,/MyProject.Screens;Component/MyFileName.xaml")
提示
Replace MyProject.Screens with the name of the screens assembly for your project (see step 13).
提示
Replace MyFileName with the name of the first screen you want to display when the solution is opened.
注意事項 If, after pressing F5 to build your project, you receive the following error message, click Yes: "The project has no startup scene and may not have a main window visible after running. Do you want to continue?"
To convert a Silverlight application using Visual C#
Back up your project.
In the Projects panel, right-click the top project folder (for example, SilverlightPrototype1), and then click Open Folder in File Explorer.
In File Explorer, right-click the .csproj file (for example, SilverlightPrototype1.csproj), click Open With, and then click Notepad.
注意事項 If Notepad isn't available, click Browse, and then locate Notepad.exe. By default, Notepad.exe is located at C:\Windows\System32.
In the text file, locate and then delete the following two lines (capability flags):
<ExpressionBlendPrototypingEnabled>false</ExpressionBlendPrototypingEnabled> <ExpressionBlendPrototypeHarness>true</ExpressionBlendPrototypeHarness>
Save and close the text file. When prompted to reload the project file, click Yes.
In the References folder, locate and right-click Microsoft.Expression.Prototyping.Runtime.dll, and then click Remove from Project.
Right-click the top project folder again, and then click Add Reference. In the Add Reference dialog box, browse to the Microsoft Silverlight SDK, and then locate and click the System.Windows.Controls.Navigation.dll. The default location is C:\Program Files\Microsoft SDKs\Silverlight\v3.0\Libraries\Client.
Click Open.
In the Projects panel, right-click the next project folder (for example, SilverlightPrototype1Screens), and then click Open Folder in File Explorer.
In File Explorer, right-click the .csproj file (for example, SilverlightPrototype1Screens.csproj), click Open With, and then click Notepad.
In the text file, locate and then delete the following two lines (capability flags):
<ExpressionBlendPrototypingEnabled>false</ExpressionBlendPrototypingEnabled> <ExpressionBlendPrototypeHarness>true</ExpressionBlendPrototypeHarness>
Save and close the text file.
In the References folder, locate and right-click Microsoft.Expression.Prototyping.Runtime.dll, and then click Remove from Project.
In the top project folder, expand the App.xaml node, and then double-click App.xaml.cs to open the file.
In the App.xaml.cs file, locate the following code:
[assembly: Microsoft.Expression.Prototyping.Services.SketchFlowLibraries("MyProject.Screens")]
Note the name of the screens assembly for your project, which appears in place of MyProject.Screens in the code above, for use in step 15. Once you have made note of the name of your screens assembly, delete the line of code.
In the App.xaml.cs file, locate the following code:
this.RootVisual = new Microsoft.Expression.Prototyping.Workspace.PlayerWindow();
Replace it with the following code:
this.RootVisual = new System.Windows.Controls.Frame() { Source = new Uri("/MyProject.Screens;component/MyFileName.xaml", UriKind.Relative) };
提示
Replace MyProject.Screens with the name of the screens assembly for your project (see step 15).
提示
Replace MyFileName with the name of the first screen you want to display when the solution is opened.
注意事項 If, after pressing F5 to build your project, you receive the following error message, click Yes: "The project has no startup scene and may not have a main window visible after running. Do you want to continue?"
To convert a Silverlight application using Visual Basic
Back up your project.
In the Projects panel, right-click the top project folder (for example, SilverlightPrototype1), and then click Open Folder in File Explorer.
In File Explorer, right-click the .vbproj file (for example, SilverlightPrototype1.vbproj), click Open With, and then click Notepad.
注意事項 If Notepad isn't available, click Browse, and then locate Notepad.exe. By default, Notepad.exe is located at C:\Windows\System32.
In the text file, locate and then delete the following two lines (capability flags):
<ExpressionBlendPrototypingEnabled>false</ExpressionBlendPrototypingEnabled> <ExpressionBlendPrototypeHarness>true</ExpressionBlendPrototypeHarness>
Save and close the text file. When prompted to reload the project file, click Yes.
In the References folder, locate and right-click Microsoft.Expression.Prototyping.Runtime.dll, and then click Remove from Project.
Right-click the top project folder again, and then click Add Reference. In the Add Reference dialog box, browse to the Silverlight SDK, and then locate and click the System.Windows.Controls.Navigation.dll. The default location is C:\Program Files\Microsoft SDKs\Silverlight\v3.0\Libraries\Client.
Click Open.
In the Projects panel, right-click the next project folder (for example, SilverlightPrototype1Screens), and then click Open Folder in File Explorer.
In File Explorer, right-click the .vbproj file (for example, WPFPrototype1Screens.vbproj), click Open With, and then click Notepad.
In the text file, locate and then delete the following two lines (capability flags):
<ExpressionBlendPrototypingEnabled>false</ExpressionBlendPrototypingEnabled> <ExpressionBlendPrototypeHarness>true</ExpressionBlendPrototypeHarness>
Save and close the text file.
In the References folder, locate and right-click Microsoft.Expression.Prototyping.Runtime.dll, and then click Remove from Project.
In the top project folder, expand the App.xaml node, and then double-click App.xaml.cs to open the file.
In the App.xaml.cs file, locate the following code:
[assembly: Microsoft.Expression.Prototyping.Services.SketchFlowLibraries("MyProject.Screens")]
Note the name of the screens assembly for your project, which appears in place of MyProject.Screens in the code above, for use in step 15. Once you have made note of the name of your screens assembly, delete the line of code.
In the App.xaml.cs file, locate the following code:
Me.RootVisual = New Microsoft.Expression.Prototyping.Workspace.PlayerWindow()
Replace it with the following code:
Me.RootVisual = New System.Windows.Controls.Frame() With {.Source = New Uri("/MyProject.Screens;component/MyFileName.xaml", UriKind.Relative)}
提示
Replace MyProject.Screens with the name of the screens assembly for your project (see step 15).
提示
Replace MyFileName with the name of the first screen you want to display when the solution is opened.
注意事項 If, after pressing F5 to build your project, you receive the following error message, click Yes: "The project has no startup scene and may not have a main window visible after running. Do you want to continue?"