try to customize the header of each PivotItem, i google first and write code below, this is OK:
<controls:Pivot Title="MyPivot"> <!--Pivot item one--> <controls:PivotItem> <controls:PivotItem.Header> <TextBlock Text="Pivot1" FontSize="40"/> </controls:PivotItem.Header> <Grid/> </controls:PivotItem> </controls:Pivot>
when I add the second pivot item in this way, an error appears as "Value does not fall within the expected range.",the error starts from [controls:PivotItem] of "pivot item two",
<controls:Pivot Title="MyPivot"> <!--Pivot item one--> <controls:PivotItem> <controls:PivotItem.Header> <TextBlock Text="Pivot1" FontSize="40"/> </controls:PivotItem.Header> <Grid/> </controls:PivotItem> <!--Pivot item two--> <controls:PivotItem> <controls:PivotItem.Header> <TextBlock Text="Pivot2" FontSize="40"/> </controls:PivotItem.Header> <Grid/> </controls:PivotItem> </controls:Pivot>
When I build the project, the error just gone away, and the whole app runs like a charm. But everytime i add a new pivot item in this way, the error shows up.
My questions are:
- why does this error happen and how to solve it?
- can I ignore this error?
Answer: 1
This "error" it's thrown just at design-time, and I think you can ignore it....also because it will go definitively away the first time you build the project (so, it means there are no real problems in your project - and also no warnings)!
There are more of this type of errors thrown by the designer.
Ignore it!
by : MAXEhttp://stackoverflow.com/users/833644
No comments:
Post a Comment
Send us your comment related to the topic mentioned on the blog