private void CollectionSingleCardRoot_SizeChanged(object sender, EventArgs e) { Contract.Requires(sender != null); CollectionSingleCard t = sender as CollectionSingleCard; NumColumns = (Int32)(t.Width / CardSizes.Current.CardSmallWidth + 1); // +1 for padding }
public static void OnItemTemplateChanged(BindableObject argSource, object oldValue, object newValue) { Contract.Requires(argSource != null); Contract.Requires(newValue != null); CollectionSingleCard layout = argSource as CollectionSingleCard; DataTemplate iTemplate = newValue as DataTemplate; layout.theCollectionView.ItemTemplate = iTemplate; }
public static void OnItemsSourceChanged(BindableObject argSource, object oldValue, object newValue) { Contract.Requires(argSource != null); Contract.Requires(newValue != null); CollectionSingleCard layout = argSource as CollectionSingleCard; IEnumerable iSource = newValue as IEnumerable; layout.theCollectionView.ItemsSource = iSource; }