How to add V2 Designer into ContentPresenter object

Stimulsoft Reports.WPF discussion
LukasT
Posts: 304
Joined: Mon May 03, 2010 2:50 am
Location: Czech Republic

Re: How to add V2 Designer into ContentPresenter object

Post 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.
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: How to add V2 Designer into ContentPresenter object

Post 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.
LukasT
Posts: 304
Joined: Mon May 03, 2010 2:50 am
Location: Czech Republic

Re: How to add V2 Designer into ContentPresenter object

Post 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.
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: How to add V2 Designer into ContentPresenter object

Post 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.
LukasT
Posts: 304
Joined: Mon May 03, 2010 2:50 am
Location: Czech Republic

Re: How to add V2 Designer into ContentPresenter object

Post 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.
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: How to add V2 Designer into ContentPresenter object

Post by Lech Kulikowski »

Hello,

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

Thank you.
LukasT
Posts: 304
Joined: Mon May 03, 2010 2:50 am
Location: Czech Republic

Re: How to add V2 Designer into ContentPresenter object

Post 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 630 times
LukasT
Posts: 304
Joined: Mon May 03, 2010 2:50 am
Location: Czech Republic

Re: How to add V2 Designer into ContentPresenter object

Post 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 626 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.
LukasT
Posts: 304
Joined: Mon May 03, 2010 2:50 am
Location: Czech Republic

Re: How to add V2 Designer into ContentPresenter object

Post 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?
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: How to add V2 Designer into ContentPresenter object

Post 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.
Post Reply