|
The WPF textbox has a default UpdateSourceTrigger of LostFocus, which means that it only updates it's bound value when the user focuses on another control. By changing the trigger to update when the property changes, it updates it's bound value every time the user enters/deletes/changes a letter. Here is the MSDN page that discusses this How to: Control when the TextBox Text Updates the Source[^] .
Hope this helps
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
|
Great, Glad it helped
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
Every time I look at learning about DP's, I walk away confused.
Anyone know of any decent entry level tutorials?
Everything makes sense in someone's mind
|
|
|
|
|
This[^], IMO, is one of the best reads on Dependency Properties.
|
|
|
|
|
Thank you
Everything makes sense in someone's mind
|
|
|
|
|
Kevin Marois wrote: Every time I look at learning about DP's, I walk away confused.
Anyone know of any decent entry level tutorials?
What's confusing about them?
By now, I assume you are familiar with data binding? Well, as you know... in order for the WPF UI subsystem to know when to update a UI element, it needs to know when the data value has changed. It needs to be able to know that on ANY object, so there needs to be a standard mechanism.
In fact, there are two standard mechanisms.
1) INotifyPropertyChanged / INotifyCollectionChanged - this is how you implement your view models & business objects... typically you'll have your ViewModelBase / ObservableObject base classes and derive everything from them
2) Dependency Properties - Generally, you shouldn't really need to use them in user applications since mechanism #1 is favored for that and DPs are a relative PITA to implement (vs mech #1). They are just objects that are stored by the framework instead of in your object and automatically implement change notification. I generally like to use them in custom controls only.
The benefit of DPs is that you don't need to liter your code with OnPropertyChanged("Foo"); type code.
The downside of DPs is that you have to 1) register them (around 2 to 10 lines of code depending on what options you use) 2) implement getter & setter (just call GetValue / SetValue).
There is a Visual Studio macro that spits out the code, so no biggie.
If you want to hook into the change notification, you need to register a STATIC callback, redirect into your VM, etc.
Just a royal PITA.
Basically, you should only use DP's in controls.
EDIT: there are some features that require use of DPs such as animations.
|
|
|
|
|
Thank you for your excellent response.
Everything makes sense in someone's mind
|
|
|
|
|
Hello guys anyone has the code of how to move an image from one place to another using the mouse in silverlight ? I still want the image that has been moved to another beneath it so that it can also be moved up or reach a certain number.
thanks.
|
|
|
|
|
In general, you should try something before posting a question here.
However, this might[^] help you get started.
|
|
|
|
|
hi i have tha dxv2 software for developing rich wpf projects...
can u give me sample code...
|
|
|
|
|
Are you talking about the DevExpress DXv2[^] controls? If you are, DevExpress always ship sample code - that's where you should start. You can find tutorials for using the controls here[^].
|
|
|
|
|
Hi,
I am relatively new to WPF and C#.
But, I am try to find/build a timeline data view as shown in the following link:
http://i1245.photobucket.com/albums/gg582/atamersi42/Mockup.png[^]
I have huge amount of data (months to years...every 10 seconds) from different data sources.... ( As shown in three blocks in the link)
I want to visualize the the data from three different data sources on a common timeline.
I should then be able to drag the timebars to select a particular window of data. If all the data is present between the timebars it should turn gray.
The requirements are kind of similar to meeting scheduler. I have a SNAPSHOT of the Lotus Notes Meeting scheduler. It is kind of cool as it shows resource availability (also resources are grouped) on a common timeline.
http://i1245.photobucket.com/albums/gg582/atamersi42/LotusNotesMeetingSchedule.png[^]
Can anyone please help me. Thanks a lot.
Amar
|
|
|
|
|
Define visualise, number of record or some other KPI.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Sure...my requirements are similar to the meeting scheduler in the following snapshot
http://i1245.photobucket.com/albums/gg582/atamersi42/LotusNotesMeetingSchedule.png[^]
1. In the above link it has divided Resources into groups(Invitees, Scheduled Rooms, Resources)
2. It has a time scale in hours.
3. Each Row in the group... say...Robert has his availability listed in time. Similarly the availability of Room1, User1, Projector is also listed.
4. Now I know when are all the resources available. So, I drag the vertical green bar to the space where all the resources are available.
5. I can schedule the meeting.
6. I can also adjust the start time and end time by dragging the ends of the green bar left or right.
I hope you got my question.
I am looking for a WPF or Windows Forms project. I could not find any similar project online. I would appreciate any help. Thank you.
|
|
|
|
|
tamersi wrote: I am looking for a WPF or Windows Forms project.
You are expected to write it yourself. People will help you if you get stuck on particular programming issues, but this site does not offer ready made solutions on demand.
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
For DataGrid, why do you like or hate AutoGenerateColumns property? How often do you use it in real apps?
|
|
|
|
|
I don't particularly care for it; it's handy for a quick mockup, but for actual UI's, I'd much prefer to decide which columns to show and how to format them myself!
|
|
|
|
|
I barely use it. I generally like to display custom column headers and using auto generate makes little sense to me.
|
|
|
|
|
hi guy's
I want to develop an application(control pc via wp7 ) but the WP7's screen show the PC's screen.
So how I can do it? what I need (protocol RDP, TCP/IP)???
and how can I do a connection between WP7 and PC?
|
|
|
|
|
You have asked this same question many times, and haven't received an answer yet. Doesn't this tell you that we expect you to work this out for yourself? What research have you done to help yourself?
|
|
|
|
|
A web service would be a possible communication approach.
|
|
|
|
|
Just get a VNC client on your phone and set up a VNC server on your PC. Why waste time reinventing this?
|
|
|
|
|
hi,,
I was wonder how can i show the value of and dealing with other programmatically
For example .. We do it in winfrm like this>>
combobo1.displaymember="name"
combobox1.mebmervalue="no"
how can i do it ??
|
|
|
|
|