How do you add a data source in Expression Blend?

建议的答复 How do you add a data source in Expression Blend?

  • 2012年5月24日 0:19
     
     

    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

全部回复

  • 2012年5月29日 3:53
    版主
     
     

    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

  • 2012年5月31日 0:22
     
     

    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

  • 2012年5月31日 19:46
     
     建议的答复

    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

  • 2012年6月1日 7:04
     
     

    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.

  • 2012年6月1日 15:06
     
     建议的答复
    We are working on the blog post for the same and it should be out soon

    Dev@Mic

  • 2012年7月2日 10:22
     
     
    Hi there? any news about that blog post? I'm facing the same issue... 
  • 2012年7月3日 16:58
     
     
    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

  • 2012年7月24日 12:41
     
     

    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?

  • 2012年7月24日 16:26
     
     

    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

  • 2012年12月3日 10:54
     
     
    Is this still the case in Blend 5?
    • 已编辑 Saša M 2012年12月3日 10:54
    •