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:

  1. 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);
  2. 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;
  3. For C# user:

    1. Select Solution Explorer from View menu to open Solution Explorer;
    2. Right click Reference under the project that you wish to use EO.Wpf, select Add Reference. The Add Reference dialog opens;
  4. For Visual Basic.NET user:

    1. Right click your project, then select Properties;
    2. Click References tab on the left;
    3. Click the drop down arrow on the Add... button below the References list;
    4. Click Reference... from the drop down menu;
  5. 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;
  6. 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).

  7. 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:

  1. Open your project;
  2. Select Solution Explorer from View menu to open Solution Explorer;
  3. For C# user:

    1. Expand Reference;
    2. Delete EO.Wpf from the list;
  4. For Visual Basic.NET user:

    1. Right click your project, then select Properties;
    2. Click References tab on the left;
    3. Select EO.Wpf from the References list;
    4. 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

XAML
xmlns:eo="http://schemas.essentialobjects.com/wpf/"

For example, your Window element may look like this:

XAML
<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:

XAML
<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.