Okay guys, so I have a problem with WPF application. So far I managed to make a window with transparent background ( + no brush ). Also I added function, if my window is focused. So obviously my window should never been focused (because of transparency). This is working, but when I add lets say rectangle (on Canvas):
Rectangle testRectangleForText = new Rectangle();
testRectangleForText.Stroke = Brushes.Black;
testRectangleForText.StrokeThickness = 5;
testRectangleForText.Fill = null;
testRectangleForText.Height = 300;
testRectangleForText.Width = 300;
Canvas.SetLeft(testRectangleForText, 0);
Canvas.SetTop(testRectangleForText, 20);
myCanvas.Children.Add(testRectangleForText);
The rectangle is clickable and if I click on it, my app is focused (applicationFocus function display messageBox) and I don't want that. I already found solution for Win forms, but not for WPF, thats why I'm asking this here. Solution for win forms is here: WINFORM SOLUTION
Okay now example what I'm trying to achieve: example image
So the red zone is my window (WPF APP) size. Background is transparent (obviously). Background application is notepad. We can see text and rectangle on Canvas. Now, if I click on 1.(first) arrow, this is btw transparent area, nothing happens (thats good). If I click on 2.(second) arrow, MessageBox appear, which means that my WPF APP is focused and that is what I dont want.