Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Setting some of the TableNode properties using WPF styling system throws an exception (Read 1762 times)
Kostya
Junior Member
**
Offline


I Love MindFusion!

Posts: 59
Joined: Aug 5th, 2014
Setting some of the TableNode properties using WPF styling system throws an exception
Oct 28th, 2014 at 7:39am
Print Post  
Hi,

I moved the diagram elements styles to a separate xaml file to skin them using the WPF styling system. Some properties are working in that way, but some throws an exception. For example, I would like to set the CaptionBrush for the TableNode. How to make it work in this style?

Code
Select All
                    <Style TargetType="diag:TableNode">
                        <Setter Property="Stroke" Value="Red"/>
                        <Setter Property="StrokeThickness" Value="5"/>
                        <Setter Property="TextBrush" Value="Blue" />
                        <Setter Property="CaptionBackBrush" Value="Green"/>
                        <Setter Property="CaptionBrush" Value="White"/> // ------ exception
                    </Style>
 



Thanks,
-Kostya
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Setting some of the TableNode properties using WPF styling system throws an exception
Reply #1 - Oct 28th, 2014 at 9:19am
Print Post  
Hi,

There's no dependency property corresponding to the CaptionBrush CLR property. It only wraps TextBrush and we keep it for API compatibility with our components for other platforms:

Code
Select All
public Brush CaptionBrush
{
	get { return TextBrush; }
	set { TextBrush = value; }
} 



So you can set the caption text brush in styles via the TextBrush property derived from DiagramItem.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Kostya
Junior Member
**
Offline


I Love MindFusion!

Posts: 59
Joined: Aug 5th, 2014
Re: Setting some of the TableNode properties using WPF styling system throws an exception
Reply #2 - Oct 29th, 2014 at 8:49am
Print Post  
Hi Stoyan,

Thanks much, it works!

-Kostya
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint