0
我正在开发Windows Phone 8.1应用程序。如果我在BitmapIcon控制设置UriSource像:XAML - Dynamics在BitmapIcon中设置UriSource
<BitmapIcon Width="35" Height="35" Margin="0" RequestedTheme="Dark" UriSource="/Assets/Main/Operations/appbar.information.png">
一切工作正常,但如果我想将它设置动态我见犹空场。
我正在使用MVVM Light。我的模型看起来像:
...
private string _icon;
public string Icon
{
get { return _icon; }
set { _icon = value; RaisePropertyChanged("Icon"); }
}
...
接下来我创建对象,添加到列表并在此基础上创建可观察集合。其他领域的正常工作,但不是这样的:
<BitmapIcon Width="25" Height="25" Margin="0" UriSource="{Binding Icon, Mode=TwoWay}"/>