Hi,
we crearte the Shapes like this:
then we bin the Shapes to the toolbox
For example we habe a simple RectangleShape. With a cutom Tab in EditMode we select a Employee and now we want to edit the RectangleShape. Is it possible to change the view of the RectangleShape during runtim, for example see attached files.
Thanks a lot
Best Regards
Rene
we crearte the Shapes like this:
MyGallery secondGallery = new MyGallery { Header = "Shapes" };secondGallery.Shapes.Add(new Switch{ SN = "222", Content = "Start", Height = 80, Width = 80, Backcolor = "#009494", Forecolor = "#ffffff", Geometry = ShapeFactory.GetShapeGeometry(CommonShapeType.EllipseShape), Manufacturer = "Manufacturer 2.2"});then we bin the Shapes to the toolbox
<!-- ToolboxItemTemplate --><DataTemplate x:Key="ToolboxItemTemplate1"> <Border Width="130" Height="80" Margin="0 1 1 0" Background="Transparent"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="*" /> </Grid.RowDefinitions> <Viewbox Grid.Row="0" Width="{Binding Width}" Height="{Binding Height}" Margin="5 10 5 0" HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Fill"> <telerik:RadDiagramShape Margin="15" VerticalAlignment="Top" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontWeight="Bold" Geometry="{Binding Geometry}" IsHitTestVisible="False" Content="{Binding Content}" FontSize="15" Foreground="{Binding Forecolor}" Background="{Binding Backcolor}"> </telerik:RadDiagramShape> </Viewbox> </Grid> </Border> </DataTemplate><!-- ToolboxGroupTemplate --><HierarchicalDataTemplate x:Key="ToolboxGroupTemplate1" ItemsSource="{Binding Shapes}" ItemTemplate="{StaticResource ToolboxItemTemplate1}"> <TextBlock Text="{Binding Header}" FontSize="13" /></HierarchicalDataTemplate>For example we habe a simple RectangleShape. With a cutom Tab in EditMode we select a Employee and now we want to edit the RectangleShape. Is it possible to change the view of the RectangleShape during runtim, for example see attached files.
Thanks a lot
Best Regards
Rene