c# - Looking for a good WPF solution for a transparent, click-through overlay -


i want try different, , attempting display overlay on top of current wpf gui allows user still interact gui, provides layer of annoyance let them know something's up.

my question 2 separate questions:

1. how overlay?

my first attempt use rectangle, set fill appropriate color, , change opacity. it's not transparent click-throughs. think want do, according search results, create separate window, set background transparent, , set allowstransparency true. while works, if want background="darkred" opacity="0.2", click-throughs no longer work.

and leads me second part:

2. what's right way resize overlay region if i'm using mvvm?

my main window creates viewmodel, creates model. model thing knows whether or not overlay should displayed. main window thing knows size, , model never knows above it. way achieve databind overlay window's size properties in viewmodel, , have viewmodel set these values time main window's size changes?

anyone have clues on how can achieve of these things?

to address part 1: set ishittestvisible="false" on overlay, rectangle, border or other element. allow make whatever color , transparency level want without affecting interaction underlying controls.

part 2: shouldn't use separate window. if keep overlay in main window can rely on layout in view automatically handle sizing of overlay.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -