【问题标题】:create Menu in wpf C# For Patient Mangem在 wpf C# 中为 Patient Mangem 创建菜单
【发布时间】:2020-05-08 23:43:15
【问题描述】:

我在 WPF C# 中的一个小项目患者管理中工作,我想为患者创建列表(就像图片左侧的列表 enter image description here)。 我怎么能喜欢它我不知道我应该使用哪些工具。 请帮忙。 谢谢你。

【问题讨论】:

    标签: c# wpf menu


    【解决方案1】:

    在 C# 中,您在图片中显示的患者列表可以定义如下:

    public class PatientItem
    {
      public string FirstName { get; set; }
      public string LastName { get; set; }
      public string Gender { get; set; }
      public int Age { get; set; }
      public int VisitorId { get; set; }
      public string Diagnosis { get; set; }
      public string FileNamePicture { get; set; }
     }
    

    患者列表定义为:

     List<PatientItem>
    

    下一步是定义布局 XAML 和 C#。

    一个例子可以在https://www.wpf-tutorial.com/list-controls/itemscontrol/找到

    在该示例中,将 TodoItem 替换为 PatientItem 并更改绑定和 XAML,以从 PatientItem 而不是 TodoItem 更新您的布局。

    要绑定您的图片有几个选项,请参阅例如在这里回答,

    Wpf: How to bind an image?

    How do I bind a WPF Image element to a PNG on the local hard drive using a relative filepath derived from a DB?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-09
      • 1970-01-01
      相关资源
      最近更新 更多