I am in phase of learning wpf/mvvm as per i get to know in vm we declare commands and bind them to view element\'s event rather doing this in codebehind file... what i am not ge
var v=(viewclassname)this.getview();
then you can access the element in the view
Your ViewModels won't access the elements in the View directly. The concept is that the View will bind to the ViewModel, and not the other way around. So; your ViewModel will tell the View what to display through values set in properties. If your View needs to display something it will have a databinding to the property giving this.
The commands will be held by a ViewModel, and you can bind them too directly. If you need the command to update values for the View this can be done by holding a reference from the command to the necessary ViewModel. (The ViewModel holding the Command can e.g. inject itself to the command on creation). Then the command can tell the ViewModel to update something, and this will be reflected in the View through data bindings.
For general introduction to the MVVM pattern you can check out this question which was asked a few days ago: Learning MVVM for WPF.