locked
Creating data source from CLR-object. The class name doesn't show up. RRS feed

  • Question

  • I'm starting out with creating data sources in Blend. Now I've a CLR-object that I want to create a data source from but I can't get it to show up in the "Create Object Data Source" dialog. I see many of the classes that I've created in my project but not all of them and not the one that I want to use as data source. It doesn't matter if I rebuild my solution in VS. It still won't show up in the Data source dialog in blend.

    Why is it that not all CLR-object doesn't show up in Blend?

    (Blend 4 beta and VS2010)

    Thanks!

    Thursday, April 15, 2010 7:41 AM

All replies

  • Hello,

    You should ensure that your class owns a public default constructor,

    Regards,

    Roland Tomczak

    Thursday, April 15, 2010 2:04 PM
  • Thanks for your reply.

    Doesn't seem to help though...

    Friday, April 16, 2010 9:50 AM
  • Hi xkrja

    Roland Tomczak is right. But you have to make sure that one of your constructors doesn't have any parameters for example.

         Public Sub New() **** This one makes the class apear in the dialog window in blend. *****


          End Sub

          Public Sub New(ID As Integer, ProdGrpID As Integer, ProductCode As String, PartNo As String, ModelNo As String)
             Try
                _ID = ID
                _ProductCode = ProductCode
                _ProductGrpID = ProdGrpID
                _ManuPartNo = PartNo
                _ModelNo = ModelNo
             Catch ex As Exception
                Throw ex
             End Try
          End Sub

    Thursday, February 23, 2012 10:49 PM