MVVM DESIGN PATTERN - wpf

Am very much new to this MVVM DESIGN PATTERN.Am doing a small project in this pattern
In my project i have a button,if i click on that button it will create a new button at run time and we can create any number of buttons there.
Creating mutliple buttons is working and now am trying to move that controls at runtime where ever we want in the same window only.
I implemented some methods and now controls are moving with my mouse point as i want but now what is the problem is::
if one button is created it is moving fine when the second button is created
then it is coming attached to the first button now both the buttons are moving together and third and so on..
i cant able to understand whats happening over there?
Can Any one help me plz ??
Thanks In Advance
i dont know how to post code over here
if anyone give me your mail id then i wil send whole project to them
ThanQ Once Again

You might be interested in Laurent Bugnion's "Understanding the Model-View-ViewModel Pattern" session at MIX10 http://channel9.msdn.com/Events/MIX/MIX10/EX14

Related

Create a Navigation Menu in MvvmCross WPF

It's almost a week I've been trying to find a way to implement a Navigation Menu in WPF using MvvmCross 7 with no success. I had no luck even doing a research with similar solution, my impression is MvvmCross is mainly used with Xamarin and that WPF is not used at all. At this point I'm suffering a deep loneliness.
The idea is simple: show a view inside a main view in order to change it dinamically. The main view is the menu with all the buttons and the child view is the content of the button pressed.
I' ve been able to achive it using this https://www.codeproject.com/Articles/5275552/WPF-Compact-Navigation-Menu but I won't feel good until a find the correct way using MvvmCross.
Can you give me a starting point or some hints?

Windows 8 like modal dialog using WPF

I am working on a WPF-MVVM (.Net 4.0) application that has a Metro look (it just has a look, it is not a metro application.)
I need to show a windows 8 like message box that blocks the operations for the user before he rids that message box by clicking yes/no/cancel (or any button.).
I came across this otherwise great article and momentarily thought that I have found the solution. But this has its own drawback.It just stops the user from interacting with the controls behind by mouse clicks. The user can however use the tab key to get back to the buttons behind and click them (pressing enter).
A number of things are coming to my mind:
should I go for custom adorners and play with hitTestable property?
Or should I place a control and play with its visible property.
Before going for any approach I thought of putting forward my question to the wonderful community here if someone has done a similar thing in past and provide me some pointer/reference/approach.
Can someone suggest what is the way to achieve this? Please note I will be happy to use prism or any other open source if that solves the purpose but the window will have to be custom made.
Please excuse me if you find this too stupid a question. Please pardon my ignorance. Thanks for reading this.
I recently came across a similar problem, I resolved it using a DialogPresenter as explained there:
http://www.codeproject.com/Articles/36516/WPF-Modal-Dialog
I had to do a few tweaks there and there but overall it's working fine and I now have a nice way to display dialog boxes!
There is a better way of doing it
var dialog = new MessageDialog("Select Social network is already authorised!");
dialog.ShowAsync();

What is the difference between "Window" and "page" in silverlight

What is the difference between "Window" and "page" in silverlight? If I want to embed a page/ window inside another page/ window. How can I do that? For example, when an "Expand" button is clicked, if I dont want it to link to a totally new page, instead, I just want it to show a form embedded in the page / window.
Thanks :)
The simplest solution to this question would be to handle the click event and set the visibility property on the elements you want to show/hide in the event handler.
The link that #Robert provided is about "navigation" in silverlight, you can achieve your end goal using it and if you're planing a large application i'd say it's definately something you should look at but it'is a fairly complex subject.
Depending on your current level of silverlight knowledge and the scale of what you're trying to achieve with your silverlight application it might or might be better to take the simpler button click approach.
Take a look at this article. I think it will help you achive what you're trying to do.
http://jesseliberty.com/2008/05/31/multi-page-applications-in-silverlight/

Question about changing dialog box layout

Hey, I just got started designing dialog boxes and windows forms, and I had a basic question.
When you use something like a windows installer, it has a next button, and when you click it the dialog completely changes layout in moving on to the next step. My question is, is this done by loading a completely new dialog box and getting rid of the previous one. Or is there some way of making a dialog with multiple pages/states (not sure what to call them).
Thanks in advance for any help.
Wizards are usually made using the property sheet control from the Common Controls library. They do not create a new dialog, but use something similar to tab pages instead.

How would I create a silverlight control for tagging content similar to StackOverflow?

I am new to Silverlight. How would I go about creating a control for users to tag content.
I would like it to work like it does it StackOverflow i.e. Autocomplete and when you press space it inserts the tag in a box with a remove button. I want the control to be bindable to a collection of strings.
If someone can just point me in the right direction to get me started I would be very grateful.
You need to start with an AutoComplete Textbox, there is already one available in the Silverlight Toolkit. Tim Heuer has several examples using it (he actually creates one himself in one of his posts somewhere), you can find one sample here. Once you have this in place, the rest of the control is pretty simple.

Resources