![]() |
[SOLVED]XAML hypertext underline is sticking |
Post Reply ![]() |
Author | |
agontarenko ![]() Admin Group ![]() Joined: 25 March 2016 Status: Offline Points: 275 |
![]() ![]() ![]() ![]() ![]() Posted: 12 November 2016 at 10:13am |
Hello Lodep59,
I'm glad to inform you that the issue has been fixed. As hotfix you can change function as below. SIZE CXTPMarkupGdiPlusDeviceContext::MeasureString(LPCWSTR lpszText, int nCount) const { SIZE sz = { 0 }; RectF rc; RectF layoutRect(0, 0, 0.0f, 0.0f); if (Gdiplus::Ok == m_pGdiPlus->GdipMeasureString(GetGraphics(), lpszText, nCount, AccessFont(), &layoutRect, m_pGpStringFormat, &rc, 0, 0)) { sz.cx = static_cast<int>(CXTPMathUtils::Round(rc.Width)); //fixed sz.cy = static_cast<int>(CXTPMathUtils::Round(rc.Height)); //fixed } return sz; } |
|
![]() |
|
Lodep59 ![]() Senior Member ![]() ![]() Joined: 03 April 2008 Status: Offline Points: 203 |
![]() ![]() ![]() ![]() ![]() |
It seems to be related to GDI+.
See the examples below (note the space aroud the "sender adress" and the fact that the final dot is not positioned correctly when GDI+ is on) : ![]() ![]() For my label, ok, I can access the "MarkupContext" object and disable GDI+. But it seems to be a bug don't you think ? And, also, for some controls (like taskpanel) I can enable markup but I can't access the markup context object ! |
|
Product: Xtreme SuitePro (ActiveX) last version
Platform: Windows 7 Ultimate Language: VB6 SP6 (FR) |
|
![]() |
|
Lodep59 ![]() Senior Member ![]() ![]() Joined: 03 April 2008 Status: Offline Points: 203 |
![]() ![]() ![]() ![]() ![]() |
I've tried more than 20 fonts and, for all of them, the underline is stuck to the text...
Oleksandr : can you help me ?
|
|
Product: Xtreme SuitePro (ActiveX) last version
Platform: Windows 7 Ultimate Language: VB6 SP6 (FR) |
|
![]() |
|
Lodep59 ![]() Senior Member ![]() ![]() Joined: 03 April 2008 Status: Offline Points: 203 |
![]() ![]() ![]() ![]() ![]() |
I agree with you... Any solution ?
|
|
Product: Xtreme SuitePro (ActiveX) last version
Platform: Windows 7 Ultimate Language: VB6 SP6 (FR) |
|
![]() |
|
Fredrik ![]() Senior Member ![]() Joined: 22 June 2005 Status: Offline Points: 235 |
![]() ![]() ![]() ![]() ![]() |
... I don't really think the solution here is to use another font. I'd like to continue using Segoe UI in my case... |
|
Windows 10, Visual Studio 20157, Toolkit Pro 18.3.0
|
|
![]() |
|
Lodep59 ![]() Senior Member ![]() ![]() Joined: 03 April 2008 Status: Offline Points: 203 |
![]() ![]() ![]() ![]() ![]() |
I tried but can't find a suitable font... Do you have one ?
|
|
Product: Xtreme SuitePro (ActiveX) last version
Platform: Windows 7 Ultimate Language: VB6 SP6 (FR) |
|
![]() |
|
olebed ![]() Admin Group ![]() Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
![]() ![]() ![]() ![]() ![]() |
There many changes between these versions, try to use other font or its properties.
|
|
![]() |
|
Lodep59 ![]() Senior Member ![]() ![]() Joined: 03 April 2008 Status: Offline Points: 203 |
![]() ![]() ![]() ![]() ![]() |
(moved from this topic)
Thanks a lot Oleksandr ! It's clear now :) Waiting for your samples updated (next version I presume ?). Another question : can you explain me why the same XAML code produces these two different results in 16.3 and 17.3 ? ![]() The hypertext underline is sticking to the text in 17.3, the 16.3 result seems a lot more readable... Thanks.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |