Hi,
I'm trying to use:
Field.PerformAutoSize(FieldAutoSizeOptions.DataCells, FieldAutoSizeScope.RecordsInView)
on a Field with a custom CellValuePresenter, but I could do with some guidance as to how this works, as I'm finding that some of my data is being truncated (no doubt due to some padding/margin values within the template).
Is there a way to shrink the field width to the largest (TextBlock) content AND keep a small amount of custom margin around that?
Regards,
Simon
Can you provide a sample that demonstrates the problem?
Hello weavesi,
Have you found a solution to this problem? I have exactly the same problem (even if I don't use the same font as you).
Actually, I've just noticed from your screen shot that you are not using the same font as I am - Consolas (the zero would have a slash through it if you were).
You might not have it installed. We use it as our font of choice for numeric data (fixed pitch).
Well, my system info is:
OS: XP Pro 5.1.2600 (SP3); .Net: 3.5 SP1 + hotfixes -> 2.0.50727.3603
Unfortunately, there is not much I can do about that in my work environment.
Any ideas on a workaround though - here is what happens when I set the padding to 8,0,8,0 on the internal TextBlock - the text trimming has kicked in even though there is a big gap to the right.
I tried it in XP and it works there as well. Perhaps you're using an older version of the WPF framework on that XP system and there was a bug in that that is causing the issue?