You can use Visual Studio to edit the .xaml file. Visual Studio will help you place your elements and help you avoid spelling mistakes. You can also drag and drop elements after you have created them, making it easier to update your code.
Note: Visual Studio Express for Windows or better is required for the instructions in this topic. If you don't already have Visual Studio, you can download it from Microsoft.
Example of Setting Up with Visual Studio
- Once Visual Studio is installed, launch the application and click on the "New Project..." field.
- Select the WPF Application and give the new project your desired name and location. You should also set the default path, so if you want to change the Data Standard dialog more than one time you can always use that project again.
Now that you are in your new project you should see a MainWindow.xaml tab, MainWindow.xam.cs tab, and others. You do not need the tabs, just the environment provided to edit the .xaml file. For the purposes of editing the .xaml, you want to link to the .xaml file. There is no need to bring the .xaml into the project.
- Right click on the project in Solution Explorer and move it to Add>ExistingItem.
- Browse to the .xaml file in Solution Explorer and select Add as Link.
Note: If you do not see the .xaml file, change the file type above the Add button.
- ONce you see the .xaml file in Solution Explorer, double-click on it.
An Error called Problem Loading displays.
- In the error list at the bottom of your Visual Studio window, locate the error that says that assemblies and properties or resources aren't found.
- Go to Solution Explorer and right-click on References.
- Select Add References.
- Select the Browse tab and search for dataStandard.UI.dll at this path: C:\ProgramData\Autodesk\Inventor 2014\Addins\Data Standard. Select it and click OK.
The error should disappear. If not, go to the bottom and refresh the view.
- Select the .cfg file that you want to modify in the Solution Explorer.
You will see your dialog in the design window. At this you can select an area in the dialog and Visual Studio jumps to that part in your xaml file. Now you can begin inserting or modifying fields. See Configure Your Dialog for more information.