I have a Grid in my WPF window. When a particular button is pressed, I want a control in one of the Grid cells to expand downward to double its original size. When this happens, the control is clipped to the visual bounds of the containing cell. However, I need all of the content to be visible, over the top of the cell below. I tried setting Panel.ZIndex to a high value, to no avail. I basically need to emulate the functionality of "overflow:visible" in CSS. Is this possible in WPF/Xaml?
Set the ClipToBounds property of the control within the cell to False
and then wrap the cell's content in a Canvas. The Canvas is a guaranteed break out of bounds, not all controls do (such as Buttons).
Example:
<Canvas Grid.Row="5" Grid.Column="3">
<TextBlock Text="Long text here" ClipToBounds="False">
</Canvas>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With