Codejock Forums Homepage
Forum Home Forum Home > General > XAML Snippets
  New Posts New Posts RSS Feed - CXTPControlMarkupLabel capabilities in command bar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPControlMarkupLabel capabilities in command bar

 Post Reply Post Reply
Author
Message
PierreL View Drop Down
Groupie
Groupie
Avatar

Joined: 01 September 2006
Location: Canada
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote PierreL Quote  Post ReplyReply Direct Link To This Post Topic: CXTPControlMarkupLabel capabilities in command bar
    Posted: 02 March 2009 at 9:14pm
Hello folks,

I've been playing with the various markup features and I like it so far! Good job

I must admit I'm having trouble understanding some of the capabilities as I'm new to XAML. It could also be that I'm trying to do something which is not supported? Here's an example of what I'm trying to achieve, maybe someone can help me figure this out?

I have a frame that contains a few toolbars. One of these toolbars hosts a CXTPControlMarkupLabel to which I applied some markup. I want it to look like this:



(See further down for the markup code)


My problem:
1- The Button is not responding to click events as it does in the MarkupPad. For this to work, does the host of such a control need to derive from 'CXTPMarkupContext'?

2- If possible, how do I "connect" this label (using SetDelegate) when my frame does not derive from CXTPMarkupContext? Is there a way to do this so I can respond to events in my frame class? I'd like to display a drop-down list when it is clicked.

Thank's for your help,
Peter

Markup code:


<StackPanel Orientation="Horizontal">
 <Button>       
  <Grid>
   <Grid.ColumnDefinitions>
    <ColumnDefinition Width="Auto"/>
    <ColumnDefinition Width="*"/>
    <ColumnDefinition Width="*"/>
    <ColumnDefinition Width="*"/>
   </Grid.ColumnDefinitions>
   <Image Grid.Column="0" Width="24" Height="24" HorizontalAlignment="Left"
          VerticalAlignment="Top" Source="1002"/>         
   <TextBlock Grid.Column="1" FontWeight="Bold" Foreground="Navy"
            Text="Jason Bourne" TextAlignment="Left" VerticalAlignment="Center"/>
   <TextBlock Grid.Column="2" Margin="8, 0, 8, 0" Foreground="Gray"
            TextAlignment="Right" VerticalAlignment="Center">(Available:
            <Hyperlink ToolTip="Call Jason...">+16101234567</Hyperlink>)
   </TextBlock>
   <Image Grid.Column="3" Width="11" Height="11"
          HorizontalAlignment="Right" VerticalAlignment="Center" Source="1003"/>
  </Grid>           
 </Button>
</StackPanel>


Product: Xtreme ToolkitPro version 13.0.0
Platform: Windows XP (32bit) - SP 3
Language: C++ (MFC)
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 03 March 2009 at 1:03am
Hi,
 
Sorry, with CommandBars you can only use format features of Markup but can't use its events :(
 
So there is more difficult path - create standard STATIC with Markup (copy code from our sample) and insert it to toolbar with CXTPControlCustom control type.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
PierreL View Drop Down
Groupie
Groupie
Avatar

Joined: 01 September 2006
Location: Canada
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote PierreL Quote  Post ReplyReply Direct Link To This Post Posted: 03 March 2009 at 2:13pm
Thanks Oleg,

Maybe in future releases?

About the format features of Markup (in regards to my sample), can I change the default look of the markup button from my sample above? More specifically, can I use LinearGradientBrush & GradientStops? I tried but it requires the Page.Resource tag, which I assume is not supported in the CommandBars right?

Oh, and which Sample were you referring to in your reply?


Thanks again!
Peter



Product: Xtreme ToolkitPro version 13.0.0
Platform: Windows XP (32bit) - SP 3
Language: C++ (MFC)
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 04 March 2009 at 3:47am
Hi,
I mean \Samples\ToolkitPro\MarkupSample  sample and its MarkupStatic file.
 
Maybe event better  to use our CXTPButton with markup inside. Check this sample anyway. :)
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.