c# - WPF Button with multiple text elements for 10 foot gui -
i trying create buttons 10-foot gui using wpf. each button requires little more data single text string , image, maybe 2-3 strings located in different positions , imagery.
i have tried
<button height="52" horizontalalignment="stretch" name="button1" width="407"> <button.content> <dockpanel lastchildfill="true" horizontalalignment="stretch"> <textblock name="textbloczk2" text="abc" textalignment="left" dockpanel.dock="left"/> <textblock name="textblxock1" text="cde" textalignment="right" dockpanel.dock="right"/> </dockpanel> </button.content> </button>
but no matter inner container use, button seems disregard layout dockpanel , combined text ends in middle of button. doing wrong or should using different outer container ?
try add "horizontalcontentalignment="stretch" verticalcontentalignment="stretch" button. way dockpanel occupy space inside button.
Comments
Post a Comment