Reputation: 979
I want to show some info about a merchant. I want to put an logo image and a textbox at the same position. If the merchant has a logo, I'll show the logo image, hide the textbox. If the merchant doesn't have a logo, I'll show the merchant name in textbox and hide the logo image. How can I do that in xaml? Thanks!
Upvotes: 2
Views: 2521
Reputation: 30097
You can use Grid
Control for that. Place multiple controls inside exact same Column
and Row
. Then use show hide to display one and hide another.
To show and hide controls use the Visibility
property of the control
Upvotes: 3
Reputation: 176896
if you are working on WPF application
You can make use of WPF canvas control and in that make use of z-index property to show hide your control.
check this for detail : Controlling z-order using the ZIndex Property
Upvotes: 1