Click here to Skip to main content
15,881,789 members
Articles / Desktop Programming / WPF

Introduction to Composite WPF (CAL, Prism): Part 2

Rate me:
Please Sign up or sign in to vote.
5.00/5 (16 votes)
19 Jul 2009CPOL17 min read 72.4K   1.5K   53  
An article showing an extremely simple implementation of CompositeWPF.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>9.0.30729</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{294AE28F-125C-4C76-8E10-5278D4E39BEE}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>JamSoft.CALDemo.Modules.MusicSearch</RootNamespace>
    <AssemblyName>JamSoft.CALDemo.Modules.MusicSearch</AssemblyName>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="JamSoft.CALDemo.Modules.MusicSearch.Core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\Int\JamSoft.CALDemo.Modules.MusicSearch.Core.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="JamSoft.CALDemo.Modules.PageManager.Core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\Int\JamSoft.CALDemo.Modules.PageManager.Core.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="JamSoft.CALDemo.Modules.StatusBar.Core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\Int\JamSoft.CALDemo.Modules.StatusBar.Core.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="JamSoft.CALDemo.Modules.ToolBar.Core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\Int\JamSoft.CALDemo.Modules.ToolBar.Core.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.Practices.Composite, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\Ext\Microsoft.Practices.Composite.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.Practices.Composite.UnityExtensions, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\Ext\Microsoft.Practices.Composite.UnityExtensions.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.Practices.Composite.Wpf, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\Ext\Microsoft.Practices.Composite.Wpf.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.Practices.ObjectBuilder2, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\Ext\Microsoft.Practices.ObjectBuilder2.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.Practices.Unity, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\Ext\Microsoft.Practices.Unity.dll</HintPath>
    </Reference>
    <Reference Include="MusicBrainz, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\Ext\MusicBrainz.dll</HintPath>
    </Reference>
    <Reference Include="PresentationCore">
      <RequiredTargetFramework>3.0</RequiredTargetFramework>
    </Reference>
    <Reference Include="PresentationFramework">
      <RequiredTargetFramework>3.0</RequiredTargetFramework>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Core">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Runtime.Serialization">
      <RequiredTargetFramework>3.0</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.ServiceModel">
      <RequiredTargetFramework>3.0</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Xml.Linq">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Data.DataSetExtensions">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Data" />
    <Reference Include="System.Xml" />
    <Reference Include="UIAutomationProvider">
      <RequiredTargetFramework>3.0</RequiredTargetFramework>
    </Reference>
    <Reference Include="WindowsBase">
      <RequiredTargetFramework>3.0</RequiredTargetFramework>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="ArtistSearchCompletedEventArgs.cs" />
    <Compile Include="BindableArtist.cs" />
    <Compile Include="ArtistReleasesSearchCompletedEventArgs.cs" />
    <Compile Include="BindableRelease.cs" />
    <Compile Include="IMusicSearchPresenterModel.cs" />
    <Compile Include="IMusicSearchView.cs" />
    <Compile Include="MusicSearchModule.cs" />
    <Compile Include="MusicSearchObjectConverter.cs" />
    <Compile Include="MusicSearchPresenter.cs" />
    <Compile Include="MusicSearchPresenterModel.cs" />
    <Compile Include="MusicSearchView.xaml.cs">
      <DependentUpon>MusicSearchView.xaml</DependentUpon>
    </Compile>
    <Compile Include="Properties\AssemblyInfo.cs" />
  </ItemGroup>
  <ItemGroup>
    <Page Include="MusicSearchView.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <!-- 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>
  -->
  <PropertyGroup>
    <PostBuildEvent>REM copy "$(TargetPath)" "$(SolutionDir)..\$(OutDir)Modules\"
REM copy "$(TargetDir)MusicBrainz.dll" "$(SolutionDir)..\$(OutDir)External\"

copy "$(TargetPath)" "$(SolutionDir)$(OutDir)Modules\"
copy "$(TargetDir)MusicBrainz.dll" "$(SolutionDir)$(OutDir)External\"</PostBuildEvent>
  </PropertyGroup>
</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
Chief Technology Officer JamSoft Solution Ltd
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions