title: WPF Custom control for receipt preview
body: <p><img src="https://i.stack.imgur.com/dfNY5.png" alt="enter image description here">Hi, </p>
  
  <p>I have a requirement to show receipt preview as part of WPF page. Sample of receipt is attached.</p>
  
  <p>Each line of text on the receipt can have different alignment(some center, some right or left) and color depending on configuration. Also, the number of lines can vary for each receipt type. I am wondering which controls to be used to effectively implement this. I can create labels dynamically in code behind depending on number of lines and align each one differently with different foreground color but just looking for an effective way if there is any. The width of receipt does NOT vary but length may. Font is same for all lines and all receipt types. Any ideas are really appreciated.</p>
  
  <p>Thanks</p>