在列表框上显示透明叠加层

时间:2010-09-30 08:15:37

标签: wpf

我们有一个要求在哪里,我们需要一个列表框,一些列表项,假设这将是我的底层,除此之外,我们需要一个在某些指定位置显示透明元素的层。

我在WPF 3.5上。

希望我很清楚 在此先感谢

迪帕克

1 个答案:

答案 0 :(得分:2)

这样的东西?

<Grid>
    <ListBox>
        <ListBoxItem>First</ListBoxItem>
        <ListBoxItem>Second</ListBoxItem>
        <ListBoxItem>Third</ListBoxItem>
    </ListBox>

    <Canvas>
        <Ellipse Width="100" Height="50" Fill="Transparent" Stroke="Red" Canvas.Left="15" Canvas.Top="8" />
    </Canvas>
</Grid>