locked
How to interract with a house plan RRS feed

  • Question

  • Dearl all,

    I have to build an application from which I display a house plan, representing rooms, living room, etc...
    from that application I need to interact with different part of the plan.

    For exmple :

    - if I click inside the Room 1 area I display information about that room
    - if I click inside the Living Room area I display information about the living room

    I can I define those different area, similar as hotspot when building web pahge for instance

    thnaks for help
    regards
    serge


    Your knowledge is enhanced by that of others.
    Thursday, February 24, 2011 4:17 PM

Answers

  • I was assuming some legend at the side showing the colours for the rooms.

    So Living room 1 could be pink, living room 2 could be red.

    I suggested it because in the past I've made irregular hotspots for web forms.  The years have dimmed the memory but I still recall it was a very painfull piece of code  to write.

    On the other hand, once you've got some kind of definition of a room's walls maybe drawing another layer thingummy over them wouldn't be so bad. 

    • Marked as answer by Min Zhu Monday, March 14, 2011 2:13 AM
    Friday, March 4, 2011 12:00 PM
  • Hi Serge Calderara,

    Thanks for posting.

    I think you can overlay a canvas on the house plan, and add transparent shapes to the canvas to act as hotspots.

    Please check out Shapes and Basic Drawing in WPF Overview for more information.

    Then you can handle MoveEnter and MoveLeave events to display information. You can also leverage WPF DataBinding and animation as well.

    If you still have any questions or concerns about this issue, please feel free to let me know.

    Have a nice day!


    Min Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Min Zhu Monday, March 14, 2011 2:13 AM
    Monday, February 28, 2011 8:46 AM

All replies

  • Hello Serge,

    Do you plan to design your rooms in 2D or 3D? Also, how far would you like your interactivity to go?


    Cornel Croitoriu - Senior Software Developer & Entrepreneur

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    CWS SoftwareBiz-Forward.comCroitoriu.NET

    Thursday, February 24, 2011 10:05 PM
  • Hi Serge Calderara,

    Thanks for posting.

    I think you can overlay a canvas on the house plan, and add transparent shapes to the canvas to act as hotspots.

    Please check out Shapes and Basic Drawing in WPF Overview for more information.

    Then you can handle MoveEnter and MoveLeave events to display information. You can also leverage WPF DataBinding and animation as well.

    If you still have any questions or concerns about this issue, please feel free to let me know.

    Have a nice day!


    Min Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Min Zhu Monday, March 14, 2011 2:13 AM
    Monday, February 28, 2011 8:46 AM
  • Maybe you could colour code the different rooms and work out the colour on the canvas where the user clicks.  Using the MouseLeftButtonUp event.

    Different colours would also make it easier to indicate which room is what.

    Monday, February 28, 2011 8:55 AM
  • Hi Serge Calderara,

    Just checking in to see if the information was helpful. Please let us know if you would like further assistance.

    Have a great day!


    Min Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, March 2, 2011 3:57 AM
  • Andy1599, what do you mean exactly, can you provide samples ?

    The house map can have different level also , so how can I move into level without going to 3D dev

    regards

    serge


    Your knowledge is enhanced by that of others.
    Wednesday, March 2, 2011 9:57 PM
  • I'm afraid I've not written such a programme myself.

    I would think you can find the co-ordinates for a mouse event and use those to find the colour at those co-ordinates.

    And I would think some control at the side of your plan which looks like a stylized house with 2 stories would be the obvious way to go. The user clicks on the top or the bottom level to select which floor they see in the plan.

    Thursday, March 3, 2011 9:57 AM
  • Hi Serge,

    I assumed you already have a house plan on your hand,i.e. a picture or something. So I suggested to overlay some Shape objects on the existing house plan to be the "hot spots". You can also add some highlight effects to those shapes or color them as well. If you are also creating the house plan, I would also suggest you to use Shape object which will allow you to well-leverage wpf features.

    I like Andy's suggestion about color coding the different rooms, but it has some limitations. For example, it doesn't make much sense to color two living rooms in two different colors, so it's hard to distinguish these two rooms. It cannot provide visual hint when you mouse over a room. Also, to ensure we can get the correct room by "finding color", it will bring much trouble if we want to add other stuffs to the house plan.

    I think color coding the rooms will be a nice additional feature but I think it's better not to depend on it to identify the rooms.

    Also, Andy's suggestion about stories sounds great.

    Please check the links in my last reply to get some ideas of these WPF features. It might let you know your options well.

    If you still have any questions or concerns about this issue, please feel free to let me know.


    Min Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, March 4, 2011 3:06 AM
  • I was assuming some legend at the side showing the colours for the rooms.

    So Living room 1 could be pink, living room 2 could be red.

    I suggested it because in the past I've made irregular hotspots for web forms.  The years have dimmed the memory but I still recall it was a very painfull piece of code  to write.

    On the other hand, once you've got some kind of definition of a room's walls maybe drawing another layer thingummy over them wouldn't be so bad. 

    • Marked as answer by Min Zhu Monday, March 14, 2011 2:13 AM
    Friday, March 4, 2011 12:00 PM
  • Hi Serge,

    We have not heard from you in a couple of days. 

    Please post back at your convenience if we can assist further.

    Enjoy your day!


    Min Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, March 8, 2011 3:06 AM
  • which Link of your last reply you try to point me out ?

    the All in one framework on codeplex ?


    Your knowledge is enhanced by that of others.
    Tuesday, March 8, 2011 12:39 PM
  • Hi Serge Calderara,

    Take a look at these links if you haven't done so.

    Shapes and Basic Drawing in WPF Overview

    WPF DataBinding

    animation

    If you still have any questions or concerns about this issue, please feel free to let me know.
    Min Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, March 9, 2011 2:16 AM