TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ashish Goyal
NA
5
5.3k
How do I bind a canvas to a button in wpf. Like clicking button should alter canvas props.
Jul 13 2012 8:14 AM
How do I bind a particular canvas to a button in wpf. Like clicking button should alter canvas props like changing its visibility and all. The problem is that I don't wanna hide/unhide on mouse click event. It should be like canvas changing its property automatically on the mouse click of its button.
The situation is as follows :
I have say 10 buttons and 10 canvas.
On click of button 1, canvas 1 should be visible and others collapsed
On click of button 2, canvas 2 should be visible and others collapsed
On click of button 3, canvas 3 should be visible and others collapsed
.. for all the buttons...
If I write this code in C# seperately toggling between the visibility of all the canvas, then its gonna be a poor code.. Isn't there some way to do it in xaml using bindings, or triggers, or even custom controls.
Reply
Answers (
0
)
How to implement refresh/stop functionality like Google chrome in WindowsFormsHost browser in wpf.
How to use IPv4InterfaceStatistics class in wpf?