Diagram Border Hide

GoSilverlight 1.2.24

I was set BorderBrush="white" BorderThickness="0"
but Diagram default rounded Border displayed.
How to hide it?

Are you asking about the Diagram’s border or about a border around some Nodes?

Setting Diagram.BorderBrush just sets the brush on the Border around the diagram (actually around the ScrollViewer).

Hi, I’m having the same issue with release 1.2.6.4 under Windows Vista. There appears to be a second embedded border on the Silverlight Diagram control. Setting BorderThickness to 0 hides the outer border, but it would appear there is a child control with another border. This does not happen in WPF. I have attached a screen print for your reference. Thanks, Jonathan





Here’s my test code:



<UserControl x:Class=“SilverlightApplication3.MainPage”

xmlns=“http://schemas.microsoft.com/winfx/2006/xaml/presentation

xmlns:x=“http://schemas.microsoft.com/winfx/2006/xaml

xmlns:d=“http://schemas.microsoft.com/expression/blend/2008

xmlns:mc=“http://schemas.openxmlformats.org/markup-compatibility/2006

xmlns:GoXam=“clr-namespace:Northwoods.GoXam;assembly=Northwoods.GoSilverlight”

mc:Ignorable=“d” d:DesignHeight=“300” d:DesignWidth=“400”>



<GoXam:Diagram Margin=“20” BorderThickness=“0” />



Yes, that’s a difference between WPF and Silverlight in how the ScrollViewer is styled by default.

Apparently the Silverlight ScrollViewer normally has a border.

You can change the ScrollViewer by customizing the ControlTemplate for the Diagram. The default ControlTemplate is shown in the Generic…xaml file that is included in the docs subdirectory of the GoXam installation.

By the way, another commonly discovered difference between WPF and Silverlight is that the default value for HorizontalContentAlignment and VerticalContentAlignment are different.