Hello.
I need a TileView in a ViewBox. How to work around the error "InvalidOperationException: UIEllement.Arrange(finalRect) cannot be called with Infinite or NaN values in finallRect." Do I have to set the width and height? Are there other workarounds?
Thanks a lot in advance,
Tim.
I need a TileView in a ViewBox. How to work around the error "InvalidOperationException: UIEllement.Arrange(finalRect) cannot be called with Infinite or NaN values in finallRect." Do I have to set the width and height? Are there other workarounds?
Thanks a lot in advance,
Tim.
3 Answers, 1 is accepted
0
Tim
Top achievements
Rank 1
answered on 06 Sep 2011, 04:05 PM
Forgot my RadTileView definition:
<
telerik:RadTileView
x:Name
=
"myTileView"
ColumnsCount
=
"4"
ColumnWidth
=
"Auto"
ItemsSource
=
"{Binding Items}"
RowHeight
=
"Auto"
MinimizedColumnWidth
=
"250"
MinimizedRowHeight
=
"150"
PreservePositionWhenMaximized
=
"True"
IsItemsSizeInPercentages
=
"True"
telerik:TileViewPanel.IsSizeBoundToPosition
=
"True"
telerik:TileViewPanel.IsRowsShrinkEnabled
=
"True"
telerik:TileViewPanel.IsColumnsShrinkEnabled
=
"True"
>
<
telerik:RadTileView.ItemTemplate
>
<
DataTemplate
telerik:ContainerBinding.ContainerBindings
=
"{StaticResource bindings}"
>
<
TextBlock
Text
=
"{Binding Header}"
/>
</
DataTemplate
>
</
telerik:RadTileView.ItemTemplate
>
<
telerik:RadTileView.ContentTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Content}"
/>
</
DataTemplate
>
</
telerik:RadTileView.ContentTemplate
>
</
telerik:RadTileView
>
0
Accepted
Hello Tim,
Thank you for the feedback. The problem in your case is that you're setting the IsItemsSizeInPercentages property to True which means that the width/height of an item will be (lets say) 20% from the available width/height but when the RadTileView is inside a ViewBox the available width/height is infinity and 20% from infinity is infinity.
You can do two things in this case:
- You can set the IsItemsSizeInPercentages to false and use static sizes.
- You can keep the IsItemsSizeInPercentages set to true but you'll have to set Height/MaxHeight and Width/MaxWidth to the RadTileView.
I've attached a sample project using the second approach so could you please examine it and if you have further questions feel free to ask.
Regards,
Zarko
the Telerik team
Thank you for the feedback. The problem in your case is that you're setting the IsItemsSizeInPercentages property to True which means that the width/height of an item will be (lets say) 20% from the available width/height but when the RadTileView is inside a ViewBox the available width/height is infinity and 20% from infinity is infinity.
You can do two things in this case:
- You can set the IsItemsSizeInPercentages to false and use static sizes.
- You can keep the IsItemsSizeInPercentages set to true but you'll have to set Height/MaxHeight and Width/MaxWidth to the RadTileView.
I've attached a sample project using the second approach so could you please examine it and if you have further questions feel free to ask.
Regards,
Zarko
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
0
Tim
Top achievements
Rank 1
answered on 06 Sep 2011, 10:08 PM
Hi Zarko,
thanks a lot for your fast reply, your explanations and your sample project! I am now setting the Width and Height...
All the best,
Tim.
thanks a lot for your fast reply, your explanations and your sample project! I am now setting the Width and Height...
All the best,
Tim.