我是WPF的新手.我有这个问题.我绑定列表项做listBox.我在列表框上有自己的风格.ListBox项包含Image和textBlocks.它运作良好.鼠标悬停在此项目上时,我需要对listBox项目进行缩放.我尝试使用触发器,但我不知道如何调整listBox项目的大小.
C#代码:
namespace ListBoxStyle
{
public partial class MainWindow : Window
{
public class User {
public String Id { get; set; }
public Boolean IsFriend { get; set; }
public Uri ImageUri { get; set; }
public User(String azetId, Boolean isFriend, string imageUri)
{
Id = azetId;
IsFriend = isFriend;
ImageUri = new Uri(imageUri);
}
public override string ToString()
{
return Id;
}
}
public static class Users
{
public static IEnumerable<User> GetUsers()
{
var users = new List<User> …Run Code Online (Sandbox Code Playgroud)