Search found 14 matches

  • 1
  • 2
by dazza
03 May 2022, 12:16
Forum: General Discussion
Replies: 10
Views: 3451

Re: Programatically set a buttons image

Since this is proving to be a real PITA to debug I have resized the source png files to 64x64 and now they appear as expected. I suggest we close this issue and pick it up again when I can run RenderDoc and dig further. Agree?
by dazza
02 May 2022, 14:41
Forum: General Discussion
Replies: 10
Views: 3451

Re: Programatically set a buttons image

Alas, RenderDoc does not run with this codebase. The current UI tech the codebase uses crashes and we are not able to work around that (until it is replaced by Noesis).
by dazza
02 May 2022, 12:33
Forum: General Discussion
Replies: 10
Views: 3451

Re: Programatically set a buttons image

We are integrating Noesis in to a relatively old OpenGL engine so the integration is definitely a candidate.

When I enable Overdraw I do not see any blue on the elements in question (although I so see it in other places). I see green squares.

Image
by dazza
29 Apr 2022, 11:25
Forum: General Discussion
Replies: 10
Views: 3451

Re: Programatically set a buttons image

Both the ContentPresenter and the Image have:

ActualWidth=64
ActualHeight=64

This is the size I am setting in C++ for the image. I know the images are loading correctly because if I don't force the size to 64 the images appear (but massive).

(sorry for the delay in replying)
by dazza
13 Apr 2022, 18:52
Forum: General Discussion
Replies: 10
Views: 3451

Re: Programatically set a buttons image

I was not using a style, so I added the Control template and now the images appear in the buttons, however if I set the width of the ContentPresenter (in xaml) or the Buttons (in C++) the image does not appear. <StackPanel x:Name="ENG_Planets" Orientation="Horizontal" HorizontalA...
by dazza
13 Apr 2022, 11:16
Forum: General Discussion
Replies: 10
Views: 3451

Programatically set a buttons image

I have a StackPanel in to which I want to add/remove buttons that are essentially images. I create and add the button and that works but the button content (the image) is not rendered. I have tried setting various properties (see commented out code) but alas the image does not appear. I've checked t...
by dazza
25 Mar 2022, 15:51
Forum: General Discussion
Replies: 4
Views: 1420

Re: Noesis::GUI::LoadXaml, SetContent and FindName not working as expected

Thankyou, this worked but is very surprising. My mental model of how XAML is used is clearly very wrong.
by dazza
24 Mar 2022, 12:13
Forum: General Discussion
Replies: 4
Views: 1420

Re: Noesis::GUI::LoadXaml, SetContent and FindName not working as expected

Further to this, nothing seems to have a name: auto filter = [](Noesis::Visual* target) -> Noesis::HitTestFilterBehavior { return Noesis::HitTestFilterBehavior::HitTestFilterBehavior_Continue; }; auto window = sState.mApplication->GetMainWindow(); Noesis::HitTestResultCallback resultcb = [](const No...
by dazza
23 Mar 2022, 19:24
Forum: General Discussion
Replies: 4
Views: 1420

Noesis::GUI::LoadXaml, SetContent and FindName not working as expected

I have a MainWindow class derived from Noesis::ContentControl. I call auto content = Noesis::GUI::LoadXaml(...); mainwindow->SetContent(content) I then later call mainwindow->FindName("WidgetName") and it is always nullptr. The Xaml contains a widget with x:Name="WidgetName". Wha...
by dazza
10 Mar 2022, 15:25
Forum: General Discussion
Replies: 3
Views: 1314

Re: Knowing an event has been used?

Ah, thank you I missed that
  • 1
  • 2