je définissais la mise en page suivante:ScatterView et ViewBox ne fonctionne pas comme prévu
<Grid Name="RootGrid" Background="{StaticResource WindowBackground}" >
<s:ScatterView Name="RootScatter">
<Viewbox>
<s:LibraryContainer Name="RootContainer" Grid.Row="0" ViewingMode="Bar">
<s:LibraryContainer.BarView>
<s:BarView Rows="2" NormalizedTransitionSize="2.5,0.8" ItemTemplate="{StaticResource ContainerItemTemplate}">
</s:BarView>
</s:LibraryContainer.BarView>
<s:LibraryContainer.StackView>
<s:StackView NormalizedTransitionSize="1,1" ItemTemplate="{StaticResource ContainerItemTemplate}">
</s:StackView>
</s:LibraryContainer.StackView>
</s:LibraryContainer>
</Viewbox>
</s:ScatterView>
<s:ScatterView Name="ClassScatter"></s:ScatterView>
</Grid>
</s:SurfaceWindow>
Maintenant, j'ajouter dynamiquement article à la deuxième ScatterView:
public void expand(SurfaceWindow1 surfaceWindow)
{
Logging.Logger.getInstance().log("Expand class " + name);
if (!isExpanded())
{
Viewbox vb = new Viewbox();
SurfaceTextBox txt = new SurfaceTextBox();
txt.Text = this.name + "\nLOC: " + this.getLoc() + "\nFanIn: " + this.getFanIn() + "\nFanOut: " + this.getFanOut() + "\nComplexity: " + this.getComplexity();
txt.IsReadOnly = true;
vb.Child = txt;
surfaceWindow.ClassScatter.Items.Add(vb);
this.setExpanded(true);
}
}
Cela fonctionne très bien, mais malheureusement, je ne peux 't pas changé la taille, déplacer ou faire pivoter l'objet qui est créé. Des indices pourquoi?
Merci votre allusion a travaillé comme un charme! – RoflcoptrException