Expression > Página Inicial dos Fóruns > Expression Blend + SketchFlow > Feature Request: Design Attached Dependency Property for DataContext Type
Fazer uma PerguntaFazer uma Pergunta
 

Discussão GeralFeature Request: Design Attached Dependency Property for DataContext Type

  • terça-feira, 30 de junho de 2009 21:09Joey Wood Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    I would like to use the "Explicit Data Context" feature when setting data bindings, but I'm not setting the DataContext in XAML.  I am setting it in code behind for various reasons.  Couldn't there be an attached property in the "d" namespace like "d:DataContextType"?  Since I know what type the object will be or perhaps an interface it will implement, couldn't the Explicit Data Context feature use that when present to get type information to use in data bindings?  It would also be great if the Explicit Data Context feature showed up in the Data tab that is new in Blend 3.

Todas as Respostas

  • terça-feira, 30 de junho de 2009 23:18Unni Ravindranathan - MSFT Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Hi Joey,

    For Blend 3, it will be even better than that. Not only will you be able to specify d:DataContext to simulate a DataContext at design time, but you will also be able to specify your own sample file that allows you to use custom types so data shows up on the design surface. Stay tuned for more details - I will blog about this as soon as we ship Blend 3 over here - http://blogs.msdn.com/unnir  (we currently only have the designer focused sample data feature in the preview build of Blend 3).

    This is the developer-enables-designer-focused addition to the Blend sample data functionality, in addition to what we already have in the Blend 3 Preview that you can use to quickly mock up arbitrary data sets.

    Thanks,
    Unni
  • quarta-feira, 1 de julho de 2009 14:16Joey Wood Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Great!!  I will be awaiting it eagerly.