BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
<DockPanel LastChildFill="True"><Canvas x:Name="canvas" Margin="0,61,0.4,87.8"><ScrollViewer CanContentScroll="True"HorizontalScrollBarVisibility="Auto"VerticalScrollBarVisibility="Auto"Width="{Binding ActualWidth, ElementName=canvas}" Height="{Binding ActualHeight, ElementName=canvas}"><syncfusion:GridControl Name="grid" Width="{Binding ActualWidth, ElementName=canvas}" Height="{Binding ActualHeight, ElementName=canvas}" /></ScrollViewer></Canvas></DockPanel>
Thanks for any help.public partial class MainWindow : Window{private int rows = 10;private int columns = 10;public MainWindow(){InitializeComponent();configureGrid();}// Help Functionsprivate void configureGrid(){// Setting the number of rows and columns.grid.Model.RowCount = rows;grid.Model.ColumnCount = columns;// Setting the width and height of the cells.grid.Model.RowHeights.DefaultLineSize = 50;grid.Model.ColumnWidths.DefaultLineSize = 50;// Setting the background of the grid.setGridBackgroundImage();// Disabling column and row resizing.IMouseController controller = grid.MouseControllerDispatcher.Find("ResizeRowsMouseController");grid.MouseControllerDispatcher.Remove(controller);controller = grid.MouseControllerDispatcher.Find("ResizeColumnsMouseController");grid.MouseControllerDispatcher.Remove(controller);// Configuring headersconfigureHeaders();grid.Model.QueryCellInfo += new Syncfusion.Windows.Controls.Grid.GridQueryCellInfoEventHandler(Model_QueryCellInfo);}private void setGridBackgroundImage(){CellSpanBackgroundInfo item = new CellSpanBackgroundInfo(1, 1, rows, columns);item.Background = new ImageBrush(CreateBitMapImage("W:\\dhines\\douglas-jammer-overwatch\\DouglasJammerOverwatch\\bin\\Debug\\blueprint_pdf_to_jpg.jpg"));grid.Model.CellSpanBackgrounds.Add(item);}private void configureHeaders(){grid.Model.RowHeights[0] = 25;grid.Model.ColumnWidths[0] = 25;grid.Model.HeaderStyle.Background = new SolidColorBrush(Colors.NavajoWhite);}void Model_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e){if (e.Cell.RowIndex == 0 && e.Cell.ColumnIndex > 0){e.Style.Text = GridRangeInfo.GetAlphaLabel(e.Cell.ColumnIndex);e.Style.HorizontalAlignment = HorizontalAlignment.Center;e.Style.VerticalAlignment = VerticalAlignment.Center;}else if (e.Cell.RowIndex > 0 && e.Cell.ColumnIndex == 0){e.Style.Text = e.Cell.RowIndex.ToString();e.Style.HorizontalAlignment = HorizontalAlignment.Center;e.Style.VerticalAlignment = VerticalAlignment.Center;}}private BitmapImage CreateBitMapImage(string imageName){BitmapImage image = new BitmapImage();image.BeginInit();image.CacheOption = BitmapCacheOption.OnLoad;image.UriSource = new Uri(imageName);image.EndInit();return image;}}