Hi,
I am learning some WPF/C# so this question might be silly for some of you but I can't find the solution.
I have a Canvas (let's say it countains texts) and then I have another Canvas that I want to use as a mask (anything in this second Canvas will mask the first one).
How can I do that? What if the second Canvas is moving? I want to change the scale of the second canvas (mask) so it "unveils" the content of the first one (content).
Thanks in advance!
EDIT: If instead of a canvas I could use something like a rectangle (as soon as it's resizable) that's fine too!
EDIT 2: Here's the code I'm using:
// Order info
Canvas order_info = new Canvas();
order_info.Width = 220;
order_info.Height = 250;
order_info.Background = Brushes.Yellow;
user_info.Children.Add(order_info);
// Order info mask
Canvas order_info_mask = new Canvas();
order_info_mask.Width = 110;
order_info_mask.Height = 250;
order_info_mask.Background = Brushes.Pink;
user_info.Children.Add(order_info_mask);
// Apply mask
VisualBrush mask_brush = new VisualBrush();
mask_brush.Visual = order_info_mask;
order_info.OpacityMask = mask_brush;