public ConfigureSampleDataDialog(DataSchemaNodePath schemaPath, IMessageDisplayService messageService)
        {
            this.Title      = StringTable.SampleDataConfigurationDialogTitle;
            this.MinWidth   = ConfigureSampleDataDialog.dialogSize.Width;
            this.MinHeight  = ConfigureSampleDataDialog.dialogSize.Height;
            this.Height     = ConfigureSampleDataDialog.dialogSize.Height;
            this.Width      = ConfigureSampleDataDialog.dialogSize.Width;
            this.ResizeMode = ResizeMode.CanResize;
            this.Model      = new SampleDataEditorModel(schemaPath, messageService);
            FrameworkElement element = Microsoft.Expression.DesignSurface.FileTable.GetElement("Resources\\DataPane\\ConfigureSampleDataDialog.xaml");

            this.DialogContent            = (UIElement)element;
            this.sampleDataGrid           = (DataGrid)LogicalTreeHelper.FindLogicalNode((DependencyObject)element, "SampleDataGrid");
            this.rowsSlider               = (NumberEditor)LogicalTreeHelper.FindLogicalNode((DependencyObject)element, "RowsSlider");
            this.acceptButton             = (Button)LogicalTreeHelper.FindLogicalNode((DependencyObject)element, "AcceptButton");
            this.rowsSlider.KeyDown      += new KeyEventHandler(this.HandleEnterPressOnRowsSlider);
            this.sampleDataGrid.GotFocus += new RoutedEventHandler(this.sampleDataGrid_GotFocus);
            if (this.sampleDataGrid != null)
            {
                this.Columns = (IList <SampleDataDialogColumn>) new List <SampleDataDialogColumn>();
                foreach (SampleDataProperty property in (IEnumerable <SampleDataProperty>) this.Model.SampleDataProperties)
                {
                    SampleDataDialogColumn column = new SampleDataDialogColumn(property, this);
                    this.Columns.Add(column);
                    this.StyleColumnHeader(column);
                    this.sampleDataGrid.Columns.Add((DataGridColumn)column);
                }
            }
            element.DataContext = (object)this.Model;
        }
        private void StyleColumnHeader(SampleDataDialogColumn column)
        {
            FrameworkElement frameworkElement = (FrameworkElement)this.sampleDataGrid.Resources[(object)"ColumnHeaderPrototype"];

            AutomationElement.SetId((DependencyObject)frameworkElement, "ColumnHeader_" + column.Name);
            frameworkElement.DataContext = (object)column;
            column.Header = (object)frameworkElement;
            column.Width  = (DataGridLength)150.0;
        }
 public ValueEditorDialogCallback(SampleDataDialogColumn column)
 {
     this.column = column;
 }
 public SampleDataConfigurationPopup(SampleDataDialogColumn column)
     : base((IPopupControlCallback) new SampleDataConfigurationPopup.ValueEditorDialogCallback(column), ConfigurationPlaceholder.Type)
 {
 }