开发者

Getting text to bleed out of a DataGridCell in Silverlight, but not bleed out of DataGrid

Sort of an odd and specific problem here, but I'm trying to figure out a clean way to have an object in Silverlight (in my case a TextBlock) bleed out of a DataGridCell, but not bleed out of the containing DataGrid.

For example:

[      ][      ][      ][      ]
[      ][    Bl][eed   ][      ]
[      ][      ][      ][      ]

I don't exactly what the text itself to be in two different cells, but rather I'd like the text to overlap.

What I want to avoid though is this:

[      ][      ][      ][      ]
[      ][  开发者_Go百科    ][      ][    Bl]eed
[      ][      ][      ][      ]

In this case, I'd rather it look like:

[      ][      ][      ][      ]
[      ][      ][      ][    Bl]
[      ][      ][      ][      ]

Currently, I've tried to change the CellTemplate so that my TextBlock is contained within a PopUp control, and the PopUp is always open. This doesn't work though, because by using the PopUp, it will bleed outside the DataGrid. To get around this, I tried to then give the DatGrid a Clip rectangle, but that didn't work - the PopUp is still visible outside the DataGrid.

Hoping someone has a clean and simple solution to this method. The best case would be some sort of magical DataGrid.ColumnSpan or DataGridColumn.ColumnSpan that I'm not aware of...


Right tool for the right job. I switched to a Canvas.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