Table of Contents
- Getting Started
- EO.Pdf
- EO.Web
- EO.WebBrowser
- EO.Wpf
- Overview
- Installation & Deployement
- Skin & Theme
- Common Taskes and Services
- EO.Wpf Buttons
- EO.Wpf Calendar & DatePicker
- EO.Wpf ComboBox
- EO.Wpf DockView
- EO.Wpf Gauge
- EO.Wpf ListBox
- EO.Wpf Menu
- EO.Wpf MaskedEdit
- EO.Wpf ProgressBar
- EO.Wpf Slider
- EO.Wpf SpinEdit
- EO.Wpf SplitView
- EO.Wpf TabControl
- EO.Wpf TreeView
- EO.Wpf Utility Controls
- EO.Wpf WindowChrome
- Sample Data Objects
- Common Topics
- Reference
Project Setup |
Overview
This section contains information about how to setup your project to use EO.Wpf library.
Add Reference to EO.Wpf.dll
Before you can use EO.Wpf in your project, you must reference EO.Wpf.dll.
Follow these steps to add the reference:
- Download and install EO.Total from http://www.essentialobjects.com/Download.aspx if you have not already done so. Note that you only need to install it on your own development machine (no need to install on your customers' machines);
- Open the project you wish to use EO.Wpf with Visual Studio. The following steps are based on Visual Studio. If you use another development tool rather than Visual Studio, then the actual steps can be different. However the basic tasks and ideas are the same;
-
For C# user:
- Select Solution Explorer from View menu to open Solution Explorer;
- Right click Reference under the project that you wish to use EO.Wpf, select Add Reference. The Add Reference dialog opens;
-
For Visual Basic.NET user:
- Right click your project, then select Properties;
- Click References tab on the left;
- Click the drop down arrow on the Add... button below the References list;
- Click Reference... from the drop down menu;
- Click Browse tab, then browse for EO.Wpf.dll ( the default installation location is "c:\Program Files\Essential Objects\EO.Total xxxx" on 32 bit Windows and "c:\Program Files (x86)\Essential Objects\EO.Total xxxx" on 64 bit Windows, where "XXXX" is the version number), then click OK;
-
Alternatively, you can also add EO.Wpf.dll to GAC, then click .NET tab, select EO.Wpf from the list, then click OK to reference the DLL from GAC.
To add EO.Wpf.dll to GAC, click Start -> All Programs -> EO.Total xxxx -> GAC and COM Registration Tool, where "xxxx" is the version number. You can also add the DLL to GAC manually following this MSDN article (search for "How to: Install an Assembly into the Global Assembly Cache" online if the link is no longer valid).
- Now you can start using EO.Wpf classes in your code.
Upgrade from an older version
If you upgrade to a newer version of EO.Wpf library, you may need to manually delete the reference to the old DLL and then add the reference to the new one. The steps to add reference is the same as above in this case. Follow these steps to delete the reference:
- Open your project;
- Select Solution Explorer from View menu to open Solution Explorer;
-
For C# user:
- Expand Reference;
- Delete EO.Wpf from the list;
-
For Visual Basic.NET user:
- Right click your project, then select Properties;
- Click References tab on the left;
- Select EO.Wpf from the References list;
- Click Remove to delete the reference;
Once the reference to the old DLL is deleted, you can follow the initial setup steps to add a reference to the new DLL.
Add "eo" Namespace Prefix in Your XAML file
The next step is to add "eo" namespace prefix in your XAML file. Simply add the following attribute to your Window or UserControl
xmlns:eo="http://schemas.essentialobjects.com/wpf/"
For example, your Window element may look like this:
<Window x:Class="Test.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="250" Width="350">
After adding the "eo" namespace prefix it becomes this:
<Window x:Class="Test.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:eo="http://schemas.essentialobjects.com/wpf/" Title="MainWindow" Height="250" Width="350">
Note the additional "eo" prefix added to the Window element.