public CanvasColumn(Canvas containerCanvas, FeedItemSource fiSource, ContentPresenterCache cpCache, double canvasPosition, int columnIndex) { _fiSource = fiSource; _cpCache = cpCache; _containerCanvas = containerCanvas; _canvasPosition = canvasPosition; _debugColumnIndex = columnIndex; IAsyncAction debugTextblockCreationTask = containerCanvas.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { _debugTextBlock = new TextBlock() { Text = "Column #" + _debugColumnIndex }; _containerCanvas.Children.Add(_debugTextBlock); Canvas.SetLeft(_debugTextBlock, _canvasPosition); }); }
public void Initialize(FeedItemSource itemSource, DataTemplate dataTemplate, double columnWidth) { _fiSource = itemSource; _cpCache = new ContentPresenterCache(this, dataTemplate); _canvasColumnList = new List<CanvasColumn>(); _isInitialized = true; _columnWidth = columnWidth; }