2012-02-04 3 views
0

私のアプリケーションでは、stringとbitmapsourceのプロパティをバインドする必要があります。文字列バインディングは正常に動作しますが、bitmapsourceは正しく動作しません。私はそれをディスクに保存できるので、すでにビットマップソースによってイメージデータがあることが確かです。私はまた、小さなプロジェクトを作成し、両方とも正常に動作します。xamlの文字列バインディングは問題ありませんが、BitmapSourceバインディングはなぜですか?

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; } 

    .... 

誰も私に理由を与えることができますか?

多くの感謝!

答えて

関連する問題