Drag an Drop and Cursors

I have three lists, each one filled with xml data through an arraycollection.
Below those lists i have a datagrid. People can drag items from those lists to the datagrid.
The datagrid consists of three columns: Product, Price and Pieces.
When people drag the same item from those lists i want to count them and show the result in the third column
of the datagrid.
I tried to use a cursor to count the same items and show the result in the third column of the datagrid, but i don't know
behind which event i have to put this function:
private  
function aantalpizza():void{ 
cursor = acaantal.createCursor();
var pizzaobject:Object = {item:mypizzas.selectedItem.item}; 
if(cursor.findAny(pizzaobject)){
cursor.current.aantal ++
elsemypizzas.selectedItem.aantal = 1;
Does anyone have an idea?

i tried the following code:
private  
function aantalpizza(ev:DragEvent):void{ 
cursor =
acaantal.createCursor(); 
var pizzaobject:Object = {item:mypizzas.selectedItem.item}; 
if(cursor.findAny(pizzaobject)){
cursor.current.aantal ++
elsemypizzas.selectedItem.aantal = 1;
<mx:DataGrid  dragComplete="aantalpizza(event)" dataProvider="{acaantal}" id="dgbestelling" dropEnabled="true">
 <mx:columns>
 <mx:DataGridColumn dataField="item" headerText="Artikel" resizable="false" width="150"/>
 <mx:DataGridColumn dataField="prijs" headerText="Prijs"/>
 <mx:DataGridColumn dataField="aantal" headerText="Aantal"/>
 </mx:columns>
 </mx:DataGrid>
it didn't work, i need the datafield "aantal" to update if the same item is being dragged to the datagrid
==> "aantal" means quantity, so if the same item is being dragged , it needs to count the quantity.

Similar Messages

  • No drag 'n drop from itunes to finder

    I see a lot of quenstions about drag and drop in itunes, or from finder to itunes, but when I want to copy something out of itunes to a thumb drive, it doesn't work.
    at first I can drag n drop and it start copying, but at one moment, it just won't copy. When I hover over the finder screen with my load of songs, they won't stick. for a brief moment it worked again after a restart of my macbook, but this was one time only. Then it wasn't possible again.
    Anybody with the same problem or maybe a solution?

    http://www.apple.com/feedback/itunesapp.html
    This of course presumes it's Apple's problem to correct, and not a design change with Toast. Meanwhile, Toast (at least Toast 10) provides the Media Browser with which to select from your iTunes library.
    I also presume that you're only giving your friends tracks that are in the public domain or of which they already own legal copies, yes?

  • NAS drive won't allow drag/n/drop in 10.5, will in 10.4 though....

    I am running OSX 10.5.8 on my imac and have just installed a macally nas drive. The drive works perfectly on our pc running vista, and my older macs running osx 10.4.8 and 10.3, but on my imac (10.5.8) I can't drag'n'drop or save files that I open on the network drive (it says I don't have sufficient privileges). Macally says it's a problem with OSX 10.5+ (they say the only way to successfully do it is to use FTP!) but I know the lacie nas works with 10.5+ so what gives?
    Can anyone tell me how I can get the NAS drive/mac to play nicely together and allow me to drag'n'drop and save files I've opened on the nas?

    First off, software can not cause hardware to fail.
    Lower RAM slot failure is a common issue not because of software issues, but rather because memory is unaware of bus slewing issues with energy saver power requirements. Secondly, the lower RAM slot of these machines was extremely hard to properly align the RAM right in the slot, making it easy to misplace the RAM during the installation process, thus short or damage teh slot. See my FAQ on bad RAM*:
    http://www.macmaps.com/badram.html
    You should be able to open the drive, and insert it inside another inexpensive hard drive case that is known to be compatible such as those by http://www.macsales.com/
    Unfortunately, recently LaCie has had some hard drive interface converters which have not caught up with spec changes in the operating system, meaning their external drives sometimes need a firmware update. The only company that has been able to consistently avoid firmware updates is http://www.macsales.com/ This problem has plagued Firewire hard drives since the release of 10.3, and possibly earlier at as mentioned on my FAQ*:
    http://www.macmaps.com/firewirebug2.html
    If inserting the drive in another case does not solve issues, Prosoft Data Rescue, Subrosasoft Filesalvage, or Boomerang's Boomerang and a second drive at least as large as the one to be recovered can sometimes extract information from a flakey hard drive. In event that doesn't work, then data recovery specialist is the only option.
    In the future always backup your data and never let there be less than two copies of your data at anytime*:
    http://www.macmaps.com/backup.html
    - * Links to my pages may give me compensation.

  • Can't drag n drop songs.  Can't reorder playlists.

    I can no longer drag n drop songs into playlists, nor can I reorder my playlists.  I've checked forums online and the common solutions are:
    1. make sure your playlists or not smart playlists.  
    and
    2. click the numbers column and make sure shuffle is off.
    The playlists I'm trying to affect are definitely not smart playlists.  And, Shuffle is definitely off.  I've tried everything I can think of.  I cannot drag songs to reorder a playlist. And I cannot even drag a song from my library into a playlist.  I have to right click the song, and then click Add to Playlist and Choose the Playlist from the popup menu,  which is very frustrating, especially considering I've had iTunes for years and could always drag n drop and reorder.  What happened?  Please help.

    I'm having the exact same issue on my iMac after updating to 10.5. The first issue was getting the message "iTunes Library.itl cannot be read because it was created by a newer version of iTunes. I googled the solution below and it got my library back.
    ====
    "Go to C:\Users\(your username)\Music\iTunes and rename the file iTunes Library.itl to iTunes Library.OLD
    ..... then Open iTunes, go to "Help" --> "Check For Updates". Once you update iTunes, go back to "C:\Users\(your username)\Music\iTunes" rename newly created "iTunes Library.itl" to "iTunes Library.NEW" and your old file, "iTunes Library.OLD" rename back to "iTunes Library.itl". You will be able to open your iTunes and all Libraries with in."
    ====
    I thought I was in the clear until I tried making a new playlist today. Discovered that I can't drag and drop songs anymore. Have to right click on each song individually to Add to Playlist. Ugh! Any help would be greatly appreciated.

  • Strange UI sticking issue with drag/drop and JList

    Hi all,
    I have implemented drag/drop between a jtree and jlist. The jtree can accept drops from the jtree (nodes to other parent nodes) and from the jlist. The jlist can accept nodes of the tree being dropped on it.
    Let me say this much, it all works. Works fine and great. BUT, the purpose of my post is I am seeing a very strange and not easily reproducible problem.
    I should first say that after a successful drop, the list removes the selected items. I do support drag/drop for multiple items.
    When I drag items from the list to the tree, reasonbly normal (not too fast), everything seems to work every time. But if I drag an item quickly from the list to the tree, for some reason after the items are removed from the list, another item is selected, sometimes NOT in the place of where the item(s) were selected. Infact, when I drag quickly, I notice the selection changes in the list itself. I only accept tree objects being dropped in the list, so there is no ability to drag/drop list items onto itself, and thus if I drag a list item around the list normally, nothing changes..the item I am dragging stays selected and the cursor shows the drag arrow.
    So this problem seems seems odd. I can reproduce it fairly easily, but only when I click and drag quickly.
    Anyone have ideas? I don't see where in my list code that as I drag, when drop is done, etc that I select anything in the list. I have tried JDK 1.4.1 and 1.4.2 and it does it in both. I don't see a bug in the bug database for it, and I am not sure its a bug in the JVM or my own code!
    Any help is appreciated. Can't really post code as its a large set of code and it is dependent on our company project, so it would take some time to take the code out into its own app to test it again.

    Hi,
    +" Please note that dropSite==null is a legal value for collection components. dropSite=null and DropOrientation==ON indicates that the drop has happened outside the data portion of the collection component and should be treated as a drop on the entire component Also note that dropSite==null and DropOrientation==AFTER indicates that the drop has happened on an empty collection component and the user intends to append the data."+
    http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10684/oracle/adf/view/rich/event/DropEvent.html#getDropSite__
    List dropRowKey = (List) dropEvent.getDropSite();
            //if no dropsite then drop area was not a data area
            if(dropRowKey == null){
                return DnDAction.NONE;
            }Frank
    Edited by: Frank Nimphius on Feb 18, 2011 11:18 PM

  • Drag and Drop and Image Size

    I need to be able to drag and drop images but I need them to be a certain size when I drag them out of an Aperture project. For various reasons, I don't want to use the export function. Only drag and drop will be efficient for the workflow that I"m planning. Problem is, the pixel dimension is not wide enough when I test it by pulling an image on to the desktop.
    My ultimate goal is drag them, sized and ready to go, and drop them onto a web browser upload page. I don't want to fumble with the extra steps of exporting them to another folder on the desktop and then upload the images from that folder to the browser.
    So does anybody know how or if it's possible to control the drag and drop SIZE /DIMENSION of an image?

    The drag and drop size is determined by your preview settings. What actually gets "dragged & dropped" is the preview, not the master file. You can control the quality and size of the preview in the Aperture preferences.

  • Can i make a book in iPhoto without using any of the built in layout templates, which are too limiting when i have already cropped my pictures to show just what I want. Ideally I just want to drag and drop and arrange and size the pictures myself

    Can i make a book in iPhoto without using any of the built in layout templates, which are too limiting when i have already cropped my pictures to show just what I want. Ideally I just want to drag and drop and arrange and size the pictures myself

    If you have Pages you can create customs pages for your book as TD suggested. If you have Pages from iWork 09 or 11 this app will add 80 or so additional frames to those offered:  Frames and Strokes Installer. Don't use it on the latest Pages version, however.
    This tutorial shows how to create a custom page with the theme's background: iP11 - Creating a Custom Page, with the Theme's Background for an iPhoto Book.  Once the page is complete to get it into iPhoto as a jpeg file follow these steps:
    Here's how to get any file into iPhoto as a jpeg file:
    1 - open the file in any application that will open it.
    2 - type Command+P to start the print process.
    3  - click on the PDF button and select "Save PDF to iPhoto".
    NOTE:  If you don't have any of those options go to Toad's Cellar and download these two files:
    Save PDF to iPhoto 200 DPI.workflow.zip
    Save PDF to iPhoto 300 DPI.workflow.zip
    Unzip the files and place in the HD/Library/PDF Services folder and reboot.
    4 - select either of the files above (300 dip is used for photos to be included in a book that will be ordered).
    5 - in the window that comes up enter an album name or select an existing album and hit the Continue button.
    That will create a 200 or 300 dpi jpeg file of the item being printed and import it into iPhoto. For books to be printed choose 300 dpi.

  • The computer that I original used with my ipod touch is dead, so I am now synching and backing up to a new computer.  I had to restore the software to this ipod.  I can drop and drag my tunes back into the ipod, but not my apps.

    The computer that I originally used with my ipod touch is dead, so I am now synching with another computer.  I had to restore the software of the ipod, I am able to drop and drag my tunes back to the ipod but not my purchased apps.  I have no problem doing this with other ipods that I have synced and backed up to this computer.

    Start here:
    iPhone, iPad, or iPod touch: Device not recognized in iTunes for Windows

  • Problem with Drag & Drop and multiselection in tables

    Hi,
    we have a problem concerning drag and drop and multiselection in tables. It is not possible to drag a multiselection of table rows, as the selection event is recognized or handled before the drag event. So before the drag starts, the selection will be changed and only a single row is selected at the position where you started the drag with a mouse click.
    There was also a java bug with the id 4521075 regarding this problem a couple of years ago. See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4521075.
    This bug has been resolved but in our application we have not enabled drag by setting setDragEnabled(true) on the table as we have an own implementation of a DragSource (which is the table component), and a DragGestureRecognizer to control mimetype and data to be dragged.
    So my question is: Is there any solution for this case without calling setDragEnabled(true) on the table? Or is it possible to enable drag on the table and override some method where the drag recognition happens and the transferable object is created?
    Thanks,

    Thanks for reply,
    Steps to reproduce the problem:
    1) user clicks the ascending sorting icon in the table(the button get disabled after sorting the table).
    2) After sorting user drag and drop some row over another row.
    3) Now the table is no longer sorted.
    4) If user again wants to sort the table now, he cannot do it because the sorting button is still disabled.
    So I want the user to sort the table again, without refreshing the page
    Thanks and Regards,
    Tarun

  • This Nightly feedback, Steganos password Manager drop and drag functionality no longer works after last update.

    Cut and paste still works but the drop and drag so longer works.
    This for Nightly Beta 64 bit.

    I too have the problem: W7 64 bit. Drag and drop worked until yesterday when I "upgraded" to FF v 26.0 - I can no longer drag passwords etc from my password manager to website fields - a barred circle appears when I try to drag.
    I tried pressing ESC (one profferred solution) and also reset FF to no avail.
    This is more than annoying: some of my passwords are dozens of characters long and there's no way I can access sites by typing them in! I need a solution, even if it's reverting to a previous version.

  • Help needed in Drag and Drop and  resizing of image icons

    Hi all,
    I'm doing a project on Drag and Drop and resizing of image icons.
    There is one DragContainer in which i have loaded the image icons and i want to drop these image icons on to the DropContainer.
    After Dropping these icons on to the DropContainer i need to resize them.
    I have used the Rectangle object in resizing.
    The problem now i'm facing is when i drag, drop and resize an image icon and when i try to drag, drop a second image icon the first image icon gets erased.
    can any one help me in fixing this error.
    if u want i can provide the source code.
    thanks in advance
    murali

    the major restrictions in its implemented only in
    jdk1.1.Why!

  • I would like to copy my iPhoto (9.4.1) library from my Mac Pro (10.7.5) to a Macbook Pro (10.7.5). Can I drag the iPhoto Library to Air Drop and send them to the MacBook? Will that then be a usable iPhoto library on the Macbook?

    I would like to copy my iPhoto (9.4.1) library from my Mac Pro (10.7.5) to a Macbook Pro (10.7.5). Can I drag the iPhoto Library from the Pictures folder to Air Drop and send them to the MacBook? If I then move that to the Pictures folder on the MacBook will that then be a usable iPhoto library on the Macbook?

    It would be better if you could connect the two Macs via a hard wired LAN to copy the library from the Mac Pro to the MacBook.  Wireless connections can have momentary dropouts which could affect the reliable copying of files. 
    If you do go with Air Drop be sure to open and inspect the copied library closely to confirm it was a successulf copy.
    OT

  • Drag and Drop (and re-order) to ListBox binded to XML

    Would you please help me with this scenario:
    On stage, 2 listboxes and a textbox.
    1.The first listbox lists all the items available, the list is grouped by 'Type' and its source is a binded XML file (read only).
    2.The second listbox list all the items the user has dropped into from ListBox#1 and it should read from an XML at start-up and save to it on quitting.
    3.The textbox list the details of the currently selected item in ListBox#2
    My knowledge (and search on internet ) allowed me to achieve binding, grouping with an expander and perhaps the first step to drag item (to be verified)..but I'm
    stucked at dropping AND re-ordering items on ListBox#2..then saving to the XML!!
    Would you please help (even in c#..I'll try to do the translation) ? I join a graphic and the project file (with XML files inside) to help you help me! Thanks!!
    Download project
    The XAML
    <Window x:Class="MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
        xmlns:dat="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
        Title="MainWindow" Height="400" Width="525">
        <Grid>
            <Grid.Resources>
                <DataTemplate x:Key="Resource3">
                    <Label Content="{Binding XPath=Name}"/>
                </DataTemplate>
                <Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
                    <EventSetter Event="ListBoxItem.PreviewMouseLeftButtonDown" Handler="s_PreviewMouseLeftButtonDown" />
                </Style>
                <Style x:Key="ListBoxItemStyle2" TargetType="{x:Type ListBoxItem}">
                    <Setter Property="AllowDrop" Value="true"/>
                    <EventSetter Event="ListBoxItem.PreviewMouseLeftButtonDown" Handler="s_PreviewMouseLeftButtonDown" />
                    <EventSetter Event="ListBoxItem.Drop" Handler="listbox_Drop"/>
                </Style>
            </Grid.Resources>
            <Grid Name="Grid01">
                <Grid.Resources>
                    <CollectionViewSource x:Key="cvsSystems" Source="{Binding XPath=System}">
                        <CollectionViewSource.SortDescriptions>
                            <scm:SortDescription PropertyName="@Type"/>
                            <scm:SortDescription PropertyName="Name"/>
                        </CollectionViewSource.SortDescriptions>
                        <CollectionViewSource.GroupDescriptions>
                            <dat:PropertyGroupDescription  PropertyName="@Type"/>
                        </CollectionViewSource.GroupDescriptions>
                    </CollectionViewSource>
                </Grid.Resources>
                <ListBox ItemsSource="{Binding Source={StaticResource
    cvsSystems}}" ItemTemplate="{StaticResource Resource3}"
    SelectedValuePath="Name" IsSynchronizedWithCurrentItem="True"
    HorizontalAlignment="Left" x:Name="ListBox1" Width="160"
    ItemContainerStyle="{DynamicResource ListBoxItemStyle1}"
    Margin="0,0,0,0">
                    <ListBox.GroupStyle>
                        <GroupStyle>
                            <GroupStyle.ContainerStyle>
                                <Style TargetType="{x:Type GroupItem}">
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate>
                                                <Expander Header="{Binding Name}" IsExpanded="True">
                                                    <ItemsPresenter />
                                                </Expander>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </GroupStyle.ContainerStyle>
                        </GroupStyle>
                    </ListBox.GroupStyle>
                </ListBox>
            </Grid>
            <Grid Name="Grid02">
                <Grid.Resources>
                    <CollectionViewSource x:Key="cvsPreferences" Source="{Binding XPath=System}">
                        <CollectionViewSource.SortDescriptions>
                            <scm:SortDescription PropertyName="@Type"/>
                            <scm:SortDescription PropertyName="Name"/>
                        </CollectionViewSource.SortDescriptions>
                        <CollectionViewSource.GroupDescriptions>
                            <dat:PropertyGroupDescription  PropertyName="@Type"/>
                        </CollectionViewSource.GroupDescriptions>
                    </CollectionViewSource>
                </Grid.Resources>
                <ListBox ItemsSource="{Binding Source={StaticResource
    cvsPreferences}}" ItemTemplate="{StaticResource Resource3}"
    SelectedValuePath="Name" IsSynchronizedWithCurrentItem="True"
    HorizontalAlignment="Left" x:Name="ListBox2" Width="160"
    ItemContainerStyle="{DynamicResource ListBoxItemStyle2}"
    Margin="170,0,0,0"/>
                <Button Content="Save" Height="23"
    HorizontalAlignment="Left" Margin="385,320,0,0" Name="Button1"
    VerticalAlignment="Top" Width="75" />
            </Grid>
            <TextBox DataContext="{Binding SelectedItem,
    ElementName=ListBox2}" Text="{Binding
    UpdateSourceTrigger=PropertyChanged, XPath=Detail}" Margin="340,0,0,0"
    x:Name="TextBox1" HorizontalAlignment="Left" VerticalAlignment="Top"
    Width="160"/>
        </Grid>
    </Window>
    The VB code
    Imports System.IO
    Imports System.Xml
    Class MainWindow
        Dim sysdata As XmlDocument = New XmlDocument()
        Dim prefdata As XmlDocument = New XmlDocument()
        Dim systemdata As XmlDataProvider = New XmlDataProvider()
        Dim preferencedata As XmlDataProvider = New XmlDataProvider()
        Private Sub MainWindow_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded
            'Initialisation XML
            sysdata.Load(System.AppDomain.CurrentDomain.BaseDirectory & "Systems.xml")
            prefdata.Load(System.AppDomain.CurrentDomain.BaseDirectory & "Preferences.xml")
            systemdata.Document = sysdata
            preferencedata.Document = prefdata
            systemdata.XPath = "Systems"
            preferencedata.XPath = "Systems"
            Grid01.DataContext = systemdata
            Grid02.DataContext = preferencedata
        End Sub
        Private Sub s_PreviewMouseLeftButtonDown(ByVal sender As Object, ByVal e As MouseButtonEventArgs)
            If TypeOf sender Is ListBoxItem Then
                Dim draggedItem As ListBoxItem = TryCast(sender, ListBoxItem)
                DragDrop.DoDragDrop(draggedItem, draggedItem.DataContext, DragDropEffects.Copy)
                draggedItem.IsSelected = True
            End If
        End Sub
        Private Sub listbox_Drop(ByVal sender As Object, ByVal e As DragEventArgs)
        End Sub
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click
            preferencedata.Document.Save(System.AppDomain.CurrentDomain.BaseDirectory & "Preferences.xml")
        End Sub
    End Class

    Barry,
    Thank you very much for your reply...I've followed your advices, read the links you posted...and maked use of ObservableCollection.
    So, the listbox source is a CollectionViewSource whose source is an ObservableCOllection object.
    Unfortunately I'm still stucked at the drop part. (then there will be the save back to the xml file)
    I think that the drag part might be right !?
    Could someone please help ??
    XAML
    <Window x:Class="MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
    xmlns:dat="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
    xmlns:c="clr-namespace:WpfApplication1"
    Title="MainWindow" Height="400" Width="525">
    <Window.Resources>
    <c:NameList x:Key="NameListData"/>
    <c:PreferenceList x:Key="PreferenceListData"/>
    </Window.Resources>
    <Grid>
    <Grid.Resources>
    <Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
    <EventSetter Event="ListBoxItem.PreviewMouseLeftButtonDown" Handler="s_PreviewMouseLeftButtonDown" />
    </Style>
    <Style x:Key="ListBoxItemStyle2" TargetType="{x:Type ListBoxItem}">
    <Setter Property="AllowDrop" Value="true"/>
    <EventSetter Event="ListBoxItem.PreviewMouseLeftButtonDown" Handler="s_PreviewMouseLeftButtonDown" />
    <EventSetter Event="ListBoxItem.Drop" Handler="listbox_Drop"/>
    </Style>
    </Grid.Resources>
    <Grid Name="Grid01">
    <Grid.Resources>
    <CollectionViewSource x:Key="cvsSystems" Source="{StaticResource NameListData}">
    <CollectionViewSource.SortDescriptions>
    <scm:SortDescription PropertyName="Type"/>
    <scm:SortDescription PropertyName="Name"/>
    </CollectionViewSource.SortDescriptions>
    <CollectionViewSource.GroupDescriptions>
    <dat:PropertyGroupDescription PropertyName="Type"/>
    </CollectionViewSource.GroupDescriptions>
    </CollectionViewSource>
    </Grid.Resources>
    <ListBox ItemsSource="{Binding Source={StaticResource cvsSystems}}" DisplayMemberPath="Name" IsSynchronizedWithCurrentItem="True" HorizontalAlignment="Left" x:Name="ListBox1" Width="160" ItemContainerStyle="{DynamicResource ListBoxItemStyle1}" Margin="0,0,0,0">
    <ListBox.GroupStyle>
    <GroupStyle>
    <GroupStyle.ContainerStyle>
    <Style TargetType="{x:Type GroupItem}">
    <Setter Property="Template">
    <Setter.Value>
    <ControlTemplate>
    <Expander Header="{Binding Name}" IsExpanded="True">
    <ItemsPresenter />
    </Expander>
    </ControlTemplate>
    </Setter.Value>
    </Setter>
    </Style>
    </GroupStyle.ContainerStyle>
    </GroupStyle>
    </ListBox.GroupStyle>
    </ListBox>
    </Grid>
    <Grid Name="Grid02">
    <Grid.Resources>
    <CollectionViewSource x:Key="cvsPreferences" Source="{StaticResource PreferenceListData}">
    <CollectionViewSource.SortDescriptions>
    <scm:SortDescription PropertyName="Type"/>
    <scm:SortDescription PropertyName="Name"/>
    </CollectionViewSource.SortDescriptions>
    <CollectionViewSource.GroupDescriptions>
    <dat:PropertyGroupDescription PropertyName="Type"/>
    </CollectionViewSource.GroupDescriptions>
    </CollectionViewSource>
    </Grid.Resources>
    <ListBox ItemsSource="{Binding Source={StaticResource cvsPreferences}}" DisplayMemberPath="Name" IsSynchronizedWithCurrentItem="True" HorizontalAlignment="Left" x:Name="ListBox2" Width="160" ItemContainerStyle="{DynamicResource ListBoxItemStyle2}" Margin="170,0,0,0"/>
    <Button Content="Save" Height="23" HorizontalAlignment="Left" Margin="385,320,0,0" Name="Button1" VerticalAlignment="Top" Width="75" />
    </Grid>
    <!--<TextBox DataContext="{Binding SelectedItem, ElementName=ListBox2}" Text="{Binding UpdateSourceTrigger=PropertyChanged, XPath=Detail}" Margin="340,0,0,0" x:Name="TextBox1" HorizontalAlignment="Left" VerticalAlignment="Top" Width="160"/>-->
    </Grid>
    </Window>
    VB
    Imports System.Collections.ObjectModel
    Imports System.Xml
    Imports System.IO
    Class MainWindow
    Private Sub MainWindow_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded
    End Sub
    Private Sub s_PreviewMouseLeftButtonDown(ByVal sender As Object, ByVal e As MouseButtonEventArgs)
    If TypeOf sender Is ListBoxItem Then
    Dim draggedItem As ListBoxItem = TryCast(sender, ListBoxItem)
    DragDrop.DoDragDrop(draggedItem, draggedItem.DataContext, DragDropEffects.Copy)
    draggedItem.IsSelected = True
    End If
    End Sub
    Private Sub ListBox2_Drop(ByVal sender As System.Object, ByVal e As System.Windows.DragEventArgs) Handles ListBox2.Drop
    Dim _class As SystemName = DirectCast(e.Data.GetData(GetType(SystemName)), SystemName)
    If _class IsNot Nothing Then
    Dim lcv As ListCollectionView = DirectCast(ListBox2.ItemsSource, ListCollectionView) '?
    End If
    End Sub
    Private Sub listbox_Drop(ByVal sender As Object, ByVal e As DragEventArgs)
    End Sub
    End Class
    Public Class NameList
    Inherits ObservableCollection(Of SystemName)
    ' Methods
    Public Sub New()
    Dim sysdata As XmlDocument = New XmlDocument()
    sysdata.Load(System.AppDomain.CurrentDomain.BaseDirectory & "Systems.xml")
    Dim root As XmlElement = sysdata.DocumentElement
    Dim nodes As XmlNodeList = root.SelectNodes("System")
    For Each node As XmlNode In nodes
    Dim tyype As String = node.Attributes("Type").Value
    MyBase.Add(New SystemName(tyype, node("Name").InnerText, node("Detail").InnerText))
    Next
    End Sub
    End Class
    Public Class PreferenceList
    Inherits ObservableCollection(Of SystemName)
    ' Methods
    Public Sub New()
    Dim sysdata As XmlDocument = New XmlDocument()
    sysdata.Load(System.AppDomain.CurrentDomain.BaseDirectory & "Preferences.xml")
    Dim root As XmlElement = sysdata.DocumentElement
    Dim nodes As XmlNodeList = root.SelectNodes("System")
    For Each node As XmlNode In nodes
    Dim tyype As String = node.Attributes("Type").Value
    MyBase.Add(New SystemName(tyype, node("Name").InnerText, node("Detail").InnerText))
    Next
    End Sub
    End Class
    Public Class SystemName
    ' Fields
    Private _type As String
    Private _name As String
    Private _detail As String
    ' Methods
    Public Sub New(ByVal type As String, ByVal name As String, ByVal detail As String)
    Me._type = type
    Me._name = name
    Me._detail = detail
    End Sub
    ' Properties
    Public Property Type() As String
    Get
    Return Me._type
    End Get
    Set(ByVal value As String)
    Me._type = value
    End Set
    End Property
    Public Property Name() As String
    Get
    Return Me._name
    End Get
    Set(ByVal value As String)
    Me._name = value
    End Set
    End Property
    Public Property Detail() As String
    Get
    Return Me._detail
    End Get
    Set(ByVal value As String)
    Me._detail = value
    End Set
    End Property
    End Class
    'Systems.xml' file
    <?xml version="1.0" encoding="utf-8"?>
    <Systems>
    <System Type="TypeA">
    <Name>NameA1</Name>
    <Detail>This is the detail for NameA1</Detail>
    </System>
    <System Type="TypeB">
    <Name>NameB1</Name>
    <Detail>This is the detail for NameB1</Detail>
    </System>
    <System Type="TypeC">
    <Name>NameC1</Name>
    <Detail>This is the detail for NameC1</Detail>
    </System>
    <System Type="TypeA">
    <Name>NameA2</Name>
    <Detail>This is the detail for NameA2</Detail>
    </System>
    <System Type="TypeB">
    <Name>NameB2</Name>
    <Detail>This is the detail for NameB2</Detail>
    </System>
    <System Type="TypeC">
    <Name>NameC2</Name>
    <Detail>This is the detail for NameC2</Detail>
    </System>
    <System Type="TypeA">
    <Name>NameA3</Name>
    <Detail>This is the detail for NameA3</Detail>
    </System>
    <System Type="TypeB">
    <Name>NameB3</Name>
    <Detail>This is the detail for NameB3</Detail>
    </System>
    <System Type="TypeC">
    <Name>NameC3</Name>
    <Detail>This is the detail for NameC3</Detail>
    </System>
    </Systems>
    'Preferences.xml' file
    <?xml version="1.0" encoding="utf-8"?>
    <Systems>
    <System Type="TypeA">
    <Name>NameA1</Name>
    <Detail>This is the detail for NameA1</Detail>
    </System>
    <System Type="TypeC">
    <Name>NameC3</Name>
    <Detail>This is the detail for NameC3</Detail>
    </System>
    </Systems>

  • Hi could someone help me please ? Ive just bought the new ipad and want to put some movies on it. I have already converted some movies using handbrake and tried to transfer them to my ipad and it just wont work. ive tried drag and drop and everything

    Hi could someone help me please ? Ive just bought the new ipad and want to put some movies on it. I have already converted some movies using handbrake and tried to transfer them to my ipad and it just wont work. ive tried drag and drop and everything

    bluztoo wrote:
    Haven't really used any of them including VLC - actually use netflix on the ipad more than anything. I was able to drop an mp4 into imovie on my ipad and see it there. This was something I had shot as avhcd and converted with turbo.264. Played fine. Probably not what you want for a movie player though.
    Well, turbo.264 is indeed very nice to have - even for converting full-sized movies. (Nevertheless, TechRadar's latest roundup (see http://www.techradar.com/news/software/applications/6-of-the-best-video-converte rs-for-mac-1074303 ; also linked from another roundup at http://www.iphonelife.com/blog/87/benchmark-excellent-multimedia-converter-handb rake-vs-commercial-apps ) has shown it's still worse than HandBrake in most respects.)
    All H.264 files (assuming they are H.264 level 4.1 or lower) are compatible with the built-in Videos app.
    bluztoo wrote:
    Those of you who use other players, what do you reccomend? Just curious.
    It entirely depends on your needs. The top players (AVPlayerHD / ProPlayer, It's Playing, GoodPlayer) all have different strengths and weaknesses. I myself use It's Playing the most as I convert everything into MP4 and simply love the DSP's (brightness / volume / saturation boosting). (Its software decoders are definitely worse than those of AVPlayerHD / ProPlayer; however, MP4's are played back from hardware.)

  • Drag-n-Drop not working (Finder and within apps)

    while using machine, after about 15 minutes or so, Drag-n-Drop stops working....in Finder and within all apps. Cant' move files within Finder; can't highlight text and move it within an app, can't D-n-D photos; nothing
    it takes either a system restart, or logout of user, then log back in as user and D-n-D is restored.
    But, it works for about 15 minutes or so, again...then stops functioning.
    Happens repeatedly, doesn't matter what apps I'm using, or even using any apps at all...just power up machine....move a few files...let it sit for a while and do nothing, and then D-n-D stops working again.
    This is very annoying...and makes Leopard almost useless, since I can't manipulate anything with the mouse.
    HHHHEEELLLPPP!!!!!!

    I am having the same problem. Even restarting does not work, i am using a jail iphone 3gs, not sure if thats got anything to do with it?
    Anyone help, the only way i can get albums etc to add is to sync and that messing all kinds up.

