How to Use Extended WPF Toolkit Community Edition in Your WPF Apps

How to Use Extended WPF Toolkit Community Edition in Your WPF Apps

What it is

Extended WPF Toolkit Community Edition (EWT CE) is an open-source collection of controls and utilities that extend WPF beyond the standard control set—things like DateTimePicker, PropertyGrid, AvalonDock-like controls, and additional input controls. Use it to speed development and add polished UI components without building them from scratch.

Install and add to your project

  1. Install via NuGet (recommended)

    • In Visual Studio, open Package Manager Console and run:

      Code

      Install-Package Extended.Wpf.Toolkit
    • Or use the NuGet UI: search for Extended.Wpf.Toolkit and install the latest stable Community Edition.
  2. Add project reference (alternative)

    • Download the release DLLs from the project’s GitHub releases and add them to your project References.
  3. Set target frameworks

    • Ensure your project targets a compatible .NET Framework or .NET Core/NET (e.g., .NET 6/7/8 or .NET Framework 4.7.2+) per the package documentation.

Register namespaces in XAML

Add the toolkit XML namespace to your Window or UserControl:

xml

If using specific sub-packages, adjust the namespace according to the control documentation.

Common controls and examples

  1. DateTimePicker

xml

<xctk:DateTimePicker Value={Binding SelectedDate, Mode=TwoWay} Format=Long/>
  1. PropertyGrid

xml

<xctk:PropertyGrid SelectedObject={Binding CurrentSettings} />

Use attributes like [Category], [DisplayName], and [Description] on your model to control the grid.

  1. ColorPicker

xml

<xctk:ColorPicker SelectedColor={Binding ChosenColor, Mode=TwoWay} />
  1. MaskedTextBox

xml

<xctk:MaskedTextBox Mask=000-00-0000 Text={Binding SSN, Mode=TwoWay} />
  1. BusyIndicator

xml

<xctk:BusyIndicator IsBusy={Binding IsLoading}> <Grid></Grid> </xctk:BusyIndicator>

MVVM integration tips

  • Bind control properties to ViewModel properties using INotifyPropertyChanged.
  • For commands, use RelayCommand/DelegateCommand; many toolkit controls expose ICommand-friendly events.
  • Use converters for format adjustments (e.g., color to brush).

Styling and theming

  • Toolkit controls support WPF styling/templates. Override styles in App.xaml or resource dictionaries.
  • To customize, inspect control templates (use a tool like Blend) and override parts as needed.

Performance and packaging

  • Only reference the assemblies you need to reduce app size.
  • For large projects, consider linking specific control assemblies rather than the whole toolkit.

Troubleshooting

  • If XAML designer throws errors, ensure assembly versions match and clean/rebuild the project.
  • For theme or resource issues, merge the toolkit resource dictionaries in App.xaml:

xml

<ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source=pack://application:,,,/Xceed.Wpf.Toolkit;component/Themes/Generic.xaml/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary>
  • Check NuGet package release notes and GitHub issues for known bugs and fixes.

Resources

  • Official GitHub repo: search for “Extended WPF Toolkit Community Edition” for source, issues, and releases.
  • NuGet package page for latest versions and compatibility details.
  • WPF docs for general control templating and styling guidance.

Use the toolkit to add polished controls quickly while keeping your app maintainable through MVVM-friendly bindings and customizable styles.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *