| re: Help with Windows Control Library (DataGrid)...
"Mohamoss" <mohamed.mossad@egdsc.microsoft.com> wrote in message news:$b7FvGPjEHA.3936@cpmsftngxa10.phx.gbl...[color=blue]
> Hi carl
> This is not normal . when you create a windows control library , a UI
> element is created by default for you . even if you didn't use it at all
> there will be something that is dragged to the form area when you use this
> control in a normal windows application . So , make sure that your datagrid
> in implemented as windows control library , does it inherit
> System.Windows.Forms.UserControl?[/color]
No. My custom datagrid inherits from System.Windows.Data.DataGrid. Here is the code snippet:
[ToolboxBitmap(typeof(DataGrid))]
public class CymiGrid : System.Windows.Forms.DataGrid
There are no references to UserControl (or UserControl1) anywhere in my code, and the following message is displayed when I switch to designer mode:
"To add components to your class drag them from Server Explorer or Toolbox and use the Properties window to set their properties. To create methods and events for your class, click here to switch to code view."
If I click anywhere on the blank (except for message) designer space, the Properties for my custom datagrid are displayed.
Thanks for any help or advice.
- carl |