public Dialog(User user) { InitializeComponent(); if (user == null) return; //设置标题,图标 this.user = user; title.Content = Title = user.DisplayName; //this.Icon = new ImagePathConverter().getHead(user); }
public ImageSource getHead(User user) { return getHead(user.UserName, user.HeadImgUrl); }