15,917,859 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 Manish V Mahajan (Top 7 by date)
Manish V Mahajan
12-Jul-11 8:56am
View
Code posted below as the solution. Cheers.
Manish V Mahajan
23-Jun-11 10:41am
View
Thanks, but it would help if you posted a very simple solution using examples in both XAML and the corresponding C# code.....I'm relatively new (only 3 weeks) to C# and WPF so it helps tremendously when people respond by posting simple examples with explanations....see my posted solution below.
Manish V Mahajan
21-Jun-11 10:37am
View
Hi Derin,
Many Thanks for your help. This worked perfectly...the only thing that was missing was to add:
1) popupWindow.Child = dp;
2) Set: popupWindow.Width = 300, popupWindow.Height=300
Cheers man...appreciate the help.
Manish V Mahajan
21-Jun-11 8:07am
View
I would use the Window if I could, but I the functionality has a security restriction from a third party vendor - not sure why, but I am also following up with them on the same. Will take a look @ the Modal and revert if any questions.
Thanks, M
Manish V Mahajan
20-Jun-11 12:43pm
View
Dude, Thanks a lot for this. I wouldn't have figured this out given that I am new to WPF and C#.
Can you kindly recommend any books or references on learning material....this would help greatly....Thanks again!!!
Manish V Mahajan
16-Jun-11 8:32am
View
Dude, you are a genius man....this worked!!!!
I would only ask one additional favor for now...as I am learning C# and WPF....can you recommend any books or materials that I can use to learn. I've been seaching the web for things like this, and it's all bits of information, here and there - which is fine, but would like to get a good foundation and understanding of how things works with some simple examples.
Thanks again for your input!!!!!
Manish V Mahajan
15-Jun-11 16:31pm
View
Please note that the values are being updated via a seperate thread running to simulate data updates from a background process:
driverThread = new Thread(new ThreadStart(updateData));
driverThread.Start();
Not sure why, but I was able to resolve the issue with the Width Property by removing the W1, W2 properties from Class A and directly add them to the TestDataSource ViewModel Object - List<testdata>.
This seems to work for the Width Property only. To further explain what I did earlier....I have a List<testdata.cs> that contains all the data elements and is bound to the TestDataSource in the CollectionViewSource.
In the TestData.cs, I had previously created a custom object BarChart (this is the A object referenced above in the XAML). In the A.cs (also implementing INotifyPropertyChanged), I had W1 as int and B1 as Brush. I removed the W1 and B1 from A and moved it to TestData and changed by Binding references to just W1 and B1 in the XAML - this seemed to work for W1 only...issue with B1...see below.
When I perform the following on the TestData (implements INotifyPropertyChanged) object, I am now getting a Dependancy Issue.
td.W1 = 10....or any other Integer - This updates fine if I comment out the td.B1 from my code.
td.B1 = new SolidColorBrush(Colors.Green) - this fails (Must create DependencySource on same Thread as the DependencyObject.
Why does the Width property change, but I need a DependencySource on the other property? Also, how can I resolve this issue. Thanks,Manish
Show More