Can't add a reference to namespace System.Windows.Controls

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Blau

    Can't add a reference to namespace System.Windows.Controls

    I'm trying to use the System.Windows. Controls namespace, but when I
    try to add a reference to it I don't see it in the list. I see a
    System.Windows. Forms, but not a System.Windows. Controls.

    Can someone let me know how I go about getting it in the list of
    available references?


    Thanks

    Jody
  • Peter Duniho

    #2
    Re: Can't add a reference to namespace System.Windows. Controls

    On Sun, 22 Jun 2008 12:46:17 -0700, Blau <jodyblau@gmail .comwrote:
    I'm trying to use the System.Windows. Controls namespace, but when I
    try to add a reference to it I don't see it in the list. I see a
    System.Windows. Forms, but not a System.Windows. Controls.
    >
    Can someone let me know how I go about getting it in the list of
    available references?
    Do you have .NET 3.0 installed and the appropriate SDK?
    System.Windows. Controls is part of WPF.

    Pete

    Comment

    • Blau

      #3
      Re: Can't add a reference to namespace System.Windows. Controls

      On Jun 22, 1:50 pm, "Peter Duniho" <NpOeStPe...@nn owslpianmk.com>
      wrote:
      On Sun, 22 Jun 2008 12:46:17 -0700, Blau <jodyb...@gmail .comwrote:
      I'm trying to use the System.Windows. Controls namespace, but when I
      try to add a reference to it I don't see it in the list.  I see a
      System.Windows. Forms, but not a System.Windows. Controls.
      >
      Can someone let me know how I go about getting it in the list of
      available references?
      >
      Do you have .NET 3.0 installed and the appropriate SDK?  
      System.Windows. Controls is part of WPF.
      >
      Pete
      I'm kind of new at this stuff, so i hope i'm giving you the info you
      requested. I have .NET 3.5 Installed. I installed a Windows SDK, but
      i'm not sure if this is the SDK you are refering to.

      Jody

      Comment

      • Blau

        #4
        Re: Can't add a reference to namespace System.Windows. Controls

        On Jun 22, 1:50 pm, "Peter Duniho" <NpOeStPe...@nn owslpianmk.com>
        wrote:
        On Sun, 22 Jun 2008 12:46:17 -0700, Blau <jodyb...@gmail .comwrote:
        I'm trying to use the System.Windows. Controls namespace, but when I
        try to add a reference to it I don't see it in the list.  I see a
        System.Windows. Forms, but not a System.Windows. Controls.
        >
        Can someone let me know how I go about getting it in the list of
        available references?
        >
        Do you have .NET 3.0 installed and the appropriate SDK?  
        System.Windows. Controls is part of WPF.
        >
        Pete
        I hope this isn't getting double posted (I thought i posted once, but
        it didn't seem to show up).
        I have .NET 3.5 installed, the only SDK's that I know that I have
        installed are DirectX and Windows.
        Is there a different SDK that I need?

        Thanks,

        Jody

        Comment

        • Blau

          #5
          Re: Can't add a reference to namespace System.Windows. Controls

          On Jun 22, 1:50 pm, "Peter Duniho" <NpOeStPe...@nn owslpianmk.com>
          wrote:
          On Sun, 22 Jun 2008 12:46:17 -0700, Blau <jodyb...@gmail .comwrote:
          I'm trying to use the System.Windows. Controls namespace, but when I
          try to add a reference to it I don't see it in the list.  I see a
          System.Windows. Forms, but not a System.Windows. Controls.
          >
          Can someone let me know how I go about getting it in the list of
          available references?
          >
          Do you have .NET 3.0 installed and the appropriate SDK?  
          System.Windows. Controls is part of WPF.
          >
          Pete
          I have .NET 3.5 installed. Which SDK do I need?

          Thanks,

          Jody

          Comment

          • Blau

            #6
            Re: Can't add a reference to namespace System.Windows. Controls

            On Jun 22, 2:06 pm, Blau <jodyb...@gmail .comwrote:
            On Jun 22, 1:50 pm, "Peter Duniho" <NpOeStPe...@nn owslpianmk.com>
            wrote:
            >
            On Sun, 22 Jun 2008 12:46:17 -0700, Blau <jodyb...@gmail .comwrote:
            I'm trying to use the System.Windows. Controls namespace, but when I
            try to add a reference to it I don't see it in the list.  I see a
            System.Windows. Forms, but not a System.Windows. Controls.
            >
            Can someone let me know how I go about getting it in the list of
            available references?
            >
            Do you have .NET 3.0 installed and the appropriate SDK?  
            System.Windows. Controls is part of WPF.
            >
            Pete
            >
            I hope this isn't getting double posted (I thought i posted once, but
            it didn't seem to show up).
            I have .NET 3.5 installed, the only SDK's that I know that I have
            installed are DirectX and Windows.
            Is there a different SDK that I need?
            >
            Thanks,
            >
            Jody
            ok, i've done some more research based upon the questions you asked.
            MSDN is telling me that I need Microsoft .NET Framework and the
            Windows Software Development Kit (SDK) installed. I believe that I
            have both installed.

            So how do I gain access to the WPF, in particular the
            System.Windows. Controls namespace within Vistual Studio 2005?

            Thanks,

            Jody

            Comment

            • Peter Duniho

              #7
              Re: Can't add a reference to namespace System.Windows. Controls

              On Sun, 22 Jun 2008 13:28:41 -0700, Blau <jodyblau@gmail .comwrote:
              ok, i've done some more research based upon the questions you asked.
              MSDN is telling me that I need Microsoft .NET Framework and the
              Windows Software Development Kit (SDK) installed. I believe that I
              have both installed.
              But which versions?

              You can't use just any random .NET and SDK. You have to have the ones
              that include WPF, which are those that support .NET 3.0 and later.
              So how do I gain access to the WPF, in particular the
              System.Windows. Controls namespace within Vistual Studio 2005?
              In VS2005, you'll need to install the SDK separately (VS2008 includes it,
              but the SDK that comes with VS2005 doesn't include .NET 3.0 support, since
              it predates that version of .NET). You can find the latest SDK that
              supports WPF here:


              Pete

              Comment

              • Blau

                #8
                Re: Can't add a reference to namespace System.Windows. Controls

                On Jun 22, 3:13 pm, "Peter Duniho" <NpOeStPe...@nn owslpianmk.com>
                wrote:
                On Sun, 22 Jun 2008 13:28:41 -0700, Blau <jodyb...@gmail .comwrote:
                ok, i've done some more research based upon the questions you asked.
                MSDN is telling me that I need Microsoft .NET Framework and the
                Windows Software Development Kit (SDK) installed.  I believe that I
                have both installed.
                >
                But which versions?
                >
                You can't use just any random .NET and SDK.  You have to have the ones  
                that include WPF, which are those that support .NET 3.0 and later.
                >
                So how do I gain access to the WPF, in particular the
                System.Windows. Controls namespace within Vistual Studio 2005?
                >
                In VS2005, you'll need to install the SDK separately (VS2008 includes it, 
                but the SDK that comes with VS2005 doesn't include .NET 3.0 support, since  
                it predates that version of .NET).  You can find the latest SDK that  
                supports WPF here:http://www.microsoft.com/downloads/d...D=e6e1c3df-a74...
                >
                Pete
                So I have .NET 3.5 installed. I also have the version of Windows SDK
                that you linked installed.
                So now that I have the .NET and Windows SDK installed, how do I make
                Visual Studio 2005 aware of them? I still can't seem to get the
                System.Windows. Controls namespace to appear when I try to add a
                reference.

                Thanks,

                Jody

                Comment

                • Peter Duniho

                  #9
                  Re: Can't add a reference to namespace System.Windows. Controls

                  On Sun, 22 Jun 2008 14:25:26 -0700, Blau <jodyblau@gmail .comwrote:
                  So I have .NET 3.5 installed. I also have the version of Windows SDK
                  that you linked installed.
                  So now that I have the .NET and Windows SDK installed, how do I make
                  Visual Studio 2005 aware of them? I still can't seem to get the
                  System.Windows. Controls namespace to appear when I try to add a
                  reference.
                  Okay, at this point we have -- assuming you are describing your situation
                  correctly -- determined that you have the necessary prerequisites.

                  So the next step is for you to be very clear about what it is exactly
                  you're doing, and what doesn't work about it. Describe the exact steps
                  you're taking, including the precise names of menu commands you're using,
                  etc. Tell us what you see and why that's different from what you expected
                  to see.

                  Pete

                  Comment

                  • Jon Skeet [C# MVP]

                    #10
                    Re: Can't add a reference to namespace System.Windows. Controls

                    Blau <jodyblau@gmail .comwrote:
                    I have .NET 3.5 installed. Which SDK do I need?
                    If you've got .NET 3.5 installed, that should be fine. Chances are you
                    just don't have the right project references. When you created the
                    project, what kind of project did you choose?

                    --
                    Jon Skeet - <skeet@pobox.co m>
                    Web site: http://www.pobox.com/~skeet
                    Blog: http://www.msmvps.com/jon_skeet
                    C# in Depth: http://csharpindepth.com

                    Comment

                    • Jon Skeet [C# MVP]

                      #11
                      Re: Can't add a reference to namespace System.Windows. Controls

                      Jon Skeet [C# MVP] <skeet@pobox.co mwrote:
                      Blau <jodyblau@gmail .comwrote:
                      I have .NET 3.5 installed. Which SDK do I need?
                      >
                      If you've got .NET 3.5 installed, that should be fine. Chances are you
                      just don't have the right project references. When you created the
                      project, what kind of project did you choose?
                      Apologies - I had assumed that if you'd installed .NET 3.5, you'd also
                      got Visual Studio 2008.

                      Is there any reason why you have to use VS 2005? It's all going to be
                      *much* easier with 2008...

                      --
                      Jon Skeet - <skeet@pobox.co m>
                      Web site: http://www.pobox.com/~skeet
                      Blog: http://www.msmvps.com/jon_skeet
                      C# in Depth: http://csharpindepth.com

                      Comment

                      • Blau

                        #12
                        Re: Can't add a reference to namespace System.Windows. Controls

                        On Jun 22, 3:31 pm, Jon Skeet [C# MVP] <sk...@pobox.co mwrote:
                        Jon Skeet [C# MVP] <sk...@pobox.co mwrote:
                        >
                        Blau <jodyb...@gmail .comwrote:
                        I have .NET 3.5 installed.  Which SDK do I need?
                        >
                        If you've got .NET 3.5 installed, that should be fine. Chances are you
                        just don't have the right project references. When you created the
                        project, what kind of project did you choose?
                        >
                        Apologies - I had assumed that if you'd installed .NET 3.5, you'd also
                        got Visual Studio 2008.
                        >
                        Is there any reason why you have to use VS 2005? It's all going to be
                        *much* easier with 2008...
                        >
                        --
                        Jon Skeet - <sk...@pobox.co m>
                        Web site:http://www.pobox.com/~skeet 
                        Blog:http://www.msmvps.com/jon_skeet
                        C# in Depth:http://csharpindepth.com
                        Ya, i'm trying to use the XNA stuff from microsoft, and XNA 2.0
                        doesn't support 2008; So that is why i've been trying to figure it out
                        for 2005

                        Thanks,

                        Jody

                        Comment

                        • Blau

                          #13
                          Re: Can't add a reference to namespace System.Windows. Controls

                          On Jun 22, 3:36 pm, Blau <jodyb...@gmail .comwrote:
                          On Jun 22, 3:31 pm, Jon Skeet [C# MVP] <sk...@pobox.co mwrote:
                          >
                          >
                          >
                          >
                          >
                          Jon Skeet [C# MVP] <sk...@pobox.co mwrote:
                          >
                          Blau <jodyb...@gmail .comwrote:
                          I have .NET 3.5 installed.  Which SDK do I need?
                          >
                          If you've got .NET 3.5 installed, that should be fine. Chances are you
                          just don't have the right project references. When you created the
                          project, what kind of project did you choose?
                          >
                          Apologies - I had assumed that if you'd installed .NET 3.5, you'd also
                          got Visual Studio 2008.
                          >
                          Is there any reason why you have to use VS 2005? It's all going to be
                          *much* easier with 2008...
                          >
                          --
                          Jon Skeet - <sk...@pobox.co m>
                          Web site:http://www.pobox.com/~skeet 
                          Blog:http://www.msmvps.com/jon_skeet
                          C# in Depth:http://csharpindepth.com
                          >
                          Ya, i'm trying to use the XNA stuff from microsoft, and XNA 2.0
                          doesn't support 2008; So that is why i've been trying to figure it out
                          for 2005
                          >
                          Thanks,
                          >
                          Jody- Hide quoted text -
                          >
                          - Show quoted text -
                          So when I create a project, I create a windows game 2.0 project using
                          XNA 2.0 in Visual Studio 2005.
                          I'm trying to learn how to create buttons and other controls within
                          the game application. One reference book that I have wants me to
                          create a "canvas" on which to draw my controls; but I noticed a
                          reference to a Canvas on MSDN that is contained within
                          System.Windows. Controls; So I thought I would see if it was possible
                          for me to use the Canvas in that Namespace, rather than create my own.

                          So i rightclick on the project references and go to add a reference.
                          It brings up a list of .net references, but they are all 2.0
                          references and so the namespace I want isn't there. How do I make
                          visual Studio 2005 look for .net 3.0 or 3.5 references?

                          thanks,

                          Jody

                          Comment

                          • Peter Duniho

                            #14
                            Re: Can't add a reference to namespace System.Windows. Controls

                            On Sun, 22 Jun 2008 14:43:57 -0700, Blau <jodyblau@gmail .comwrote:
                            [...]
                            I'm trying to learn how to create buttons and other controls within
                            the game application. One reference book that I have wants me to
                            create a "canvas" on which to draw my controls; but I noticed a
                            reference to a Canvas on MSDN that is contained within
                            System.Windows. Controls; So I thought I would see if it was possible
                            for me to use the Canvas in that Namespace, rather than create my own.
                            You can only use the Canvas class from WPF if that's the exact class that
                            the book had in mind. Otherwise, the fact that the book is using the name
                            "Canvas" for the class is an unfortunate coincidence, and has nothing to
                            do with using the WPF class.

                            That said...
                            So i rightclick on the project references and go to add a reference.
                            It brings up a list of .net references, but they are all 2.0
                            references and so the namespace I want isn't there.
                            What do you mean "they are all 2.0 references"? Even if you don't have
                            the .NET 3.0 SDK installed, you should see libraries other than 2.0. But
                            regardless, it's not the version of the reference that you really should
                            care about.

                            As the MSDN docs say, the Canvas class (and other WPF classes) are found
                            in the PresentationFra mework library. So as long as you find that library
                            in the "Add Reference" dialog, that should be fine (my guess is that it'll
                            show "3.0.0.0" as the version, but even if one day that changes, the
                            important part will be using the correct library).
                            How do I make
                            visual Studio 2005 look for .net 3.0 or 3.5 references?
                            If you have the SDK correctly installed, there's nothing else for you to
                            do. If you don't, then you need to install the SDK correctly before the
                            PresentationFra mework library will appear in the "Add Reference" dialog.

                            Pete

                            Comment

                            • Jon Skeet [C# MVP]

                              #15
                              Re: Can't add a reference to namespace System.Windows. Controls

                              Blau <jodyblau@gmail .comwrote:
                              So when I create a project, I create a windows game 2.0 project using
                              XNA 2.0 in Visual Studio 2005.
                              I'm trying to learn how to create buttons and other controls within
                              the game application. One reference book that I have wants me to
                              create a "canvas" on which to draw my controls; but I noticed a
                              reference to a Canvas on MSDN that is contained within
                              System.Windows. Controls; So I thought I would see if it was possible
                              for me to use the Canvas in that Namespace, rather than create my own.
                              Not a good idea. Trying to use one GUI framework within a completely
                              different one is rarely going to work. I suggest you stick to the XNA
                              classes.

                              --
                              Jon Skeet - <skeet@pobox.co m>
                              Web site: http://www.pobox.com/~skeet
                              Blog: http://www.msmvps.com/jon_skeet
                              C# in Depth: http://csharpindepth.com

                              Comment

                              Working...