index > Visual Studio Team System - Domain-Specific Language Tools > Manioulate shape text decorator at runtime.

Manioulate shape text decorator at runtime.


HI all,

I am looking for a way to manipulate the text dewcorator of a specific shape instance (not shape type) at runtime. For exemple, I would like to give the focus to a text decorator when the parent shape is added to the designer. Or, change the text color depending on the state of the element associated with the shape.

Is it possible??

Freddo

Freddo

You cannot manipulate a specific instance of the text decorator. They're mapped for each parent shape type. However, it is possible to override colors in the StyleSet for an instance of a shape. On the shape, you can override InitializeInstanceStyleSet to override the pen used for drawing the text. And, you can update that pen depending on state in the parent shape.




Pedro Silva - http://blogs.msdn.com/pedrosilva
Pedro Silva

Hi Pedro,

Thank you for your help.

I would also like to know if it is possible to give the focus to a text decorator when the parent shape is added to the designer.

Freddo

Freddo
reply 3

You can use google to search for other answers

 

More Articles

schedule for beta and V1 releases?
Any Practical Limits on Model Size?
Fail to load Designer package
where can ? find info about DSL?
Announcing: SharpLudus, a software factory for improved game deve...
Change name of Extension & name of the language afterwards
DSL : Properties Grouping in the Property Window and Shapes Gro...
Problem starting new DSL-project
Welcome to the Domain-Specific Language (DSL) Tools Forum
Change a connector's from and to endpoints at runtime
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

Open a new Document
HELP!!!...There is no: File > Export …
Crash of visual studio when model is inc…
"Static" Swimlanes
Retrieving embedded elements
Connectors connecting to connectors
Model Query Capabilities
Reading and writing models in June relea…
November DSL Toolkit Release: where are …
Domain model designer toolbox items disa…
Adding/Removing elements in domain model
Orchestration Features
N-ary Relationships
Own shape decorators
Customize DirectiveProcessor

Hot Articles

How To Navigate over Links
Embedding shapes in v1
How to manually process template in June…
How can i associate a textfield with a p…
UIPChart problem
How can I order compartments within a sh…
Retrieving embedded elements
Experience report: Building my own DSL
Template transformation error in designe…
Implementation Errors in DSL(C# Project)
Transaction.RollBack() Error: Oject refe…
my feedback about dsl
How to update PropertyGrid after changin…
How to Dynamically create shapes
Moving DSL Project to another machine

Recommend Articles

Troubleshooting: duplicate generated files
A minor gotcha: reserved words
Own shape decorators
I have a new article from the NOV CTP ba…
how can i use the DiagramView to develop…
bidirectional connectors
Serialize reference type class member
Outline Pen Width
Tying domain classes to shape objects
Problems loading package
How access to a connector property
geometryShape no "Diamond" Sha…
IE7 Beta 2 and DSL Tools
Adding/Removing elements in domain model
How to migrate / implement CustomStorage…