开发者

Restricting Pixel shader on particular area of image

开发者 https://www.devze.com 2023-01-11 10:23 出处:网络
Is there any way to restrict Pixel shader on particular area of image. B开发者_运维知识库RDraw a layout (Grid, Canvas etc.), so that one or more cells contain the restricted area. Then draw a Rectan

Is there any way to restrict Pixel shader on particular area of image.

B开发者_运维知识库R


Draw a layout (Grid, Canvas etc.), so that one or more cells contain the restricted area. Then draw a Rectangle or Border control on that particular area to get the desired effect you are looking for. Remember to add the Rectangle first, or play with ZIndex as I show below so that your code does not hide any controls.

<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>
0

精彩评论

暂无评论...
验证码 换一张
取 消