ShowWithWpf/DesignWithWpf: application not totally disabled

Stimulsoft Reports.WPF discussion
Post Reply
jsm
Posts: 5
Joined: Thu Feb 05, 2015 12:44 pm

ShowWithWpf/DesignWithWpf: application not totally disabled

Post by jsm »

Hello,
we use ShowWithWpf/DesignWithWpf to run/design reports.
when the stimulsoft window is opened, the wpf application is disabled which is great.
However, we use a telerik library to manage a ribbon with AccessText (Keyboard shortcuts accessible with alt key).
when the application is disabled after ShowWithWpf or DesignWithWpf, the AccessText are still available after focusing the wpf application,
which leads to undesired behaviors.

I have made several test without success:
- report.DesignWithWpf();
- report.DesignWithWpf(true);
- report.ShowWithWpf(true);
- report.ShowWithWpf(this, true);


- How do you disable the wpf appication?
- Is there a flag indicating that the designer/viewer are opened?
- Is there a way to manage application disabling by our own way (if there is no other solution)?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: ShowWithWpf/DesignWithWpf: application not totally disab

Post by HighAley »

Hello.

Could you send us a sample project with reproduces the issue?
Could you also send us a step-by-step description how to reproduce it and what is wrong?

Thank you.
jsm
Posts: 5
Joined: Thu Feb 05, 2015 12:44 pm

Re: ShowWithWpf/DesignWithWpf: application not totally disab

Post by jsm »

Here is a little sample to reproduce the issue.
It is reproductible without external component,
I have added AccessText for each button in a simple screen.

3 buttons:
- Design report : should freeze the wpf application until report is closed (access text "D")
- Run report : should freeze the wpf application until report is closed (access text "R")
- Message : display a message in dialog box (access text "M")

to reproduce the issue:
- Launch designer by pressing "Design report"
- return to wpf app without closing report designer, the app is frozen
- press ALT, access text are underlined
- press D,R or M, actions are executed and they shouldn't (designer can be launched several times).


Best Regards
Attachments
AccessTextSample.zip
(5.42 MiB) Downloaded 251 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: ShowWithWpf/DesignWithWpf: application not totally disab

Post by HighAley »

Hello.

We use standard method - ShowDialog(). This behavior is processed by .Net Framework.
If you don't need to run the Designer again, please, try to disable buttons.

Thank you.
jsm
Posts: 5
Joined: Thu Feb 05, 2015 12:44 pm

Re: ShowWithWpf/DesignWithWpf: application not totally disab

Post by jsm »

Hello,
It is possible to set the owner form with the standard ShowDialog method: window.ShowDialog(this);
it prevents the user from selecting the parent window, or use the accessText on it (that is the expected behavior).

The ShowWithWpf method allows to set the owner form.
- ShowWithWpf(this): parent window is fully disabled parent window can't be selected and accesstext disabled to.
However, in that case, several report windows can be launched, which is not the desired behavior.
- ShowWithWpf(this, true) : setting owner form doesn't work in modal mode, parent window can be selected and accesstext launched

The DesignWithWpf method doesn't provide a way to set the owner form.

Is there a way to have the desired behaviour (disabled owner in modal view + disabled access text in owner)

Best Regards
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: ShowWithWpf/DesignWithWpf: application not totally disab

Post by Alex K. »

Hello,

In the DesignWithWpf, ShowWithWpf methods we have added additional parameter - object ownerWindow.
If you provide your Window as parameter, then Owner will be set for the show window.

The fix will be available in the next release.
Thank you.
Post Reply