¿It's possible to assign nodeStyle defined in resourceDictionary from code behind?
In xaml I do something like this
<ig:OrgChartNodeLayout Key="Hijos" TargetTypeName="Nodo" DisplayMemberPath="_numero" ToolTipPath="_duenio" NodeStyle="{StaticResource NodeStyle}" > </ig:OrgChartNodeLayout>
NodeSyle is the style I defined in ResourceDictionary
I want do it from code because the format is conditional
Thanks Anatoli
Your suggestion helped me.
i do this e.Node.Style = CType(Resources("MyStyle"), Style)
Darwin
Hello
You can try to subscribe for the XamOrgChart.NodeControlAttached event and based on any condition to apply style as following:
e)
{
e.Node.Style =
this.LayoutRoot.Resources["YouStyleKey"] as Style;
}
Best regards,
Anatoli
Hi
If I apply xamOrgChartControl.GlobalNodeLayouts[0].NodeStyle the style applies to all nodes.
I want to apply the style to each node, because it´s conditional,
Private Sub OrgChart_NodeControlAttachedEvent(sender As Object, e As Infragistics.Controls.Maps.OrgChartNodeEventArgs) Handles OrgChart.NodeControlAttachedEvent
It's possible to style each node?
Hello,
You can assign NodeStyle through the code behind. The code should be something like this:
xamOrgChartControl.GlobalNodeLayouts[0].NodeStyle = this.LayoutRoot.Resources['YouStyleKey"] as Style;
Anatoli Iliev