No DesignTimeData?

Apr 24, 2015 at 12:18 PM
Hi,

Thanks for taking the time to create this component and your doing a excellent job. Its very well needed! My current project for its use is for the Window RT and my question is how can I get DesignTimeData to work?

I have a Hub Control in a MtPivotItem:
<Grid Style="{StaticResource LayoutRootStyle}"
          d:DataContext="{d:DesignInstance IsDesignTimeCreatable=True, Type=designTimeData:MainPageViewModel}">
        <TSPivot:MtPivot Grid.Row="1" SelectedIndex="1" x:Name="Pivot">
            <TSPivot:MtPivotItem Header="Pivot 1">
                <Grid Background="Transparent">
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>

                    <Hub x:Name="HubMain" Margin="0,40,0,10">
                        <HubSection x:Uid="Writings" 
                        Header="WRITINGS"
                        x:Name="WritingsHubSection"
                        ContentTemplate="{StaticResource WritingsHubSectionTemplate}"/>
                        <HubSection x:Uid="Senarios"
                        Header="SENARIOS"
                        x:Name="SenariosHubSection"
                        ContentTemplate="{StaticResource SenariosHubSectionTemplate}"/>
                        <HubSection x:Uid="Senario"
                        Header="SENARIO"
                        x:Name="SenarioHubSection"
                        ContentTemplate="{StaticResource SenarioHubSectionTemplate}"/>
                        <HubSection x:Uid="WorkingSenario"
                        Header="WORKING SENARIOS"
                        x:Name="WorkingSenarioHubSection"
                        ContentTemplate="{StaticResource WorkingSenarioHubSectionTemplate}"/>

                    </Hub>
                    <ContentControl Grid.Row="1"
                        ContentTemplate="{StaticResource RecentWorkingSenarioTemplate}"/>

                </Grid>
            </TSPivot:MtPivotItem>
        </TSPivot:MtPivot>
</Grid>
and it works fine without. Is this just part of the design not able to do this?
Coordinator
Apr 24, 2015 at 12:25 PM
Hi, thanks for using the library...
This should work. What is your exact problem? Any exceptions or warnings?
Apr 25, 2015 at 12:45 AM
Hi, thanks for the reply! Not getting any message, its just not showing. So my question is, does my page need to derive from xmlns:paging="using:MyToolkit.Paging" to work, because I'm using Prism's :
<prism:VisualStateAwarePage
    x:Class="App1.Views.MainPage"
    x:Name="MainPageRoot"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:App1.Views"
    xmlns:controls="using:App1.Controls"
    xmlns:designTimeData="using:App1.DesignTimeData"
    xmlns:prismmvvm="using:Microsoft.Practices.Prism.Mvvm"
    xmlns:prism="using:Microsoft.Practices.Prism.StoreApps"
Apr 25, 2015 at 1:08 AM
Edited Apr 27, 2015 at 4:39 PM
Actually its working during run time without changing my Page settings from Prism; just have to figure out why I'm not able to see anything during design time.

Here how is looks and I have my mouse over the main Grid and you can see in the Design View nothing is showing.
Image

Here how is looks with the MTPivot selected:
Image

Here how is looks with the MTPivotItem selected:
Image

Edit: Also notice, you can't see the Hub Control layout.
Apr 27, 2015 at 5:23 PM
I tested it using your source examples and discovered its not picking up the DataTemplate of the HubSection:

Image
Coordinator
Apr 27, 2015 at 5:42 PM
I usually dont use the designer, this is why some of the controls may not work correctly in the designer... Can you send me your sample project to mail at rsuter dot com or skype rico.suter.
May 15, 2015 at 8:31 PM
Hi rsuter,

I just sent you an email with an link to my OneDrive of a HubApp project demonstrating the problem I'm having in creating PovitItems and displaying Design Time Data in a Hub Control. It display normally during runtime.

Thanks for you help!..