or

<Window.Resources> <DataTemplate x:Key="SubItemTemplate"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="40*" /> <ColumnDefinition Width="60*" /> </Grid.ColumnDefinitions> <Image Margin="0" Grid.Column="0" x:Name="PartImageName" Stretch="Uniform" /> <TextBlock Grid.Column="1" Text="Part ID" x:Name="PartID" /> </Grid> </DataTemplate> </Window.Resources> <telerik:RadDiagram Margin="2,2,2,2" x:Name="stateDiagram"> </telerik:RadDiagram> private void Window_Loaded(object sender, RoutedEventArgs e) { RadDiagramShape StateBox = new RadDiagramShape() { Width = 100, Height = 100, Geometry = ShapeFactory.GetShapeGeometry(CommonShapeType.RectangleShape), ContentTemplate = (DataTemplate)this.FindResource("SubItemTemplate"), }; //now change dynamically the picture and the text of the StateBox: ContentPresenter myContentPresenter = FindVisualChild<ContentPresenter>(StateBox,0); Image imageInTemplate = (Image)Box.ContentTemplate.FindName("PartImageName", myContentPresenter); imageInTemplate.Source = new Uri(strFilePath, UriKind.Absolute); TextBlock textBlockInTemplate = (TextBlock)Box.ContentTemplate.FindName("PartID", myContentPresenter); textBlockInTemplate.Text = "some part id"; stateDiagram.AddShape(StateBox); }Thank you very much.
Mikhail.