public SummaryResultsWindow(Hashtable sumResults) { InitializeComponent(); this._sumResults = sumResults; ShapefileWorkspaceFactoryClass tempWSFactory = new ShapefileWorkspaceFactoryClass(); IWorkspace tempWS = tempWSFactory.OpenFromFile(this._sumResults["workspace"].ToString(), 0); IFeatureWorkspace featureWS = tempWS as IFeatureWorkspace; // Bind dataset to the binding source TableWrapper tableWrapper = new ArcDataBinding.TableWrapper(featureWS.OpenTable(this._sumResults["table"].ToString())); this.SummaryTableGridView.DataSource = tableWrapper; // Create source. BitmapImage bi = new BitmapImage(); // BitmapImage.UriSource must be in a BeginInit/EndInit block. bi.BeginInit(); bi.UriSource = new Uri(this._sumResults["graph"].ToString(), UriKind.RelativeOrAbsolute); bi.EndInit(); // Set the image source. this.SummaryGraph.Width = bi.PixelWidth; this.SummaryGraph.Height = bi.PixelHeight; this.SummaryGraph.Source = bi; }
public AttrTableWindow(ITable attrTable) { InitializeComponent(); // Bind dataset to the binding source TableWrapper tableWrapper = new ArcDataBinding.TableWrapper(attrTable); //this.AttrTableGrid.ItemsSource = tableWrapper; //this.AttrTableGrid.Items.Refresh(); this.AttrTableGridView.DataSource = tableWrapper; }