【发布时间】:2018-02-22 17:31:06
【问题描述】:
我想将我的 StringFormat 取出到静态资源中。
我试过了,但是没用
.. xmlns:system="clr-namespace:System;assembly=mscorlib">
ResourceDictionary>
<system:String x:Key="MyFormat">'http://www.gravatar.com/avatar/{0}?d=mm&s=150'</system:String>
</ResourceDictionary>
这里我初始化我的 StringFormat
<Image.Source>
<UriImageSource Uri="{Binding EmailHash,StringFormat={StaticResource MyFormat}}}" />
</Image.Source>
【问题讨论】:
标签: c# xaml xamarin.forms