Codejock Forums Homepage
Forum Home Forum Home > General > XAML Snippets
  New Posts New Posts RSS Feed - Gradients, Styles and StaticResource Programatical
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Gradients, Styles and StaticResource Programatical

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

Joined: 17 March 2009
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote gibrael Quote  Post ReplyReply Direct Link To This Post Topic: Gradients, Styles and StaticResource Programatical
    Posted: 12 April 2009 at 8:31pm
Hi, I'm new to XAML and i have a few questions.

How can i create styles and gradients using xaml programmatically in VB6. For example I have this:


    <LinearGradientBrush x:Key="FolderBrush" StartPoint="0,0" EndPoint="1,0">
        <GradientStop Color="#d6e8ff" Offset="0"/>
        <GradientStop Color="#e3efff" Offset="0.5"/>
        <GradientStop Color="#d6e8ff" Offset="1"/>
    </LinearGradientBrush>


How do i code this in VB6 so that i can use it as a style?
I was assuming it would be something like:


Dim LinearGradient As MarkupLinearGradientBrush
Set LinearGradient As MarkupLabel1.Context.CreateObject("LinearGradientBrush")
...


but  I don't see any objects like MarkupLinearGradientBrush or MarkupGradientStop or Style in the manual and there are no samples available.

Any information will be appreciated. Thank you very much.

Back to Top
JantjeKeizer View Drop Down
Groupie
Groupie


Joined: 12 February 2008
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote JantjeKeizer Quote  Post ReplyReply Direct Link To This Post Posted: 19 June 2009 at 6:14am
Yeah I'd like to know that too
 
I want to build markup in code with the markup objects, but I can't find a way to use styles and triggers that way or set gradients.
For now I reverted to having a textual template where I modify certain parameters, but it's not the prefered way.
Back to Top
JantjeKeizer View Drop Down
Groupie
Groupie


Joined: 12 February 2008
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote JantjeKeizer Quote  Post ReplyReply Direct Link To This Post Posted: 29 June 2009 at 11:02am
Bump
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: 29 June 2009 at 2:04pm
Unfortunteally there is no class model for styles/resources now :(
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
BobWansink View Drop Down
Groupie
Groupie
Avatar

Joined: 24 January 2008
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote BobWansink Quote  Post ReplyReply Direct Link To This Post Posted: 03 July 2009 at 5:18am
hi oleg,

I'll ask the default question in response to your answer:

Will it be implemented, and if so: when will it be made available?


After working with Parse() and large pieces of CString, I'd come to the conclusion that creating the objects at runtime is much more efficient and cleaner programming. Being able to create styles for objects and attaching/detaching them to and from MarkupObjects would really make CXTPMarkup a much more elegant UI solution.

thanks in advance.

Bob


     Product: Xtreme ToolkitPro (MFC) version 13.0.0
     Platform: Windows (32bit) - XP - Vista
     Language: Visual C++
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.