0

In my application, I need to bind string and bitmapsource properties. the string binding works fine, but bitmapsource is not. It is sure that there are already image data by bitmapsource, as I can save it on disk. I also created a small project and both work fine.

xaml:

...

<ObjectDataProvider x:Key="MyStringData" 
                    ObjectType="{x:Type local:ImageProcess}" />

<Image x:Key="Txt" Source="{Binding Source={StaticResource MyStringData}, Path=uri}" /> <!--uri is a string, it's fine -->
<Image x:Key="Txt" Source="{Binding Source={StaticResource MyStringData}, Path=bms}" /> <!--bms is a BitmapSource, it's not fine -->

...


c# ....

    public string urii { set; get; }
    public BitmapSource bms { set; get; }

    ....

can anybody give me the reason?

Many thanks!

user1189507
  • 21
  • 1
  • 3

1 Answers1

0

These might be the answers:

Community
  • 1
  • 1
Anatolii Gabuza
  • 6,184
  • 2
  • 36
  • 54