How to “punch a hole” in a WPF window [duplicate]Create a transparent hole inside a window's background - WPFHow can one host Flash content in a WPF application and use transparency?How do I enumerate an enum in C#?WPF Control inside a transparent winform is not displayedHow to add a WPF window to a WinForms AppHow to use DockStyle.Fill for standard controls in WPF?Winform and WPF form/window borderOpen WPF Window in StackPanelWPF full transparent + non clickableWPF window inside a WinformHost PanelHow to scale WPF controls with windows font?
How to indicate a cut out for a product window
It grows, but water kills it
Why is it that I can sometimes guess the next note?
Why does the Sun have different day lengths, but not the gas giants?
Pre-mixing cryogenic fuels and using only one fuel tank
How do I color the graph in datavisualization?
Calculating Wattage for Resistor in High Frequency Application?
What should you do if you miss a job interview (deliberately)?
Removing files under particular conditions (number of files, file age)
Are the IPv6 address space and IPv4 address space completely disjoint?
Is the U.S. Code copyrighted by the Government?
How can we generalize the fact of finite dimensional vector space to an infinte dimensional case?
Fear of getting stuck on one programming language / technology that is not used in my country
GraphicsGrid with a Label for each Column and Row
How do you respond to a colleague from another team when they're wrongly expecting that you'll help them?
Creepy dinosaur pc game identification
The IT department bottlenecks progress. How should I handle this?
What is the evidence for the "tyranny of the majority problem" in a direct democracy context?
Loading commands from file
Does an advisor owe his/her student anything? Will an advisor keep a PhD student only out of pity?
Is it safe to use olive oil to clean the ear wax?
Is a bound state a stationary state?
Is this toilet slogan correct usage of the English language?
Is it better practice to read straight from sheet music rather than memorize it?
How to “punch a hole” in a WPF window [duplicate]
Create a transparent hole inside a window's background - WPFHow can one host Flash content in a WPF application and use transparency?How do I enumerate an enum in C#?WPF Control inside a transparent winform is not displayedHow to add a WPF window to a WinForms AppHow to use DockStyle.Fill for standard controls in WPF?Winform and WPF form/window borderOpen WPF Window in StackPanelWPF full transparent + non clickableWPF window inside a WinformHost PanelHow to scale WPF controls with windows font?
This question already has an answer here:
Create a transparent hole inside a window's background - WPF
2 answers
Im starting with WPF now, and I dont know if its possible, but it should be.
Im trying to create a fully transparent area in my form, deleting all the contents inside a rectangle (Those contents will be a AxWindowsMediaPlayer, as Shown below), and be able to see whats behind my window.
Its possible in WinForms using TransparencyKey and a Panel, but WinForms doesnt fill my needs for this project.
Example:
Another example:
c# wpf
marked as duplicate by MickyD, Uwe Keim, Cody Gray♦
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Mar 8 at 18:04
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Create a transparent hole inside a window's background - WPF
2 answers
Im starting with WPF now, and I dont know if its possible, but it should be.
Im trying to create a fully transparent area in my form, deleting all the contents inside a rectangle (Those contents will be a AxWindowsMediaPlayer, as Shown below), and be able to see whats behind my window.
Its possible in WinForms using TransparencyKey and a Panel, but WinForms doesnt fill my needs for this project.
Example:
Another example:
c# wpf
marked as duplicate by MickyD, Uwe Keim, Cody Gray♦
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Mar 8 at 18:04
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Create a transparent hole inside a window's background - WPF
2 answers
Im starting with WPF now, and I dont know if its possible, but it should be.
Im trying to create a fully transparent area in my form, deleting all the contents inside a rectangle (Those contents will be a AxWindowsMediaPlayer, as Shown below), and be able to see whats behind my window.
Its possible in WinForms using TransparencyKey and a Panel, but WinForms doesnt fill my needs for this project.
Example:
Another example:
c# wpf
This question already has an answer here:
Create a transparent hole inside a window's background - WPF
2 answers
Im starting with WPF now, and I dont know if its possible, but it should be.
Im trying to create a fully transparent area in my form, deleting all the contents inside a rectangle (Those contents will be a AxWindowsMediaPlayer, as Shown below), and be able to see whats behind my window.
Its possible in WinForms using TransparencyKey and a Panel, but WinForms doesnt fill my needs for this project.
Example:
Another example:
This question already has an answer here:
Create a transparent hole inside a window's background - WPF
2 answers
c# wpf
c# wpf
edited Mar 8 at 5:46
Thiago Souza
asked Mar 8 at 5:04
Thiago SouzaThiago Souza
688
688
marked as duplicate by MickyD, Uwe Keim, Cody Gray♦
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Mar 8 at 18:04
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by MickyD, Uwe Keim, Cody Gray♦
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Mar 8 at 18:04
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
this should do the trick for you:
<Window
[...]
Title="MainWindow" MinHeight="200" MinWidth="400" WindowStyle="None" AllowsTransparency="True">
<Window.OpacityMask>
<ImageBrush
ViewportUnits="RelativeToBoundingBox"
TileMode="None"
ImageSource="/Images/rect.png"
/>
</Window.OpacityMask>
<!-- many many controls-->
</Window>
WindowStyle
need to be none
AllowTransparency
needs to be true
And the image source is just a image with a rectagular transparent part in center. You could also draw this dinamically!
result:
add a comment |
<Window x:Class="WpfApp5.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp5"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800"
WindowStyle="None"
Opacity="0.1"
AllowsTransparency="True">
</Window>
Make WindowStyle="None" and AllowsTransparency="True" to get transparent window. vary opacity to get amount of transparency
Yes I got that part, but I will have more elements in the window (A video playing) and I want the rectangle to be transparent in that video too
– Thiago Souza
Mar 8 at 5:31
Can you post the screen shot of UI. Unable to visualise what you are trying to achieve
– neelesh bodgal
Mar 8 at 5:33
Ive edited my question, and included a GIF showing what I want (That Ive previously made in WinForms)
– Thiago Souza
Mar 8 at 5:46
1
@ThiagoSouza If you "got that part" it should've been in your question. Questions should include code of what you have done so far.
– Nyerguds
Mar 8 at 5:50
@Nyerguds I understood what they said by controlling opacity, but it didnt solved my problem cause I have more elements in my window.
– Thiago Souza
Mar 8 at 5:52
add a comment |
Got something like this.
<Window x:Class="WpfApp3.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800" WindowStyle="None" AllowsTransparency="True" Background="Transparent">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Rectangle Fill="#66FFFFFF" Grid.Column="0" Grid.RowSpan="3"/>
<Rectangle Fill="#66FFFFFF" Grid.Column="2" Grid.RowSpan="3"/>
<Rectangle Fill="#66FFFFFF" Grid.Column="1" Grid.Row="0"/>
<Rectangle Fill="#66FFFFFF" Grid.Column="1" Grid.Row="2"/>
<Rectangle x:Name="workingRectangle" Fill="Transparent" Stroke="Red" Grid.Column="1" Grid.Row="1"/>
</Grid>
</Window>
this will not allow him to do what he is trying to achive
– Denis Schaf
Mar 8 at 8:13
add a comment |
Masking is probably the closest substitute to Windows Forms' TransparencyKey
.
add a comment |
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
this should do the trick for you:
<Window
[...]
Title="MainWindow" MinHeight="200" MinWidth="400" WindowStyle="None" AllowsTransparency="True">
<Window.OpacityMask>
<ImageBrush
ViewportUnits="RelativeToBoundingBox"
TileMode="None"
ImageSource="/Images/rect.png"
/>
</Window.OpacityMask>
<!-- many many controls-->
</Window>
WindowStyle
need to be none
AllowTransparency
needs to be true
And the image source is just a image with a rectagular transparent part in center. You could also draw this dinamically!
result:
add a comment |
this should do the trick for you:
<Window
[...]
Title="MainWindow" MinHeight="200" MinWidth="400" WindowStyle="None" AllowsTransparency="True">
<Window.OpacityMask>
<ImageBrush
ViewportUnits="RelativeToBoundingBox"
TileMode="None"
ImageSource="/Images/rect.png"
/>
</Window.OpacityMask>
<!-- many many controls-->
</Window>
WindowStyle
need to be none
AllowTransparency
needs to be true
And the image source is just a image with a rectagular transparent part in center. You could also draw this dinamically!
result:
add a comment |
this should do the trick for you:
<Window
[...]
Title="MainWindow" MinHeight="200" MinWidth="400" WindowStyle="None" AllowsTransparency="True">
<Window.OpacityMask>
<ImageBrush
ViewportUnits="RelativeToBoundingBox"
TileMode="None"
ImageSource="/Images/rect.png"
/>
</Window.OpacityMask>
<!-- many many controls-->
</Window>
WindowStyle
need to be none
AllowTransparency
needs to be true
And the image source is just a image with a rectagular transparent part in center. You could also draw this dinamically!
result:
this should do the trick for you:
<Window
[...]
Title="MainWindow" MinHeight="200" MinWidth="400" WindowStyle="None" AllowsTransparency="True">
<Window.OpacityMask>
<ImageBrush
ViewportUnits="RelativeToBoundingBox"
TileMode="None"
ImageSource="/Images/rect.png"
/>
</Window.OpacityMask>
<!-- many many controls-->
</Window>
WindowStyle
need to be none
AllowTransparency
needs to be true
And the image source is just a image with a rectagular transparent part in center. You could also draw this dinamically!
result:
answered Mar 8 at 9:29
Denis SchafDenis Schaf
77618
77618
add a comment |
add a comment |
<Window x:Class="WpfApp5.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp5"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800"
WindowStyle="None"
Opacity="0.1"
AllowsTransparency="True">
</Window>
Make WindowStyle="None" and AllowsTransparency="True" to get transparent window. vary opacity to get amount of transparency
Yes I got that part, but I will have more elements in the window (A video playing) and I want the rectangle to be transparent in that video too
– Thiago Souza
Mar 8 at 5:31
Can you post the screen shot of UI. Unable to visualise what you are trying to achieve
– neelesh bodgal
Mar 8 at 5:33
Ive edited my question, and included a GIF showing what I want (That Ive previously made in WinForms)
– Thiago Souza
Mar 8 at 5:46
1
@ThiagoSouza If you "got that part" it should've been in your question. Questions should include code of what you have done so far.
– Nyerguds
Mar 8 at 5:50
@Nyerguds I understood what they said by controlling opacity, but it didnt solved my problem cause I have more elements in my window.
– Thiago Souza
Mar 8 at 5:52
add a comment |
<Window x:Class="WpfApp5.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp5"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800"
WindowStyle="None"
Opacity="0.1"
AllowsTransparency="True">
</Window>
Make WindowStyle="None" and AllowsTransparency="True" to get transparent window. vary opacity to get amount of transparency
Yes I got that part, but I will have more elements in the window (A video playing) and I want the rectangle to be transparent in that video too
– Thiago Souza
Mar 8 at 5:31
Can you post the screen shot of UI. Unable to visualise what you are trying to achieve
– neelesh bodgal
Mar 8 at 5:33
Ive edited my question, and included a GIF showing what I want (That Ive previously made in WinForms)
– Thiago Souza
Mar 8 at 5:46
1
@ThiagoSouza If you "got that part" it should've been in your question. Questions should include code of what you have done so far.
– Nyerguds
Mar 8 at 5:50
@Nyerguds I understood what they said by controlling opacity, but it didnt solved my problem cause I have more elements in my window.
– Thiago Souza
Mar 8 at 5:52
add a comment |
<Window x:Class="WpfApp5.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp5"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800"
WindowStyle="None"
Opacity="0.1"
AllowsTransparency="True">
</Window>
Make WindowStyle="None" and AllowsTransparency="True" to get transparent window. vary opacity to get amount of transparency
<Window x:Class="WpfApp5.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp5"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800"
WindowStyle="None"
Opacity="0.1"
AllowsTransparency="True">
</Window>
Make WindowStyle="None" and AllowsTransparency="True" to get transparent window. vary opacity to get amount of transparency
answered Mar 8 at 5:15
neelesh bodgalneelesh bodgal
313
313
Yes I got that part, but I will have more elements in the window (A video playing) and I want the rectangle to be transparent in that video too
– Thiago Souza
Mar 8 at 5:31
Can you post the screen shot of UI. Unable to visualise what you are trying to achieve
– neelesh bodgal
Mar 8 at 5:33
Ive edited my question, and included a GIF showing what I want (That Ive previously made in WinForms)
– Thiago Souza
Mar 8 at 5:46
1
@ThiagoSouza If you "got that part" it should've been in your question. Questions should include code of what you have done so far.
– Nyerguds
Mar 8 at 5:50
@Nyerguds I understood what they said by controlling opacity, but it didnt solved my problem cause I have more elements in my window.
– Thiago Souza
Mar 8 at 5:52
add a comment |
Yes I got that part, but I will have more elements in the window (A video playing) and I want the rectangle to be transparent in that video too
– Thiago Souza
Mar 8 at 5:31
Can you post the screen shot of UI. Unable to visualise what you are trying to achieve
– neelesh bodgal
Mar 8 at 5:33
Ive edited my question, and included a GIF showing what I want (That Ive previously made in WinForms)
– Thiago Souza
Mar 8 at 5:46
1
@ThiagoSouza If you "got that part" it should've been in your question. Questions should include code of what you have done so far.
– Nyerguds
Mar 8 at 5:50
@Nyerguds I understood what they said by controlling opacity, but it didnt solved my problem cause I have more elements in my window.
– Thiago Souza
Mar 8 at 5:52
Yes I got that part, but I will have more elements in the window (A video playing) and I want the rectangle to be transparent in that video too
– Thiago Souza
Mar 8 at 5:31
Yes I got that part, but I will have more elements in the window (A video playing) and I want the rectangle to be transparent in that video too
– Thiago Souza
Mar 8 at 5:31
Can you post the screen shot of UI. Unable to visualise what you are trying to achieve
– neelesh bodgal
Mar 8 at 5:33
Can you post the screen shot of UI. Unable to visualise what you are trying to achieve
– neelesh bodgal
Mar 8 at 5:33
Ive edited my question, and included a GIF showing what I want (That Ive previously made in WinForms)
– Thiago Souza
Mar 8 at 5:46
Ive edited my question, and included a GIF showing what I want (That Ive previously made in WinForms)
– Thiago Souza
Mar 8 at 5:46
1
1
@ThiagoSouza If you "got that part" it should've been in your question. Questions should include code of what you have done so far.
– Nyerguds
Mar 8 at 5:50
@ThiagoSouza If you "got that part" it should've been in your question. Questions should include code of what you have done so far.
– Nyerguds
Mar 8 at 5:50
@Nyerguds I understood what they said by controlling opacity, but it didnt solved my problem cause I have more elements in my window.
– Thiago Souza
Mar 8 at 5:52
@Nyerguds I understood what they said by controlling opacity, but it didnt solved my problem cause I have more elements in my window.
– Thiago Souza
Mar 8 at 5:52
add a comment |
Got something like this.
<Window x:Class="WpfApp3.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800" WindowStyle="None" AllowsTransparency="True" Background="Transparent">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Rectangle Fill="#66FFFFFF" Grid.Column="0" Grid.RowSpan="3"/>
<Rectangle Fill="#66FFFFFF" Grid.Column="2" Grid.RowSpan="3"/>
<Rectangle Fill="#66FFFFFF" Grid.Column="1" Grid.Row="0"/>
<Rectangle Fill="#66FFFFFF" Grid.Column="1" Grid.Row="2"/>
<Rectangle x:Name="workingRectangle" Fill="Transparent" Stroke="Red" Grid.Column="1" Grid.Row="1"/>
</Grid>
</Window>
this will not allow him to do what he is trying to achive
– Denis Schaf
Mar 8 at 8:13
add a comment |
Got something like this.
<Window x:Class="WpfApp3.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800" WindowStyle="None" AllowsTransparency="True" Background="Transparent">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Rectangle Fill="#66FFFFFF" Grid.Column="0" Grid.RowSpan="3"/>
<Rectangle Fill="#66FFFFFF" Grid.Column="2" Grid.RowSpan="3"/>
<Rectangle Fill="#66FFFFFF" Grid.Column="1" Grid.Row="0"/>
<Rectangle Fill="#66FFFFFF" Grid.Column="1" Grid.Row="2"/>
<Rectangle x:Name="workingRectangle" Fill="Transparent" Stroke="Red" Grid.Column="1" Grid.Row="1"/>
</Grid>
</Window>
this will not allow him to do what he is trying to achive
– Denis Schaf
Mar 8 at 8:13
add a comment |
Got something like this.
<Window x:Class="WpfApp3.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800" WindowStyle="None" AllowsTransparency="True" Background="Transparent">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Rectangle Fill="#66FFFFFF" Grid.Column="0" Grid.RowSpan="3"/>
<Rectangle Fill="#66FFFFFF" Grid.Column="2" Grid.RowSpan="3"/>
<Rectangle Fill="#66FFFFFF" Grid.Column="1" Grid.Row="0"/>
<Rectangle Fill="#66FFFFFF" Grid.Column="1" Grid.Row="2"/>
<Rectangle x:Name="workingRectangle" Fill="Transparent" Stroke="Red" Grid.Column="1" Grid.Row="1"/>
</Grid>
</Window>
Got something like this.
<Window x:Class="WpfApp3.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800" WindowStyle="None" AllowsTransparency="True" Background="Transparent">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Rectangle Fill="#66FFFFFF" Grid.Column="0" Grid.RowSpan="3"/>
<Rectangle Fill="#66FFFFFF" Grid.Column="2" Grid.RowSpan="3"/>
<Rectangle Fill="#66FFFFFF" Grid.Column="1" Grid.Row="0"/>
<Rectangle Fill="#66FFFFFF" Grid.Column="1" Grid.Row="2"/>
<Rectangle x:Name="workingRectangle" Fill="Transparent" Stroke="Red" Grid.Column="1" Grid.Row="1"/>
</Grid>
</Window>
answered Mar 8 at 7:22
Mathivanan KPMathivanan KP
1,1761119
1,1761119
this will not allow him to do what he is trying to achive
– Denis Schaf
Mar 8 at 8:13
add a comment |
this will not allow him to do what he is trying to achive
– Denis Schaf
Mar 8 at 8:13
this will not allow him to do what he is trying to achive
– Denis Schaf
Mar 8 at 8:13
this will not allow him to do what he is trying to achive
– Denis Schaf
Mar 8 at 8:13
add a comment |
Masking is probably the closest substitute to Windows Forms' TransparencyKey
.
add a comment |
Masking is probably the closest substitute to Windows Forms' TransparencyKey
.
add a comment |
Masking is probably the closest substitute to Windows Forms' TransparencyKey
.
Masking is probably the closest substitute to Windows Forms' TransparencyKey
.
answered Mar 8 at 7:26
JoeyJoey
267k66571604
267k66571604
add a comment |
add a comment |