Spread WPF and Spread Silverlight version 1.0.4.0 is now released! Enhancements in this version include:
` public partial class UserControl1 : UserControl
{
public UserControl1()
{
InitializeComponent();
DrawingObjectManager.SetDrawingObjectProvider(this.gcSpreadSheet1, new MyDrawingObjectProvider());
}
}
public class MyDrawingObjectProvider : IDrawingObjectProvider
{
public DrawingObject[] GetDrawingObjects(Worksheet sheet, int row, int column, int rowCount, int columnCount)
{
if (row == 1 && column == 1)
{
return new ControlDrawingObject[] { new ControlDrawingObject(row, column, new Button()) };
}
return sheet.GetDrawingObject(row, column, rowCount, columnCount);
}
}
public class ControlDrawingObject : CustomDrawingObject
{
private Control _rootElement;
public ControlDrawingObject(int row, int col, Control control) : base(row, col) { _rootElement = control; this.ShowDrawingObjectOnly = true; }
public override FrameworkElement RootElement
{
get { _rootElement.Margin = new Thickness(1); return _rootElement; }
}
}
`
Download the new Spread WPF-Silverlight v1.0.4.0 and start your free 30-day trial today!