Hello Northgates,
i am just using the drawing pane of nevron. All Buttons and other gui elements are created by my self.
// I JUST CREATED A "NDiagramCommander "
private NDiagramCommander commander = new NDiagramCommander();
private NDrawingView drawingView = new NDrawingView();
...
// I ASSIGNED THE COMMANDER TO THE VIEW
commander.View = this.drawingView;
// IF THE USER PRESSES MY ALLIGN LEFT BUTTON, I DO THIS
NAlignLeftsCommand command = new NAlignLeftsCommand();
commander.Commands.Add(command);
command.Execute();
// TO CHANGE THE FOREGROUND COLOR OF ALL SHAPES, I DO THIS
public void SetFontForegroundColor(Color color)
{
if (drawingView == null) return;
NSelection selection = drawingView.Selection;
if (selection.NodesCount == 0) return;
NTextStyle textStyle = new NTextStyle();
textStyle.FillStyle = new NColorFillStyle(color);
foreach (INNode node in selection.Nodes)
{
NShape shape = (NShape)node;
if (shape.Style.TextStyle == null)
{
shape.Style.TextStyle = textStyle;
}
else
{
shape.Style.TextStyle.FillStyle = new NColorFillStyle(color);
}
}
drawingView.SmartRefresh();
}
Hope this helps.
Regards, Dieter