F# and MVVM Light Toolkit Sample Application

MVVM Light Toolkitを使ってViewModelとModelをF#で記述した足し算を行うだけのシンプルなアプリケーションの実装例です。サンプルアプリケーションは以下のような形のものになります。以下に、サンプルに含まれるプロジェクトの概要を示します。 Okazuki.Fsharp.Mvvmプロジェクト(C#)F#でのViewModelの定義を楽にするためのヘルパークラスを定義したViewModelの基本クラスを定義しています。 Okazuki.Fsharp.Mvvm.Sample(C#)MVVM Light Toolkitをベースにしたプ

 
 
 
 
 
(0)
250 times
Add to favorites
6/21/2011
E-mail Twitter del.icio.us Digg Facebook

Solution explorer

C#, F#
<?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>8.0.30703</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{7e30f39a-a766-489b-8ef1-e543a81a2543}</ProjectGuid>
    <OutputType>Library</OutputType>
    <RootNamespace>Okazuki.Fsharp.Mvvm.ViewModel</RootNamespace>
    <AssemblyName>Okazuki.Fsharp.Mvvm.ViewModel</AssemblyName>
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
    <Name>Okazuki.Fsharp.Mvvm.ViewModel</Name>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <Tailcalls>false</Tailcalls>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <WarningLevel>3</WarningLevel>
    <DocumentationFile>bin\Debug\Okazuki.Fsharp.Mvvm.ViewModel.XML</DocumentationFile>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <Tailcalls>true</Tailcalls>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <WarningLevel>3</WarningLevel>
    <DocumentationFile>bin\Release\Okazuki.Fsharp.Mvvm.ViewModel.XML</DocumentationFile>
  </PropertyGroup>
  <Import Project="$(MSBuildExtensionsPath32)\FSharp\1.0\Microsoft.FSharp.Targets" Condition="!Exists('$(MSBuildBinPath)\Microsoft.Build.Tasks.v4.0.dll')" />
  <Import Project="$(MSBuildExtensionsPath32)\..\Microsoft F#\v4.0\Microsoft.FSharp.Targets" Condition=" Exists('$(MSBuildBinPath)\Microsoft.Build.Tasks.v4.0.dll')" />
  <ItemGroup>
    <None Include="packages.config" />
    <Compile Include="Calc.fs" />
    <Compile Include="MainViewModel.fs" />
  </ItemGroup>
  <ItemGroup>
    <Reference Include="GalaSoft.MvvmLight.Extras.WPF4">
      <HintPath>..\packages\MvvmLight.3.0.2\lib\net40\GalaSoft.MvvmLight.Extras.WPF4.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="GalaSoft.MvvmLight.WPF4">
      <HintPath>..\packages\MvvmLight.3.0.2\lib\net40\GalaSoft.MvvmLight.WPF4.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="mscorlib" />
    <Reference Include="FSharp.Core" />
    <Reference Include="PresentationCore" />
    <Reference Include="PresentationFramework" />
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="System.Numerics" />
    <Reference Include="System.Windows.Interactivity">
      <HintPath>..\packages\MvvmLight.3.0.2\lib\net40\System.Windows.Interactivity.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="WindowsBase" />
    <ProjectReference Include="..\Okazuki.Fsharp.Mvvm\Okazuki.Fsharp.Mvvm.csproj">
      <Name>Okazuki.Fsharp.Mvvm</Name>
      <Project>{e5ff0596-bbda-4c59-be8d-507cfc26d1af}</Project>
      <Private>True</Private>
    </ProjectReference>
  </ItemGroup>
  <!-- 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>