Skip to content

Commit

Permalink
Wire up an empty CacheView
Browse files Browse the repository at this point in the history
  • Loading branch information
anaisbetts committed May 7, 2012
1 parent 5f072d1 commit 6092406
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
12 changes: 12 additions & 0 deletions AkavacheExplorer/AkavacheExplorer.csproj
Expand Up @@ -69,6 +69,9 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Interactive">
<HintPath>..\packages\Ix_Experimental-Main.1.1.10823\lib\Net4\System.Interactive.dll</HintPath>
</Reference>
<Reference Include="System.Reactive, Version=1.1.11111.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Rx_Experimental-Main.1.1.11111\lib\Net4\System.Reactive.dll</HintPath>
</Reference>
Expand All @@ -92,8 +95,13 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="Models\ReadonlyAkavacheCache.cs" />
<Compile Include="ViewModels\AppBootstrapper.cs" />
<Compile Include="ViewModels\CacheViewModel.cs" />
<Compile Include="ViewModels\OpenCacheViewModel.cs" />
<Compile Include="Views\CacheView.xaml.cs">
<DependentUpon>CacheView.xaml</DependentUpon>
</Compile>
<Compile Include="Views\OpenCacheView.xaml.cs">
<DependentUpon>OpenCacheView.xaml</DependentUpon>
</Compile>
Expand All @@ -109,6 +117,10 @@
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="Views\CacheView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\OpenCacheView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down
1 change: 1 addition & 0 deletions AkavacheExplorer/ViewModels/AppBootstrapper.cs
Expand Up @@ -49,6 +49,7 @@ IKernel createStandardKernel()
ret.Bind<IOpenCacheViewModel>().To<OpenCacheViewModel>();
ret.Bind<IViewForViewModel<OpenCacheViewModel>>().To<OpenCacheView>();
ret.Bind<ICacheViewModel>().To<CacheViewModel>();
ret.Bind<IViewForViewModel<CacheViewModel>>().To<CacheView>();

return ret;
}
Expand Down
11 changes: 11 additions & 0 deletions AkavacheExplorer/Views/CacheView.xaml
@@ -0,0 +1,11 @@
<UserControl x:Class="AkavacheExplorer.Views.CacheView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d" x:Name="userControl"
d:DesignHeight="300" d:DesignWidth="300">
<Grid DataContext="{Binding Path=ViewModel, ElementName=userControl}">

</Grid>
</UserControl>
41 changes: 41 additions & 0 deletions AkavacheExplorer/Views/CacheView.xaml.cs
@@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using AkavacheExplorer.ViewModels;
using ReactiveUI.Routing;

namespace AkavacheExplorer.Views
{
/// <summary>
/// Interaction logic for CacheView.xaml
/// </summary>
public partial class CacheView : UserControl, IViewForViewModel<CacheViewModel>
{
public CacheView()
{
InitializeComponent();
}

public CacheViewModel ViewModel {
get { return (CacheViewModel)GetValue(ViewModelProperty); }
set { SetValue(ViewModelProperty, value); }
}
public static readonly DependencyProperty ViewModelProperty =
DependencyProperty.Register("ViewModel", typeof(CacheViewModel), typeof(CacheView), new UIPropertyMetadata(null));

object IViewForViewModel.ViewModel {
get { return ViewModel; }
set { ViewModel = (CacheViewModel) value; }
}
}
}

0 comments on commit 6092406

Please sign in to comment.