Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7632443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:37:36+00:00 2026-05-31T06:37:36+00:00

I have a tab control with a data template that renders data based on

  • 0

I have a tab control with a data template that renders data based on the template and the data on the source it is bound to.

However, this instantly makes UI development harder as I don’t see anything in Visual Studio 11, because all data comes when the application is running. Is there some way to add test data that only appears while working with the UI?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T06:37:37+00:00Added an answer on May 31, 2026 at 6:37 am

    This tutorial from MSDN was perfect: http://msdn.microsoft.com/en-us/library/ee823176.aspx

    Basically:

    Create a file DesignData/FooData/Foo.xaml with content such as:

    <local:Foo xmlns:local="clr-namespace:YourProject" 
        SomeProperty="Sample" AnotherProperty="Bar" />
    

    Note that Foo must be a class that exists under the namespace YourProject with the properties you just used.

    Then select the file from the Solution Explorer and set the Build Action to Design Data.

    Add a namespace to your MainWindow.xaml code:

    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    

    along with the other namespaces you have.

    Then add this to your top-level Grid for instance:

    d:DataContext="{d:DesignData Source=./DesignData/FooData/Foo.xaml}"
    

    Now elements below that Grid element (under the influence of DataContext) can have the property:

    <TabControl ItemsSource="{Binding Mode=OneWay}">...
    

    In my case I used a tab control and my data context was a collection DesignData/FooData/FooCollection.xaml:

    <local:FooCollection xmlns:local="clr-namespace:YourProject">
    
        <local:Foo Prop1="Sample" Prop2="test" />
        ...
    
    </local:FooCollection>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have seen a control template for tab control...in http://www.codeproject.com/KB/WPF/WPFOutlookNavi.aspx Is this property triggers
I have a tab control bound to an observablecollection for dynamic tabs as follows:
Problem I have a custom tab control using Chrome-shaped tabs that binds to a
I have a tab content template set to my tab control: <TabControl SelectedIndex=0 ItemsSource={Binding
I have a Tab Control with multiple Tab Pages. I want to be able
using jquery v1.3.2 and jQuery UI 1.7.1 I have 1 tab control with 3
I have a tab navigator control and I would like to make all of
I have created a tab control and few forms. Each form opens in a
I have a page with a tab control and each control has almost 15
I have a form which has only tab control in it. I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.