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
David Smith
NA
2k
0
WPF Binding: Triggering a command from another method base u
Jun 3 2015 10:27 AM
At the moment, my databinding working base upon the delegate command when buttonColor
is clicked. However, I want to now disable the buttonColor base upon datagrid.
So if the there are no rows in the datagrid which is databind to a datasource,
disable the buttonColor. If there are rows in the datagrid, Enable the button. Can
someone assist me. I almost have the concept of the MVVM and databinding, just need
somemore experience through a lot of small examples.
private Boolean enableColor { get; set; }
private Delegate isColorEnable { get; set; }
Delegate IsColorEnableCommand { get { return isColorEnable ?? (isColorEnable = new Delegate(IsColorEnableCommandMethod, CanColorBeEnableFromModel)); }set { isColorEnable = value; }}
private void IsColorEnableCommandMethod(){ Do Something}
private void CanColorBeEnableFromModel(Object obj){ Boolean isEnable = (Boolean)obj; return isEnable; }
Reply
Answers (
0
)
How to use ribbon control in Visual studio 2012 with .NET 4
Listbox passing value to other window