Results 1 to 6 of 6

Thread: Adding controls

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2009
    Posts
    448

    Adding controls

    I have just started messing with silverlight and am confused about one thing. Can you not drag and drop the silverlight controls to the form? I have created wpf browser applications which seem to be very similar but I am unable to drag and drop the controls. I can edit the XAML code and add a button but with wpf browser applications you can drag and drop and then edit the XAML code. Can someone clear this up for me? If you can, please explain how because i also do not get the properties list on the right when I add my own XAML code to the project but the button is showing up.
    If I helped you please rate me.

  2. #2
    Frenzied Member
    Join Date
    Jul 2008
    Location
    Rep of Ireland
    Posts
    1,380

    Re: Adding controls

    I imagine your using a vs 2008 variant of some description. From what I can see the designer in any 2008 product does not have support for dragging and droping. One the one hand this is an annoyance for obvious reasons but on the other hand it forces you to become comfortable with Xaml.

    You have two options if you what drag and drop...

    1: Download VS2010 here and use that while its in beta. (I use it and it seems to be fine).

    2: Purchase Expression Blend 3 here and use that (Amazing product but costly).

    Personally though I would recommend that you stay with vs 2008 and type the Xaml as it will help in the long run since you will know how to finely tune your Xaml as your applications get larger.

  3. #3
    Junior Member
    Join Date
    Apr 2008
    Posts
    21

    Re: Adding controls

    You can't even double click on a control to add "code Behind" I have not figured out how to do that. Do you know?

  4. #4
    Junior Member
    Join Date
    Apr 2008
    Posts
    21

    Re: Adding controls

    I found you have to type "Click" and then intellisense will come up and you select "Add New Event Handler". Then if you right clicl on "Click" it will allow you to go right to the handler.

  5. #5
    Frenzied Member
    Join Date
    Jul 2008
    Location
    Rep of Ireland
    Posts
    1,380

    Re: Adding controls

    Yes you are correct. When in the code window there are also two dropdown boxes above it. One for the object and the other for its events you can create an event handler from there.

  6. #6
    Frenzied Member MattP's Avatar
    Join Date
    Dec 2008
    Location
    WY
    Posts
    1,227

    Re: Adding controls

    Microsoft correctly decided that their design surface in Visual Studio 2008 was crap and made it read only. They'll be rectifying this situation in Visual Studio 2010 and it seems to work just fine there as DeanMc has stated.

    Since it hasn't been stated in the thread you can drag controls directly into your Xaml which can be very helpful in getting the base markup started and automatically adds missing xmlns entries. (It adds them to the beginning and doesn't put a line break in but that's easily fixed.)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width