15,892,005 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by bscaer (Top 11 by date)
bscaer
27-Mar-12 10:08am
View
Thanks very much. That is exactly what I had already implemented. Sorry that I didn't mention it. I was hoping for a clean, MVVM method that didn't involve having to touch two properties to get one value.
bscaer
26-Mar-12 18:43pm
View
"<pre> The XAML:
"open bracket" controls:MyControl
MyProperty="{Binding MyProperty, Mode=TwoWay}" "close bracket"
MyControl class:
public static readonly DependencyProperty MyPropertyProperty =
DependencyProperty.Register("MyProperty",
typeof(byte[]),
typeof(MyControl),
new PropertyMetadata(null)
);
ViewModel property:
byte [] MyProperty {get;set;}
Code on ViewModel that is run when the MenuItem is clicked:
public void MyMenuItemFunction()
{
// Get the up-to-date value of MyProperty from MyControl here
}</pre>
bscaer
26-Mar-12 18:42pm
View
Deleted
<pre> The XAML:
<controls:mycontrol
="" myproperty="{Binding MyProperty, Mode=TwoWay}">
MyControl class:
public static readonly DependencyProperty MyPropertyProperty =
DependencyProperty.Register("MyProperty",
typeof(byte[]),
typeof(MyControl),
new PropertyMetadata(null)
);
ViewModel property:
byte [] MyProperty {get;set;}
Code on ViewModel that is run when the MenuItem is clicked:
public void MyMenuItemFunction()
{
// Get the up-to-date value of MyProperty from MyControl here
}</pre>
bscaer
26-Mar-12 18:41pm
View
Deleted
The XAML:
<controls:mycontrol
="" myproperty="{Binding MyProperty, Mode=TwoWay}">
MyControl class:
public static readonly DependencyProperty MyPropertyProperty =
DependencyProperty.Register("MyProperty",
typeof(byte[]),
typeof(MyControl),
new PropertyMetadata(null)
);
ViewModel property:
byte [] MyProperty {get;set;}
Code on ViewModel that is run when the MenuItem is clicked:
public void MyMenuItemFunction()
{
// Get the up-to-date value of MyProperty from MyControl here
}
bscaer
26-Mar-12 18:13pm
View
Thanks. The problem is that the click is not on the control. The click is on a menu item.
bscaer
26-Mar-12 17:01pm
View
Thanks. That is all correct. My question is how to do I tell the control to update its property?
bscaer
26-Mar-12 16:54pm
View
When the menu item is clicked, I need to tell the control to calculate a value and pass it back to the ViewModel. How to tell the control to calculate the value at that point in time?
bscaer
26-Mar-12 16:14pm
View
I have a dependency property on a control in my View that is bound to a field on my ViewModel. I want the ViewModel to tell the View to update the value for the property.
bscaer
26-Mar-12 16:14pm
View
Deleted
I have a dependency property on a control in my View that is bound to a field on my ViewModel.
bscaer
26-Mar-12 16:13pm
View
Deleted
I have a dependency property on a control in my View that is bound to a field on my ViewModel. I want the ViewModel to tell the View to update the value for the property.
bscaer
26-Mar-12 16:08pm
View
Thanks. I do have a menu command bound to the ViewModel but when that command is executed how does the ViewModel tell the control to update the value of its property?
Show More