silverlight pivotviewer control does not display tiles
I have a silverlight pivotviewer control which is correctly loading the .cxml file and then requesting the appropriate .dzc file and the facets are populated and I can see how many items I have as well as search them, but no tiles are displayed in the main view area. I looked at the output and saw these binding errors:
System.Windows.Data Error: BindingExpression path error: 'ViewportPadding' property not found on 'Microsoft.Pivot.Internal.ViewModels.CollectionViewerViewModel' 'Microsoft.Pivot.Internal.ViewModels.CollectionViewerViewModel' (HashCode=65819928). BindingExpression: Path='ViewportPadding' DataItem='Microsoft.Pivot.Internal.ViewModels.CollectionViewerViewModel' (HashCode=65819928); target element is 'Microsoft.Pivot.Internal.Controls.SeahorseItemExitHost' (Name='PART_ExitHost'); target property is 'Margin' (type 'System.Windows.Thickness')..
System.Windows.Data Error: BindingExpression path error: 'LayoutEngine' property not found on 'Microsoft.Pivot.Internal.ViewModels.CollectionViewerViewModel' 'Microsoft.Pivot.Internal.ViewModels.CollectionViewerViewModel' (HashCode=65819928). BindingExpression: Path='LayoutEngine' DataItem='Microsoft.Pivot.Internal.ViewModels.CollectionViewerViewModel' (HashCode=65819928); target element is 'Microsoft.Pivot.Internal.Controls.SeahorseItemExitHost' (Name='PART_ExitHost'); target property is 'LayoutEngine' (type 'Microsoft.Pivot.Internal.ItemLayouts.ILayoutEngine')..
System.Windows.Data Error: BindingExpression path error: 'PositionInWindow' property not found on 'Microsoft.Pivot.Internal.ViewModels.CollectionViewerViewModel' 'Microsoft.Pivot.Internal.ViewModels.CollectionViewerViewModel' (HashCode=65819928). BindingExpression: Path='P开发者_StackOverflow社区ositionInWindow' DataItem='Microsoft.Pivot.Internal.ViewModels.CollectionViewerViewModel' (HashCode=65819928); target element is 'Microsoft.Pivot.Internal.Controls.SeahorseItemExitHost' (Name='PART_ExitHost'); target property is 'PositionInWindow' (type 'System.Windows.Point')..
"LayoutEngine" seems like it would be related but I have no idea why the supplied control would have binding issues. Any ideas?
I found the solution to my problem as I set min. constraints for the pivotviewer inside a scroll viewer but the dimensions were still auto and it was inside a scroll viewer:
http://betaforums.silverlight.net/forums/p/211146/497407.aspx
Once I set max constraints and placed it in a grid, all the tiles started showing up.
精彩评论