Search found 99 matches

  • 1
  • 2
  • 3
  • 4
  • 5
  • 10
by KeldorKatarn
21 Apr 2021, 23:08
Forum: General Discussion
Replies: 4
Views: 13

Re: Using MarkupExtension ValueConverters does not work

I know how to work around this, but considering what an incredibly common WPF developer technique this is, I consider this a bug. There is no obvious reason for a developer to think that this doesn't work and it's a big inconsistency with WPF. As I said, this is a really common technique among WPF d...
by KeldorKatarn
21 Apr 2021, 17:08
Forum: General Discussion
Replies: 4
Views: 13

Re: Using MarkupExtension ValueConverters does not work

PS: I also tried declaring this same converter as a resource and changing the usage to the standard {StaticResource #KEY#} version. However I still get the same error. Apparently Noesis doesn't like a converter being a MarkupExtension at the same time, even if it isn't used as one. So deriving from ...
by KeldorKatarn
21 Apr 2021, 17:03
Forum: General Discussion
Replies: 4
Views: 13

Using MarkupExtension ValueConverters does not work

I tried using a standard technique of declaring a ValueConverter as a MarkupExtension for easy use. In WPF it works fine, in Noesis however I get this error in Unity: [noesis] Assets/Scripts/MapEditor/Views/ShellView.xaml(24): Can't set 'VacuumBreather.Montreal.MapEditor.ViewModels.EnumComparisonCon...
by KeldorKatarn
10 Apr 2021, 18:02
Forum: General Discussion
Replies: 6
Views: 51

Re: DataTemplate creation in code

We also have a global application resource dictionary but I just noticed there is no API in C# to obtain it. I created ticket 1962 to add it for next release. Thank you, that'll be what I need to make this work. I'm still hoping to get a nice little MVVM framework going here. The main issues with p...
by KeldorKatarn
10 Apr 2021, 17:56
Forum: General Discussion
Replies: 3
Views: 40

Re: Implicit DataTemplates

I couldn't reproduce this for some reason. I'll report back if I run into it again. You can close this for now.
by KeldorKatarn
10 Apr 2021, 17:45
Forum: General Discussion
Replies: 4
Views: 41

Re: Assigning view to NoesisView in code

In Unity you can have a root xaml, let's say MainPage, that you can add to the scene using the NoesisView component. <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Grid x:Name="LayoutRoot"/> </Page> This will generate...
by KeldorKatarn
10 Apr 2021, 17:32
Forum: General Discussion
Replies: 4
Views: 41

Re: Assigning view to NoesisView in code

Could you please report this crash and attach the crash dump that Unity generates? We shouldn't crash Unity editor. Crash report: https://www.noesisengine.com/bugs/view.php?id=1964 Do you have any suggestion on how we can improve that workflow? We will be glad to hear it. I cannot recommend anythin...
by KeldorKatarn
09 Apr 2021, 12:30
Forum: General Discussion
Replies: 6
Views: 51

Re: DataTemplate creation in code

When no explicity string key is provided we use the DataType of the DataTemplate as key for the ResourceDictionary.
But why do I get an error in Unity then? Unity complains that I need to provide a key manually.
by KeldorKatarn
07 Apr 2021, 23:57
Forum: General Discussion
Replies: 3
Views: 40

Implicit DataTemplates

I just tried to add DataTemplates for Views in a ResourceDIctionary like this: <DataTemplate DataType="{x:Type vm:MyViewModel}"> <v:MyView /> </DataTemplate In WPF that works fine, yet Unity Noesis complains that I cannot add a DataTemplate to a ResourceDictionary without specifying a key. This is a...
by KeldorKatarn
07 Apr 2021, 23:43
Forum: General Discussion
Replies: 4
Views: 41

Assigning view to NoesisView in code

This is kind of a simple question. How do I assign a view to a NoesisView exactly? Let's say I'd like to do something like this: var view = new MyView(); view.DataContext = new MyViewModel(); NoesisView.View = view; How do I do that exactly? Content property seems to be null, and if I call LoadXaml(...
  • 1
  • 2
  • 3
  • 4
  • 5
  • 10