Print Page | Close Window

Gradients, Styles and StaticResource Programatical

Printed From: Codejock Forums
Category: General
Forum Name: XAML Snippets
Forum Description: Post your XAML snippets here for everyone to enjoy :)
URL: http://forum.codejock.com/forum_posts.asp?TID=13992
Printed Date: 20 April 2024 at 2:08am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Gradients, Styles and StaticResource Programatical
Posted By: gibrael
Subject: Gradients, Styles and StaticResource Programatical
Date 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.




Replies:
Posted By: JantjeKeizer
Date 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.


Posted By: JantjeKeizer
Date Posted: 29 June 2009 at 11:02am
Bump


Posted By: Oleg
Date Posted: 29 June 2009 at 2:04pm
Unfortunteally there is no class model for styles/resources now :(

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


Posted By: BobWansink
Date 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++



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