Print Page | Close Window

HOWTO: CXTPTaskDialog buttons using XAML markup

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=12955
Printed Date: 23 June 2025 at 8:21am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: HOWTO: CXTPTaskDialog buttons using XAML markup
Posted By: mgampi
Subject: HOWTO: CXTPTaskDialog buttons using XAML markup
Date Posted: 17 December 2008 at 10:15am
Hi;
I try to use XAML markup on CXTPTaskDialog buttons but it fails.
Here's my code
    
        CXTPTaskDialog dlg;
        dlg.EnableCommandLinks();
        dlg.EnableMarkup();
        dlg.EnableCancellation();
        dlg.SetWindowTitle("Changed Script Code");
        dlg.SetMainInstruction("<TextBlock Padding='3, 3, 3, 3' TextWrapping='Wrap' Foreground='#000000' FontWeight='Normal' FontSize='12' FontQuality='ClearType'>"
                                      "<Bold>Wollen Sie die vorgenommenen Änderungen speichern?</Bold>"
                                      "<LineBreak/>"
                                      "<LineBreak/>"
                                      "Sämtliche  Änderungen gehen verloren, wenn sie jetzt nicht gespeichert werden."
                                      "</TextBlock>");
       
        dlg.SetMainIcon(::LoadIcon(0, IDI_QUESTION));
        dlg.AddButton("<TextBlock Padding='3, 3, 3, 3' FontSize='12' FontQuality='ClearType'>Nicht speichern</TextBlock>", 30);
        dlg.AddButton("<TextBlock Padding='3, 3, 3, 3' FontSize='12' FontQuality='ClearType'>Abbrechen</TextBlock>", 32);
        dlg.AddButton("<TextBlock Padding='3, 3, 3, 3' FontSize='12' FontWeight='Bold' FontQuality='ClearType'>Speichern</TextBlock>", 31);
        dlg.SetCommonButtons(FALSE,FALSE, FALSE, FALSE, FALSE, FALSE);
        dlg.SetDefaultButton(31);
        if (dlg.DoModal()!=32) {
            ...
        }


Did I miss something, or isn't it implemented yet?


-------------
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022



Replies:
Posted By: mgampi
Date Posted: 17 December 2008 at 10:21am
Ok;
I've been too fast.
In the original code I set EnableCommandLinks() and it seems that this disables the markup feature of buttons...
Now the dialog looks a little bit different and I don't know how to switch it back to look as before but also use markup text for the buttons...

Is this a bug???

Any help is very welcome


-------------
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022


Posted By: Oleg
Date Posted: 18 December 2008 at 6:38am
Hi,
Yes, Link buttons don't support markup. To swith it back just comment EnableCommandLinks line.
 
Checking if it can be extended for next release.
Thanks.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: mgampi
Date Posted: 18 December 2008 at 8:51am
Hi Oleg;

Enabling markup for command links would be very fine...
Thanks in advance!


-------------
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022


Posted By: joep
Date Posted: 20 May 2014 at 11:45am
Hi, it seems markup in command links is still not possible. Is that correct and if so, will it be possible in a next release?



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net