Error when using NoesisExt in Blend
I'm getting the following error when using NoesisExt in Blend:
at lines:
Code: Select all
The name "Text" does not exist in the namespace "clr-namespace:NoesisGUIExtensions".
Code: Select all
<Setter Property="noesisExt:Text.Stroke" Value="Black"/>
<Setter Property="noesisExt:Text.StrokeThickness" Value="1"/>
Re: Error when using NoesisExt in Blend
Are you including the proper extensions in your Blend project? (https://github.com/Noesis/noesisgui-con ... nd/Text.cs)
Re: Error when using NoesisExt in Blend
Hmm, I found the answer here: viewtopic.php?f=3&t=301&p=1477&hilit=extensions#p1477
However, I'm getting the same error related to ColorPicker at this line:
There is no ColorPicker in the repo you mentioned, and using the one in Assets\NoesisGUI\UserControls\ColorPicker\ColorPicker.cs just throws a bunch of compiler errors ( The type or namespace name 'UnityEngine' could not be found, etc...)
Also, I'm using Unity's version, if that's of any use.
However, I'm getting the same error related to ColorPicker at this line:
Code: Select all
<noesis:ColorPicker x:Name="ColorPicker"/>
Also, I'm using Unity's version, if that's of any use.
-
-
sfernandez
Site Admin
- Posts: 3198
- Joined:
Re: Error when using NoesisExt in Blend
Hi,
The .cs files included in the NoesisGUI package are scripts valid only for Unity. They use our C# API that it is not 100% compatible with WPF, so they won't work directly in Blend.
Maybe this is something we can improve for a next release and provide Blend projects for all the samples of the NoesisGUI package.
If you want to open ColorPicker.xaml in Blend you will have to create a ColorPicker.xaml.cs file like this:
The .cs files included in the NoesisGUI package are scripts valid only for Unity. They use our C# API that it is not 100% compatible with WPF, so they won't work directly in Blend.
Maybe this is something we can improve for a next release and provide Blend projects for all the samples of the NoesisGUI package.
If you want to open ColorPicker.xaml in Blend you will have to create a ColorPicker.xaml.cs file like this:
Code: Select all
using System;
using System.Windows;
using System.Windows.Controls;
namespace Noesis.UserControls
{
public partial class ColorPicker : UserControl
{
public ColorPicker
{
InitializeComponent();
}
// Color dependency property definition
public static DependencyProperty ColorProperty = DependencyProperty.Register("Color",
typeof(Noesis.SolidColorBrush), typeof(ColorPicker),
new PropertyMetadata(null, new PropertyChangedCallback(OnColorChanged)));
// ...
}
}
Re: Error when using NoesisExt in Blend
I'm having a similar problem with Text.cs but on Unity this time. There is a preprocessor guard on it (#if !UNITY_EDITOR) so that it doesn't get compiled in the Editor. Unfortunately when I build the game, it will come up with errors when trying compile that .cs
Changing it to #if !(UNITY_EDITOR || UNITY_STANDALONE) fixes it (but not for other platforms), but I think it really should be a whitelist rather than a blacklist (ie. it should be #if NOESIS_GUI if such a thing exists).
Changing it to #if !(UNITY_EDITOR || UNITY_STANDALONE) fixes it (but not for other platforms), but I think it really should be a whitelist rather than a blacklist (ie. it should be #if NOESIS_GUI if such a thing exists).
-
-
sfernandez
Site Admin
- Posts: 3198
- Joined:
Re: Error when using NoesisExt in Blend
This will be great, the problem is we cannot define this kind of values. Is Unity who compiles and provides the pre-processing directives.I think it really should be a whitelist rather than a blacklist (ie. it should be #if NOESIS_GUI if such a thing exists).
But, if anyone knows how to do it, we are glad to hear

What we usually do with Text.cs is don't include it in the Assets folder, so Unity ignores it. You can "Link to Existing Item..." in Blend to a Text.cs file placed elsewhere.
Re: Error when using NoesisExt in Blend
But doesn't NoesisGUI have to find this file if you use the extension? How does it do this?
Re: Error when using NoesisExt in Blend
Noesis defines the extension internally. The BlendExt library is to implement the additional properties so that the compiler doesn't complain about missing references. As such, it shouldn't be built by Unity, but only by the Blend project.
Re: Error when using NoesisExt in Blend
That it is. For example
Here, Text.Stroke is an attached dependency property that does not exist in WPF. Our parser understands it perfectly but Blend does know nothing about it. We use Text.cs fot that purpose, to create a fake property that allows Blend parsing correctly this XAML.
Code: Select all
<TextBlock noesis:Text.Stroke="Red" noesis:Text.StrokeThickness="1" Text="Hello"/>
Re: Error when using NoesisExt in Blend
Yes, I see, thanks.
Also, how come gradients have different colours when in Blend than when in Unity?
Also, how come gradients have different colours when in Blend than when in Unity?
Who is online
Users browsing this forum: Semrush [Bot] and 6 guests