nickwood2009
Topic Author
Posts: 2
Joined: 05 Jun 2019, 06:39

Creating a binding converter missing references in unity

12 Jul 2019, 09:12

Hi All
Very new to Noesis but used WPF for many years. Trying to test some of the features I have started testing value converters,

Have implemented from the xaml and tested but in unity I get the following error:

"The type or namespace name 'IValueConverter' could not be found (are you missing a using directive or an assembly reference?)"

IValueConverter is in the System.Windows.Data namespace. System.Windows is referenced in Unity, but not .Data? How can I add this reference.

Thanks
Nick
 
nickwood2009
Topic Author
Posts: 2
Joined: 05 Jun 2019, 06:39

Re: Creating a binding converter missing references in unity

12 Jul 2019, 09:38

Nevermind
missing
using Noesis;
 
User avatar
sfernandez
Site Admin
Posts: 2991
Joined: 22 Dec 2011, 19:20

Re: Creating a binding converter missing references in unity

12 Jul 2019, 11:21

All our classes are exposed under the Noesis namespace, except for some interfaces or extension classes that are also available in netstandard (like System.Windows.Input.ICommand, System.Collections.Specialized.INotifyCollectionChanged, System.Collections.ObjectModel.ObservableCollection<T>, ...).

What we do in our examples is conditionally specify the appropriate namespace to share the same code with Unity and Blend:
#if UNITY_5_3_OR_NEWER
#define NOESIS
using Noesis;
#else
using System;
using System.Windows;
using System.Windows.Controls;
#endif

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 13 guests