Search found 5 matches

by sacc1298
08 Sep 2022, 23:04
Forum: General Discussion
Replies: 7
Views: 2216

Re: Issues setting a data context for parent Grid

False alarm. It was some messy DLL related stuff and how I was linking Noesis. I was using Noesis.lib in more than one DLL (a requirement) so there were 2 copies of global variables and they were being initialized in one DLL but were all NULL in the other DLL. I now use the Noesis.dll and it works a...
by sacc1298
08 Sep 2022, 20:01
Forum: General Discussion
Replies: 7
Views: 2216

Re: Issues setting a data context for parent Grid

First I load the XAML I posted above like this: Noesis::Ptr<Noesis::FrameworkElement> element = Noesis::GUI::LoadXaml<Noesis::FrameworkElement>(xamlName); Then I immediately set the data context like below: element->SetDataContext(Noesis::MakePtr<InventoryUI>()); but this gives me an error "Can...
by sacc1298
08 Sep 2022, 19:50
Forum: General Discussion
Replies: 7
Views: 2216

Re: Issues setting a data context for parent Grid

I tried doing it manually like that after loading but the DataContextProperty was nullptr so it fails to set the data context. Am I missing something in the XAML for DataContextProperty to be nullptr?
by sacc1298
08 Sep 2022, 19:27
Forum: General Discussion
Replies: 7
Views: 2216

Re: Issues setting a data context for parent Grid

More information on this: Adding the delegate does in fact add an entry for "Initialized" in mEventHandlers but somehow by the time the Initialized event is fired this entry is removed and replaced with a Converter<Single> entry for some reason
by sacc1298
08 Sep 2022, 18:38
Forum: General Discussion
Replies: 7
Views: 2216

Issues setting a data context for parent Grid

I have a XAML which looks like this and is meant to be an (incomplete) simple inventory slot UI using a Grid as a root parent element: <Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http...