I have list view with 4 instances there type string and I want to drag the data from the list view to the text box (and update the list view ),how can I do that?
this is the code for the main window
namespaceDragAndDrop{publicpartialclassMainWindow:Window{publicObservableCollection<User>_UsersList=newObservableCollection<User>();publicMainWindow(){_UsersList.Add(newUser{Name="Mike"});_UsersList.Add(newUser{Name="Jhon"});_UsersList.Add(newUser{Name="Lio"});_UsersList.Add(newUser{Name="Nick"});DataContext=this;InitializeComponent();}publicObservableCollection<User> userList{get{return_UsersList;}}}}
XAML
<Windowx:Class="DragAndDrop.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"Title="MainWindow"Height="350"Width="525"><Window.Resources></Window.Resources><Grid><ListViewHorizontalAlignment="Left"Height="115"Margin="100,75,0,0"VerticalAlignment="Top"Width="150"ItemsSource="{Binding userList }"></ListView><TextBoxHorizontalAlignment="Left"Height="23"Margin="351,75,0,0"TextWrapping="Wrap"Text=""VerticalAlignment="Top"Width="120"/><TextBoxHorizontalAlignment="Left"Height="23"Margin="351,117,0,0"TextWrapping="Wrap"Text=""VerticalAlignment="Top"Width="120"/><TextBoxHorizontalAlignment="Left"Height="23"Margin="351,164,0,0"TextWrapping="Wrap"Text=""VerticalAlignment="Top"Width="120"/><TextBoxHorizontalAlignment="Left"Height="23"Margin="351,217,0,0"TextWrapping="Wrap"Text=""VerticalAlignment="Top"Width="120"/><LabelContent="Name1"HorizontalAlignment="Left"Margin="275,75,0,0"VerticalAlignment="Top"/><LabelContent="Name2"HorizontalAlignment="Left"Margin="275,117,0,0"VerticalAlignment="Top"/><LabelContent="Name3"HorizontalAlignment="Left"Margin="275,164,0,0"VerticalAlignment="Top"/><LabelContent="Name4"HorizontalAlignment="Left"Margin="275,214,0,0"VerticalAlignment="Top"/></Grid></Window>