在图像的特定区域限制像素着色器
-
27-09-2019 - |
题
是否有任何方式限制于图像的特定区域中的像素着色器。
BR
解决方案
绘制布局(网格,帆布等),从而使一个或多个细胞中含有的禁区。然后绘制该特定区域的矩形或边境控制,以获得您正在寻找理想的效果。请记住,先添加矩形,或把玩Z-索引如我在下面,使您的代码不会隐藏任何控制。
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Rectangle Grid.Column="0" Grid.Row="1" Panel.ZIndex="0" >
<Rectangle.Style>
<Style TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="Blue"/>
</Style>
</Rectangle.Style>
</Rectangle >
<TextBox Grid.Column="0" Grid.Row="1" Height="25" Margin="10" Text="Test 123" Panel.ZIndex="1" />
</Grid>
不隶属于 StackOverflow