Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WCF and WF
  4. Image for each record in xamdatagrid

Image for each record in xamdatagrid

Scheduled Pinned Locked Moved WCF and WF
wpf
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sreenivasaraok
    wrote on last edited by
    #1

    Hi, I have a class student class. student { StudentName{get;set;} Gender StudentGender{get;set} } Gender (this is enum) { Male, Female, } I have binded list of students to xamdatagrid. (which contains the Name,Image) My requirement is if the student is Male, display the Male image, if the record is female, display the female record based on the Enum(Gender). how can we achive this is .xaml Note: Male image and Female image nothing but icons.(static)

    R 1 Reply Last reply
    0
    • S sreenivasaraok

      Hi, I have a class student class. student { StudentName{get;set;} Gender StudentGender{get;set} } Gender (this is enum) { Male, Female, } I have binded list of students to xamdatagrid. (which contains the Name,Image) My requirement is if the student is Male, display the Male image, if the record is female, display the female record based on the Enum(Gender). how can we achive this is .xaml Note: Male image and Female image nothing but icons.(static)

      R Offline
      R Offline
      Ray Cassick
      wrote on last edited by
      #2

      Can't put my hand on an example right now, but it sounds like it would be a good use for a value converter. Used them before to turn a Boolean into a color, etc... I bet it would work here.


      LinkedIn[^] | Blog[^] | Twitter[^]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups