locked
Dynamically loading an image (PaoloTCS) - 1/16/2007 5:27 AM PST RRS feed

  • Question

  • By: PaoloTCS

    Is there a way to dynamically select an image to be used by WPF/E?  
    
    For example, the XAML for animating an image is pretty easy with 
    DoubleAnimation- 
    ----
      <DoubleAnimation
                  Storyboard.TargetName="pic1"
                  Storyboard.TargetProperty="(Canvas.Left)"
                  To="300" Duration="0:0:1" /> 
    
    Then ...
    
    <Image x:Name="pic1" Source="Pic1.png" Canvas.Left="30" Canvas.Top="30" /> 
    --- 
    works for Pic1.png.  
    
    What I would like to do (in Visual Studio 2005) is to be able to have the 
    Source be determined dynamically, e.g. the same way one can load an image 
    form a DataList in ASP.Net 2, using a Datalist, an ObjectDataSource and a 
    dataset form an *.xsd file?  
    
    Thanks for a great product,
    
    Paolo 
    Tuesday, February 19, 2008 7:37 PM

Answers

  • By: Adrian Mascarenhas (MSFT)

    I just talked to the one of our wpf/e experts (PeterBl). Unfortunately, 
    databinding is not supported in wpf/e. But you should be able to dynamically 
    edit the source through code. If you need more assistance with wpf/e, pete 
    is your guy.
    
    -- 
    - Adrian Mascarenhas (MSFT),  Expression Blend
    "Content is provided "AS IS" with no warranties and confers no rights. 
    Opinions are my own and do not represent those of my employer."
    
    
    "PaoloTCS" <PaoloTCS@discussions.microsoft.com> wrote in message 
    news:99BB4B53-399D-405C-BA54-76ED987292F4@microsoft.com...
    > Is there a way to dynamically select an image to be used by WPF/E?
    >
    > For example, the XAML for animating an image is pretty easy with
    > DoubleAnimation-
    > ----
    >  <DoubleAnimation
    >              Storyboard.TargetName="pic1"
    >              Storyboard.TargetProperty="(Canvas.Left)"
    >              To="300" Duration="0:0:1" />
    >
    > Then ...
    >
    > <Image x:Name="pic1" Source="Pic1.png" Canvas.Left="30" Canvas.Top="30" />
    > --- 
    > works for Pic1.png.
    >
    > What I would like to do (in Visual Studio 2005) is to be able to have the
    > Source be determined dynamically, e.g. the same way one can load an image
    > form a DataList in ASP.Net 2, using a Datalist, an ObjectDataSource and a
    > dataset form an *.xsd file?
    >
    > Thanks for a great product,
    >
    > Paolo 
    
    
    Tuesday, February 19, 2008 10:31 PM
  • By: Adrian Mascarenhas (MSFT)

    please send an email to peterbl at microsoft dot com.

    --
    - Adrian Mascarenhas (MSFT), Expression Blend
    "Content is provided "AS IS" with no warranties and confers no rights.
    Opinions are my own and do not represent those of my employer."


    "PaoloTCS" <PaoloTCS@discussions.microsoft.com> wrote in message
    news:4DDB401A-781D-455C-84AE-534549337206@microsoft.com...
    > Thank you!
    >
    > How can I get in touch with PeterBl, please?
    >
    > Thanks again,
    >
    > Paolo
    > ------------------------
    >
    > "Adrian Mascarenhas (MSFT)" wrote:
    >
    >> I just talked to the one of our wpf/e experts (PeterBl). Unfortunately,
    >> databinding is not supported in wpf/e. But you should be able to
    >> dynamically
    >> edit the source through code. If you need more assistance with wpf/e,
    >> pete
    >> is your guy.
    >>
    >> --
    >> - Adrian Mascarenhas (MSFT), Expression Blend
    >> "Content is provided "AS IS" with no warranties and confers no rights.
    >> Opinions are my own and do not represent those of my employer."
    >>
    >>
    >> "PaoloTCS" <PaoloTCS@discussions.microsoft.com> wrote in message
    >> news:99BB4B53-399D-405C-BA54-76ED987292F4@microsoft.com...
    >> > Is there a way to dynamically select an image to be used by WPF/E?
    >> >
    >> > For example, the XAML for animating an image is pretty easy with
    >> > DoubleAnimation-
    >> > ----
    >> > <DoubleAnimation
    >> > Storyboard.TargetName="pic1"
    >> > Storyboard.TargetProperty="(Canvas.Left)"
    >> > To="300" Duration="0:0:1" />
    >> >
    >> > Then ...
    >> >
    >> > <Image x:Name="pic1" Source="Pic1.png" Canvas.Left="30" Canvas.Top="30"
    >> > />
    >> > ---
    >> > works for Pic1.png.
    >> >
    >> > What I would like to do (in Visual Studio 2005) is to be able to have
    >> > the
    >> > Source be determined dynamically, e.g. the same way one can load an
    >> > image
    >> > form a DataList in ASP.Net 2, using a Datalist, an ObjectDataSource and
    >> > a
    >> > dataset form an *.xsd file?
    >> >
    >> > Thanks for a great product,
    >> >
    >> > Paolo
    >>
    >>
    Tuesday, February 19, 2008 10:32 PM

