15,902,492 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 fre_ber (Top 6 by date)
fre_ber
8-Jan-14 10:19am
View
Thanks. I don't have any issues with using the code-behind of the views. At least not yet. I am an MVVM-noob. ;-)
I am using a serializer to store the layout state of these view objects - the main window and all the "workspace" views that it contains. Each "workspace" view has its own view model.
Would it be extremely bad to have the code-behind serialize it every time the layout is changed and make it send the serialized data to the view model for storage until it needs to be saved to a file?
Analogous to that - every time the view needs to lay itself out, it would first query the view model for the serialized data, deserialize it and then apply.
I haven't looked, but I am sure there are either events I can listen to or methods I can override to make this happen. I wonder if it will be overly "heavy" though.
fre_ber
7-Jan-14 12:43pm
View
I feared as much.
The thing is that the view, in this case the Avalon Docking Manager, holds a lot of state information that I need to be able to load and save. The "command" handlers for the load and save operations are in view model class of the main window - where else could they be?
fre_ber
1-Jan-14 14:14pm
View
Great, thanks!
The constraint that the "strings" had to be valid names was something you added, not I. So I am not sure how you'd expect me to anticipate that to be a requirement.
However, your proposed workaround - the first one with an "Undecorator" looks promising. I will try that approach.
fre_ber
1-Jan-14 12:57pm
View
How is your struct defined? You need to give scanf pointers to the char buffers.
Also, you can't simply add strings in C. Is it string concatenation wou want or adding integers?
fre_ber
1-Jan-14 10:49am
View
This looks great! Unfortunately some of these box types include characters that are not valid as names. For example "url ", note the space at the end, and the ones added by Apple such as "©art" with the copyright char at the beginning.
fre_ber
1-Jan-14 10:48am
View
Thanks for the suggestion, but I want the type to be "BoxType". I suppose that I could do that by letting the struct have a non-static uint member and the static members represent instances of the BoxType struct instead of uints. But does this not add quite a bit of overhead? Maybe enums do too in c#, though.
Show More