Skip to content

Instantly share code, notes, and snippets.

View lbugnion's full-sized avatar

Laurent Bugnion lbugnion

View GitHub Profile
@lbugnion
lbugnion / gist:db7789d29136d510549b
Created January 27, 2016 21:04
MVVM Light binding framework for Xamarin also supports FallbackValue and TargetNullValue
[Test]
public void BindingDeepPath_DeepSourceExistingPathGraduallySettingPath_NoError()
{
VmSource = new TestViewModel();
VmTarget = new TestViewModel();
const string fallback = "This is the fallback";
const string targetNull = "Target is null";
var binding = new Helpers.Binding<string, string>(
@lbugnion
lbugnion / gist:e8f9557cd255aaf863b5
Created January 27, 2016 20:53
MVVM Light binding framework for Xamarin supports deep paths with changing objects! Passed
[Test]
public void BindingDeepPath_DeepSourceExistingPathChangingObjects_NoError()
{
VmSource = new TestViewModel
{
Nested = new TestViewModel
{
Nested = new TestViewModel
{
Model = new TestModel
<dependencies>
<group targetFramework="net35">
<dependency id="CommonServiceLocator" version="1.0" />
</group>
<group targetFramework="net40">
<dependency id="CommonServiceLocator" version="1.3" />
</group>
<group targetFramework="net45">
<dependency id="CommonServiceLocator" version="1.3" />
</group>
namespace GalaSoft.MvvmLight.Helpers
{
/// <summary>
/// A <see cref="BaseAdapter{T}"/> that can be used with an Android ListView. After setting
/// the <see cref="DataSource"/> and the <see cref="GetTemplate"/> properties, the adapter is
/// suitable for a list control. If the DataSource is an <see cref="INotifyCollectionChanged"/>,
/// changes to the collection will be observed and the UI will automatically be updated.
/// </summary>
/// <typeparam name="T">The type of the items contained in the <see cref="DataSource"/>.</typeparam>
////[ClassInfo(typeof(ObservableAdapter<T>),