i want to delete nodes from a palette dynamically. When i update NodesSource of the palette, it works but the height of the palette does not change. Cant find a property which disables this.
And when i change the palettes width is there a possibility, that it only contains one column, independent from the width?
The width and height of any Control, including a Palette, is determined by the panel layout of the WPF/Silverlight Panels that contain your control. Just because the user deletes all of the nodes in their Diagram does not cause the Diagram to suddenly become zero-sized.
But if you want to automatically make such changes, you could implement a Diagram.LayoutCompleted event handler that adjusts the Width and/or Height of the Diagram, either directly or by modifying the Panel that holds the Diagram.
Regarding columns, by default a Palette has a GridLayout. You can set GridLayout.WrappingColumn = 1 to limit the layout to a single column of nodes regardless of the width of the Palette.
Thank your for this answer. I changed the height of the containing control, but it did not look so good/precise, so i thought maybe there is a build-in-mechanism in palette.
Sorry for asking so much beginners things, i am new in WPF and because i have to use MVVM, using your library is not so intuitive…
Although GoXam was designed before MVVM existed, I think it fits in pretty well.
Certainly the use of a model and reliance on data binding make it natural to use. GoXam also defines routed commands.
Furthermore most of the samples code could easily be reorganized. For ease of organizing the GoWpfDemo app, each sample has a single XAML file, a single CS file, and a single optional XML data file. But most of the code can trivially be moved out from that single CS code-behind file.