Click here to Skip to main content
15,887,214 members
Articles / Programming Languages / Visual Basic 10

Generic Multi-Select MVVM ListBox Drag and Drop Helper with Custom Feedback for Silverlight 4.0

Rate me:
Please Sign up or sign in to vote.
4.91/5 (3 votes)
11 Apr 2011CPOL9 min read 53.3K   981   13  
This article focuses on developing an MVVM compatible ListBox-to-ListBox drag/drop helper for Silverlight.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>
    </ProductVersion>
    <SchemaVersion>
    </SchemaVersion>
    <ProjectGuid>{14CBFBB0-B4A8-43E7-99F9-72C3DECEE594}</ProjectGuid>
    <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>
    <OutputType>Library</OutputType>
    <RootNamespace>ViewModels</RootNamespace>
    <AssemblyName>ViewModels</AssemblyName>
    <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
    <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
    <SilverlightApplication>false</SilverlightApplication>
    <ValidateXaml>true</ValidateXaml>
    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
  </PropertyGroup>
  <!-- This property group is only here to support building this project using the 
       MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs 
       to set the TargetFrameworkVersion to v3.5 -->
  <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <DefineDebug>true</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <NoStdLib>true</NoStdLib>
    <NoConfig>true</NoConfig>
    <MyType>Empty</MyType>
    <OutputPath>Bin\Debug</OutputPath>
    <DocumentationFile>ViewModels.xml</DocumentationFile>
    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
    <DefineConstants>SILVERLIGHT=1</DefineConstants>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <DefineDebug>false</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <NoStdLib>true</NoStdLib>
    <NoConfig>true</NoConfig>
    <Optimize>true</Optimize>
    <OutputPath>Bin\Release</OutputPath>
    <DocumentationFile>ViewModels.xml</DocumentationFile>
    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
    <DefineConstants>SILVERLIGHT=1</DefineConstants>
  </PropertyGroup>
  <PropertyGroup>
    <OptionExplicit>On</OptionExplicit>
  </PropertyGroup>
  <PropertyGroup>
    <OptionCompare>Binary</OptionCompare>
  </PropertyGroup>
  <PropertyGroup>
    <OptionStrict>Off</OptionStrict>
  </PropertyGroup>
  <PropertyGroup>
    <OptionInfer>On</OptionInfer>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="mscorlib" />
    <Reference Include="System.Windows" />
    <Reference Include="system" />
    <Reference Include="System.Core" />
    <Reference Include="System.Net" />
    <Reference Include="System.Windows.Interactivity, Version=4.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Windows.Browser" />
  </ItemGroup>
  <ItemGroup>
    <Import Include="Microsoft.VisualBasic" />
    <Import Include="System" />
    <Import Include="System.Linq" />
    <Import Include="System.Collections.Generic" />
    <Import Include="System.Net" />
    <Import Include="System.Xml" />
    <Import Include="System.Windows" />
    <Import Include="System.Windows.Controls" />
    <Import Include="System.Windows.Documents" />
    <Import Include="System.Windows.Ink" />
    <Import Include="System.Windows.Input" />
    <Import Include="System.Windows.Media" />
    <Import Include="System.Windows.Media.Animation" />
    <Import Include="System.Windows.Shapes" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="MainViewModel.vb" />
    <Compile Include="My Project\AssemblyInfo.vb" />
    <Compile Include="ViewModelLocator.vb" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\Helpers\Helpers.vbproj">
      <Project>{C827FD71-0AA5-4FB0-BC26-56389F77E2C0}</Project>
      <Name>Helpers</Name>
    </ProjectReference>
    <ProjectReference Include="..\ListDragDropSL\ListDragDropSL.vbproj">
      <Project>{90737888-2D5B-476E-B753-41295A00AFEC}</Project>
      <Name>ListDragDropSL</Name>
    </ProjectReference>
    <ProjectReference Include="..\Models\Models.vbproj">
      <Project>{6F9E3854-99BE-44DC-BD31-50E9C51DB71D}</Project>
      <Name>Models</Name>
    </ProjectReference>
    <ProjectReference Include="..\Services\Services.vbproj">
      <Project>{865EFB82-206A-41F6-BB8E-EB679D5704FD}</Project>
      <Name>Services</Name>
    </ProjectReference>
  </ItemGroup>
  <ItemGroup>
    <None Include="ClassDiagram.cd" />
  </ItemGroup>
  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.VisualBasic.targets" />
  <ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
        <SilverlightProjectProperties />
      </FlavorProperties>
    </VisualStudio>
  </ProjectExtensions>
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Technical Lead
Australia Australia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions