Search found 1352 matches

by sfernandez
16 Oct 2018, 10:15
Forum: General Discussion
Topic: Dynamic runtime xaml construction with modular windows
Replies: 10
Views: 183

Re: Dynamic runtime xaml construction with modular windows

You can use any type you want at the root, you just need to apply the proper casting in code.
For a UserControl in the root you can do the following:
NoesisView view = GetComponent<NoesisView>();
UserControl uiRoot = (UserControl)view.Content;
uiRoot.Content = new Button { Content = "Some Button" };
by sfernandez
16 Oct 2018, 10:02
Forum: General Discussion
Topic: Dynamic runtime xaml construction with modular windows
Replies: 10
Views: 183

Re: Dynamic runtime xaml construction with modular windows

The root of the xaml (the first node with the xmlns attributes) must match the type you are casting in code. I just tried with NoesisGUI v2.1 the xaml and code I posted before and works as expected. Can you please attach here the whole xaml and MonoBehavior you are attaching to the Main Camera? Whic...
by sfernandez
15 Oct 2018, 14:31
Forum: General Discussion
Topic: Dynamic runtime xaml construction with modular windows
Replies: 10
Views: 183

Re: Dynamic runtime xaml construction with modular windows

Hi, You can have a simple xaml like this: <Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> </Grid> This will generate a xaml asset in Unity that you can drag to the Main Camera to create a NoesisView that will be rendered...
by sfernandez
12 Oct 2018, 21:31
Forum: General Discussion
Topic: NoesisGUI with Unity help
Replies: 2
Views: 79

Re: NoesisGUI with Unity help

Try to layout your project like this: BlendProject/ - BlendProject.csproj - Assets/ - ... xamls, images, fonts... Create the Assets folder even from Blend project, and all xamls and resources you create in Blend should be placed inside the Assets folder. Then open that Asset folder from Unity to cre...
by sfernandez
12 Oct 2018, 21:25
Forum: General Discussion
Topic: Pushing read-only GUI properties back into ViewModel
Replies: 3
Views: 200

Re: Pushing read-only GUI properties back into ViewModel

A read-only dependency property would never be writable, if that is what you intended; otherwise please elaborate a bit what you want to achieve and we will try to help.
by sfernandez
02 Oct 2018, 14:22
Forum: General Discussion
Topic: [Question] GC free (or as low as possible) notify of collection changes
Replies: 7
Views: 196

Re: [Question] GC free (or as low as possible) notify of collection changes

Hi, On each version we are trying to be more and more compatible with WPF so the same code can be shared between Noesis and WPF projects. The class NotifyCollectionChangedEventArgs is taken from WPF as it is defined there , but as you can see looking at our source code it is not even defined by us i...
by sfernandez
01 Oct 2018, 13:47
Forum: General Discussion
Topic: Binding and Converters not working for RowDefinition Height in Unity
Replies: 3
Views: 510

Re: Binding and Converters not working for RowDefinition Height in Unity

Hi, The problem comes from the DataContext not being correctly inherited by the RowDefinition object, we will fix it for the next release. In the meantime I found a way to workaround this problem, you can create a binding to a named element instead, that way the binding will resolve correctly: <Grid...
by sfernandez
01 Oct 2018, 12:04
Forum: General Discussion
Topic: Possible to differ between user interaction and data binding?
Replies: 3
Views: 171

Re: Possible to differ between user interaction and data binding?

I was thinking on something like this: <Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Grid.Resources> <ControlTemplate x:Key="toggle" TargetType="ToggleButton"> <Grid> <Border x:Name="hi" Background="#00DEE4FF" CornerR...
by sfernandez
25 Sep 2018, 16:13
Forum: General Discussion
Topic: Possible to differ between user interaction and data binding?
Replies: 3
Views: 171

Re: Possible to differ between user interaction and data binding?

Hi Andreas, There is no way to determine if it was the user or a binding who triggered the change of a property. But maybe you can rely on the value of other properties (IsFocused, IsMouseOver) to know if it was a user interaction, using a MultiTrigger to fire the animation. Could you please try som...