Page 2 of 3

Re: How to add V2 Designer into ContentPresenter object

Posted: Thu Feb 15, 2024 11:29 pm
by LukasT
Hello Lech,
thank you .... it is a little bit better - header is hidden. But the designer still overwrites main window title and is catching all keboard events even if it is invisible.

Re: How to add V2 Designer into ContentPresenter object

Posted: Fri Feb 16, 2024 9:28 am
by Lech Kulikowski
Hello,

In the previous build, in StiDesignerControl we have added DesignerKeyDown event which should help you. When the PreviewKeyDown event is triggered in the designer, the new event is fired first, and if you have subscribed to it and handled the desired key, you need to set the e.Handled=true property. Then this keystroke will not be handled anymore. If e.Handled==false - then our current code will continue to work.

Thank you.

Re: How to add V2 Designer into ContentPresenter object

Posted: Fri Feb 16, 2024 9:54 am
by LukasT
Hello,
but this is useless, because if I set Handled=true, that event is over and is not bubbling inside to our application any more. Understand... the application with two tabs - first one with some forms and second one with your Designer. Forms are handling Ctrl+C and Ctrl+V keystroke... but if we set handeld=true to your event which is catched as OnPreview and on the main window than all functionality is broken.

Re: How to add V2 Designer into ContentPresenter object

Posted: Fri Feb 16, 2024 11:00 am
by Lech Kulikowski
Hello,

Ok, for this you can intercept the events that you need (and if they are needed at the moment). The rest will be taken by us (also only if we need them at the moment)...
What do you want us to do?

Thank you.

Re: How to add V2 Designer into ContentPresenter object

Posted: Fri Feb 16, 2024 11:26 am
by LukasT
I think you are wrong with handling this event over the whole window....
But I can imagine that we can get by with that if you expose some public bool property to which you will make the return in the event handler. Or in event PreviewKeyDown you expose another bool instead Handle. The Handle property must stay allways true.

Re: How to add V2 Designer into ContentPresenter object

Posted: Fri Feb 16, 2024 1:44 pm
by Lech Kulikowski
Hello,

Sorry, we did not exactly understand your suggestion. Could you explain in more detail?

Thank you.

Re: How to add V2 Designer into ContentPresenter object

Posted: Fri Feb 16, 2024 5:03 pm
by LukasT
In condition on line #800 in StiDesignerControl add something like this.IsKeyDownHandleDisabled to quit OnWindowPreviewKeyDown handler. And we will set this public property by ourself.
screen_2024-02-16 17 49 24.png
screen_2024-02-16 17 49 24.png (34.12 KiB) Viewed 893 times

Re: How to add V2 Designer into ContentPresenter object

Posted: Sat Feb 17, 2024 11:42 am
by LukasT
So.... because we can't wait so long time for your improvements, I solved it using reflection and dynamicaly controll when you can catch keystrokess.... somehow like this:

screen_2024-02-17 12 36 13.png
screen_2024-02-17 12 36 13.png (16.69 KiB) Viewed 889 times
Than I had to inject new value into OwnerWindow property, because we need the designer opened more than once and to be able move it to another window.

Re: How to add V2 Designer into ContentPresenter object

Posted: Sat Feb 17, 2024 3:43 pm
by LukasT
Ok.... I somehow hacked almost everything. Now I'm trying to figure out how to make sure that when the report is loaded, the zoom is not set to 100% and that it remembers the last setting?

Re: How to add V2 Designer into ContentPresenter object

Posted: Mon Feb 19, 2024 2:33 pm
by Lech Kulikowski
Hello,

> Now I'm trying to figure out how to make sure that when the report is loaded, the zoom is not set to 100% and that it remembers the last setting?

The issue is fixed. The fix will be available in the next build.

Thank you.