Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Defining styles for Diagram and custom ShapeNode (Read 2277 times)
binuvc
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 46
Joined: Nov 7th, 2011
Defining styles for Diagram and custom ShapeNode
Dec 7th, 2011 at 1:42pm
Print Post  
Hi,

Case 1: Is it possible to create styles in xaml for the diagram control as follows.
we tried the following :

<Style x:Key="HierarchicalViewDiagram" TargetType="mindFusion: Diagram">
<Setter Property="Background" Value="White"/>
<Setter Property="AdjustmentHandlesSize" Value="8"/>
<Setter Property="AllowDrop" Value="true"/>
<Setter Property="AllowMultipleResize" Value="true"/>
<Setter Property="AllowUnconnectedLinks" Value="false"/>
</Style>

But we are not getting any of its properties in the XAML style. Throwing runtime error that the properties - AdjustmentHandlesSize, AllowMultipleResize, AllowUnconnectedLinks are not there.


Case 2: We created the styles for shapenode as follows

<Style x:Key="OrganizationNode" TargetType="mindFusion:ShapeNode" >
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="mindFusion:ShapeNode">
<Canvas x:Name="Adorner">
-----
-----
-----

the aim is to set this style to a Custom Control derived from ShapeNode through code.

This is required because the styles has been externalised in another dll where the custom control derived from shapenode is not available. Else we could have given the TargetType as "local:<CustomNodeTypeName>".

how can this be achieved?


Thanks in advance

binuvc
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Defining styles for Diagram and custom ShapeNo
Reply #1 - Dec 8th, 2011 at 9:26am
Print Post  
Hi,

1) The three properties you list are not dependency properties and can't be set from a style. We'll try to implement them as such in the next few days.

2) I suppose you will have to explicitly load and assign the style as shown here:
http://www.mindfusion.eu/onlinehelp/diagramlite/index.htm?Styles_and_Control_Tem...

I hope that helps,
Stoyan
« Last Edit: Dec 8th, 2011 at 2:24pm by Stoyo »  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Defining styles for Diagram and custom ShapeNo
Reply #2 - Dec 14th, 2011 at 10:28am
Print Post  
1) The version here should let you use those properties in styles:
http://mindfusion.eu/Forum/YaBB.pl?board=diaglite_disc;action=display;num=132377...

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint