locked
How do you add a data source in Expression Blend?

    Question

  • This feature seems to be missing in the current build, or is it hidden somewhere?

    Makes Blend borderline useless without having the ability to create mock data in the designer.

    Arash Emami
    Seles Games

    Thursday, May 24, 2012 12:19 AM

All replies

  • Hello Arash,

    Do you mean you can't find add the data source in Blend for Microsoft Visual Studio 11 Beta? And I did a test on my machine, I can't find the data-source either. I am sorry that I can't figure out you the official document whether it is removed from the Expression Blend or not. And if you find it is a very important feature for you, you can consider submitting one feedback on the Microsoft Connect site:

    https://connect.microsoft.com/VisualStudio/content/content.aspx?ContentID=27774 

    Thanks,


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, May 29, 2012 3:53 AM
    Moderator
  • Hi Vicky,

    Yes, that is exactly the feature that seems to be removed.  That feature is so necessary for creating UIs in Blend.  If you can get the word out to the relevant teams inside Microsoft, that would be a huge help going forward.

    Thank you,

    Arash Emami
    Seles Games

    Thursday, May 31, 2012 12:22 AM
  • The Data Panel Feature is not available for Blend for Visual Studio for developing Metro style apps. You can still use Blend 4 Data Panel to create sample data and easily port it over to work with Metro style apps (C#\VB).If you need more details on how to accomplish this please contact me at harikm (@) microsoft (.) com.


    Dev@Mic

    Thursday, May 31, 2012 7:46 PM
  • WHY??

    Why is it necessary to do a workaround?  This is ridiculous.  Instead of emailing you, have someone write a blog post about how to do this.  It was an important feature and now it's just gone.

    Friday, June 01, 2012 7:04 AM
  • We are working on the blog post for the same and it should be out soon

    Dev@Mic

    Friday, June 01, 2012 3:06 PM
  • Hi there? any news about that blog post? I'm facing the same issue... 
    Monday, July 02, 2012 10:22 AM
  • We are still working on it and hope to have it out this month. In the meantime , you can reach out to me at harikm (@) microsoft.com and I can send you a quick draft.

    Dev@Mic

    Tuesday, July 03, 2012 4:58 PM
  • I somehow find this quite disturbing. There are needs to develop quality Metro apps and this feature is a must. While a workaround (which isn't happening somehow) is welcome, a status as if it will or not make it in the final release should be made. Don't you think?

    Tuesday, July 24, 2012 12:41 PM
  • Unfortunately , this feature will not be available I then RTM version of Blend for Visual Studio. We understand this a core feature for the product and will strive to get this into a future version of Blend.

    In the meantime. Here is a short excerpt on how to port Blend 4 sample data. Please feel free to mail me directly at harikm@microsoft.com if you need more info.

    1. Create or find sample data in a Blend 4 Silverlight project

    2. Create a new project in Blend for Visual Studio 2012

    3. By hand, create the same sample data folder structure in your XAML for Metro style application

    4. Copy the sample data files from your Blend 4 project into your new XAML for Metro style application project

    5. Edit the “code behind” (.cs) files for the sample data to have the correct references for XAML for Metro style applications.

    6. Edit the “code behind” (.cs) files for the sample data to match the current APIs of XAML for Metro style applications

    7. Add references to your sample data to the App.xaml file

    8. Add the needed sample data resources into the App.xaml file

    9. Edit the XAML for the sample data files to match the new namespaces in XAML for Metro style applications

    10. Update any XAML for Image type properties

    11. Build your project to make sure there aren’t any errors

    This table should give you a good idea on what to change

    <file>

    Blend   4 Silverlight Project

    Blend   for Visual Studio 2012 XAML for Metro style application

    TestSampleDataSource.xaml.cs

    using System;

    using System;

    using Windows.ApplicationModel.Resources;

    using Windows.Storage;

    System.Uri resourceUri = new System.Uri("/SampleDataSource;component/SampleData/TestSampleDataSource/TestSampleDataSource.xaml",   System.UriKind.Relative);

                                 if (System.Windows.Application.GetResourceStream(resourceUri)   != null)

                                 {

                                        System.Windows.Application.LoadComponent(this,   resourceUri);

                                 }

    System.Uri resourceUri = new System.Uri("ms-appx:///SampleData/TestSampleDataSource/TestSampleDataSource.xaml");

    Windows.UI.Xaml.Application.LoadComponent(this, resourceUri,   Windows.UI.Xaml.Controls.Primitives.ComponentResourceLocation.Application);

    private   System.Windows.Media.ImageSource _Thumb = null;

    public   System.Windows.Media.ImageSource Thumb

    private string _Thumb = string.Empty;

    public string Thumb

    App.XAML

    xmlns:SampleData="clr-namespace:Expression.Blend.SampleData.TestSampleDataSource"

    xmlns:SampleData="using:SampleData.TestSampleDataSource"

    <SampleData:TestSampleDataSource x:Key="TestSampleDataSource" d:IsDataSource="True"/>

    <SampleData:TestSampleDataSource x:Key="TestSampleDataSource" d:IsDataSource="True"/>

    TestSampleDataSource.xaml

    xmlns:SampleData="clr-namespace:Expression.Blend.SampleData

    xmlns:SampleData="using:Expression.Blend.SampleData

    Thumb="/SampleDataSource;component/SampleData/TestSampleDataSource/TestSampleDataSource_Files/image01.png"

    Thumb="ms-appx:///SampleData/TestSampleDataSource/TestSampleDataSource_Files/image01.png"


    Dev@Mic

    Tuesday, July 24, 2012 4:26 PM
  • Is this still the case in Blend 5?
    • Edited by Saša M Monday, December 03, 2012 10:54 AM
    • Proposed as answer by canovac Sunday, June 16, 2013 7:49 AM
    Monday, December 03, 2012 10:54 AM