opacitymask

C#, WPF - VisualBrush and OpacityMask

I'm needing to create a UserControl, that has a portion of the control's background transparent. The transparent portion is cutout in the shape of a Border with CornerRadius of 2--it's required because of the design. Here is my code that is not working: <UserControl Margin="1" x:Name="Box"> <UserControl.Resources> ...

Turning the background to gray scale in wpf

Consider a window with loads of multi colored controls on it. I want to put a panel on top of this when some trigger happens in the form such that all the controls looses its color (everything appears in gray scale) except the panel which has just popped up. Can somebody help me with this ?? ...

"Disabling" an HTML table with javascript

I've seen this done in a lot of sites recently, but can't seem to track one down. Essentially I want to "disable" an entire panel (that's in the form on an HTML table) when a button is clicked. By disable I mean I don't want the form elements within the table to be usable and I want the table to sort of fade out. I've been able to acc...

OpacityMask from LinearGradientBrush with Absolute GradientStops in Silverlight 3

My question is similar to this one. However, the answer in that thread does not work for me, because I'm using the LinearGradientBrush for an opacity mask. I've got a grid with three rows: <Grid.RowDefinitions> <RowDefinition Height="50" /> <RowDefinition Height="*" /> <RowDefinition Height="50" /> </Grid.RowDefinitions> ...

OpacityMask not working with WPF WindowsFormsHost?

I'm trying to put a rounded border on a control which is hosted through a WindowsFormHost object. It seems like no matter what I set for OpacityMask, it has no effect on the rendering. Is there something I've missed? Here is the XAML code I am using. The child control is added at run-time. I've tried various combinations of masks, n...

C# WPF grab screenshot with SnippingTool effect

I'm trying to integrate a screenshot grabbing feature in my WPF app and I'd like it to look like snipping tool. So far I've managed accomplish something similar by creating a fullscreen window (with a canvas) with opacity set to 0.5 and dark background. When I click somewhere and start dragging, a white rectangle is drawn, generating an...