Maybe you are looking for

  • Exporting Catalog Content in CCM 2.0

    Hello, I would like to know if it is possible to export the content of a catalog to Excel. In CCM 2.0 it seems to be that one can only export the structure of the catalog. Thanks for any answer, Aart

  • Excise Invoice Cancellation for No-Utilisation Series

    Hi, We are using Excise Series ( Configured with the Check for No-Utilisation). As per configuration, No Accounting document is being generated for Excise Invoice created using this Excise Series. But when we cancel these Excise Invoices, Accounting

  • How to determine if Terminated?

    Is there a way to determine if the sequence was terminated?  I have a step that needs to be run in the event the sequence was terminated. It's in the cleanup portion already and isn't to run in all cases so I am looking for a precondition that examin

  • Who uses Dreamweaver CS3 on Mac OS X?

    Howdy, I'm curious to know how many of you here use Dreamweaver CS3 on the Mac? Not bothered bout you Windows users, I've used it on there and it's fine (although bulky and slow). I made the switch to mac a long while back, and coming from Windows an

  • Mp830 canon navigator 2.2 no longer supported by power pc can't scan images onto iMac. Is this due to Lion upgrade?

    I can't find software to replace MP830 navigator which my computer won't support anymore. The navigator software was diabled just recently & I am wondering if it is due to installing the new Lion software for Mac...Can anyone help?