首页 新闻 会员 周边

如何在CodelActivity执行的时候,修改属性,并且在ActivityDesigner界面及时显示

0
悬赏园豆:100 [待解决问题]

代码如下在Activity里面
 public sealed class ComparisonActivity : AsyncCodeActivity, IRegisterMetadata
 {
//属性
public string SourceImgPath { get; set; }
...............
protected override void Execute(CodeActivityContext context)
{
SourceImgPath =“.../../1.png”;
//在此执行的时候更改SourceImgPath 的路径,然后在在designer中显示改后的值,也就是显示图片
}
...............
  }
在对应的ActivityDesigner的xaml里面绑定如下:
<TextBlock Grid.Row="0" Grid.Column="1" x:Name="txtbSourceName" Text="{Binding  Path=ModelItem.SourceImgPath,Mode=TwoWay,Converter={StaticResource covImgName}}" >
                        <TextBlock.ToolTip>
                            <Image  Source="{Binding  Path=ModelItem.SourceImgPath,Mode=TwoWay,Converter={StaticResource covImg}}"/>
                        </TextBlock.ToolTip>
                    </TextBlock>

shuhang的主页 shuhang | 初学一级 | 园豆:102
提问于:2013-03-01 15:06
< >
分享
所有回答(1)
0

试试使用INotifyPropertyChanged接口

参考:http://q.cnblogs.com/q/46866/

滴答的雨 | 园豆:3660 (老鸟四级) | 2013-03-01 15:19

谢谢,刚试过 不过不行的

支持(0) 反对(0) shuhang | 园豆:102 (初学一级) | 2013-03-01 15:33
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册