All replies

  • By: Adrian Mascarenhas (MSFT)

    I just talked to the one of our wpf/e experts (PeterBl). Unfortunately, 
    databinding is not supported in wpf/e. But you should be able to dynamically 
    edit the source through code. If you need more assistance with wpf/e, pete 
    is your guy.
    
    -- 
    - Adrian Mascarenhas (MSFT),  Expression Blend
    "Content is provided "AS IS" with no warranties and confers no rights. 
    Opinions are my own and do not represent those of my employer."
    
    
    "PaoloTCS" <PaoloTCS@discussions.microsoft.com> wrote in message 
    news:99BB4B53-399D-405C-BA54-76ED987292F4@microsoft.com...
    > Is there a way to dynamically select an image to be used by WPF/E?
    >
    > For example, the XAML for animating an image is pretty easy with
    > DoubleAnimation-
    > ----
    >  <DoubleAnimation
    >              Storyboard.TargetName="pic1"
    >              Storyboard.TargetProperty="(Canvas.Left)"
    >              To="300" Duration="0:0:1" />
    >
    > Then ...
    >
    > <Image x:Name="pic1" Source="Pic1.png" Canvas.Left="30" Canvas.Top="30" />
    > --- 
    > works for Pic1.png.
    >
    > What I would like to do (in Visual Studio 2005) is to be able to have the
    > Source be determined dynamically, e.g. the same way one can load an image
    > form a DataList in ASP.Net 2, using a Datalist, an ObjectDataSource and a
    > dataset form an *.xsd file?
    >
    > Thanks for a great product,
    >
    > Paolo 
    
    
    Tuesday, February 19, 2008 10:31 PM
  • By: PaoloTCS

    Thank you!
    
    How can I get in touch with PeterBl, please?
    
    Thanks again,
    
    Paolo
    ------------------------
    
    "Adrian Mascarenhas (MSFT)" wrote:
    
    > I just talked to the one of our wpf/e experts (PeterBl). Unfortunately, 
    > databinding is not supported in wpf/e. But you should be able to dynamically 
    > edit the source through code. If you need more assistance with wpf/e, pete 
    > is your guy.
    > 
    > -- 
    > - Adrian Mascarenhas (MSFT),  Expression Blend
    > "Content is provided "AS IS" with no warranties and confers no rights. 
    > Opinions are my own and do not represent those of my employer."
    > 
    > 
    > "PaoloTCS" <PaoloTCS@discussions.microsoft.com> wrote in message 
    > news:99BB4B53-399D-405C-BA54-76ED987292F4@microsoft.com...
    > > Is there a way to dynamically select an image to be used by WPF/E?
    > >
    > > For example, the XAML for animating an image is pretty easy with
    > > DoubleAnimation-
    > > ----
    > >  <DoubleAnimation
    > >              Storyboard.TargetName="pic1"
    > >              Storyboard.TargetProperty="(Canvas.Left)"
    > >              To="300" Duration="0:0:1" />
    > >
    > > Then ...
    > >
    > > <Image x:Name="pic1" Source="Pic1.png" Canvas.Left="30" Canvas.Top="30" />
    > > --- 
    > > works for Pic1.png.
    > >
    > > What I would like to do (in Visual Studio 2005) is to be able to have the
    > > Source be determined dynamically, e.g. the same way one can load an image
    > > form a DataList in ASP.Net 2, using a Datalist, an ObjectDataSource and a
    > > dataset form an *.xsd file?
    > >
    > > Thanks for a great product,
    > >
    > > Paolo 
    > 
    > 
    Tuesday, February 19, 2008 10:31 PM
  • By: Adrian Mascarenhas (MSFT)

    please send an email to peterbl at microsoft dot com.

    --
    - Adrian Mascarenhas (MSFT), Expression Blend
    "Content is provided "AS IS" with no warranties and confers no rights.
    Opinions are my own and do not represent those of my employer."


    "PaoloTCS" <PaoloTCS@discussions.microsoft.com> wrote in message
    news:4DDB401A-781D-455C-84AE-534549337206@microsoft.com...
    > Thank you!
    >
    > How can I get in touch with PeterBl, please?
    >
    > Thanks again,
    >
    > Paolo
    > ------------------------
    >
    > "Adrian Mascarenhas (MSFT)" wrote:
    >
    >> I just talked to the one of our wpf/e experts (PeterBl). Unfortunately,
    >> databinding is not supported in wpf/e. But you should be able to
    >> dynamically
    >> edit the source through code. If you need more assistance with wpf/e,
    >> pete
    >> is your guy.
    >>
    >> --
    >> - Adrian Mascarenhas (MSFT), Expression Blend
    >> "Content is provided "AS IS" with no warranties and confers no rights.
    >> Opinions are my own and do not represent those of my employer."
    >>
    >>
    >> "PaoloTCS" <PaoloTCS@discussions.microsoft.com> wrote in message
    >> news:99BB4B53-399D-405C-BA54-76ED987292F4@microsoft.com...
    >> > Is there a way to dynamically select an image to be used by WPF/E?
    >> >
    >> > For example, the XAML for animating an image is pretty easy with
    >> > DoubleAnimation-
    >> > ----
    >> > <DoubleAnimation
    >> > Storyboard.TargetName="pic1"
    >> > Storyboard.TargetProperty="(Canvas.Left)"
    >> > To="300" Duration="0:0:1" />
    >> >
    >> > Then ...
    >> >
    >> > <Image x:Name="pic1" Source="Pic1.png" Canvas.Left="30" Canvas.Top="30"
    >> > />
    >> > ---
    >> > works for Pic1.png.
    >> >
    >> > What I would like to do (in Visual Studio 2005) is to be able to have
    >> > the
    >> > Source be determined dynamically, e.g. the same way one can load an
    >> > image
    >> > form a DataList in ASP.Net 2, using a Datalist, an ObjectDataSource and
    >> > a
    >> > dataset form an *.xsd file?
    >> >
    >> > Thanks for a great product,
    >> >
    >> > Paolo
    >>
    >>
    Tuesday, February 19, 2008 10:32 PM