Open josse995 opened 5 years ago
Hi, you should change the VertexControl
template in XAML.
This is the default template:
<Style TargetType="{x:Type graphx:VertexControl}">
<Setter Property="Background" Value="#FFE3E3E3"/>
<Setter Property="BorderThickness" Value="5,3,5,3"/>
<Setter Property="Padding" Value="10,5,10,5"/>
<Setter Property="BorderBrush" Value="#FF393939"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type graphx:VertexControl}">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
CornerRadius="10,10,10,10"
Padding="{TemplateBinding Padding}">
<Grid>
<ContentPresenter Content="{TemplateBinding Vertex}" />
<graphx:VertexLabelControl x:Name="PART_vertexLabel" Content="{Binding Vertex, RelativeSource={RelativeSource TemplatedParent}}" />
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="graphxRoot:GraphAreaBase.PositioningComplete" Value="False">
<Setter Property="Visibility" Value="Hidden"/>
</Trigger>
</Style.Triggers>
</Style>
Thank you for the reply! Thanks to you response, I started thinking that VertexControl is like a container, and then, I find out easy to add whatever you want!
Thank you for your hard work! (Sorry for the late response BTW :( )
np, have fun!
Hello everyone!
I am trying to set an image as background of a vertex, but I don't find how to do it. It is possible to do this? If it is possible, how could I do it?
Thanks!