|
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 ??
|
|
|
|
|
|
I want to use validator for validation and warning purpose at entity level, is it possible?
Suppose I have Email-Id property in PersonalDetail entity, Now I have applied two validator 1st is Required validator and second is Length(20).
If user not insert anything in email textbox then validation should fire and stop user to create new deatil, but if user has insert email id but it's length in less then 20, then there will be only warning message, but entity will allow user to create detail...
Is it possible in Silverlight with the use of validator.
|
|
|
|
|
Hi All,
Long time since I posted here! Hope we're all well.
I'm literally on my last day on my current contract and this topic has just been floated!!
I've built a PRISM / WPF / R based application for this contract and they have decided to investigate offering it as a web based thing as well.
Anyway, I've just been having a play with Project Linker and so far I'm seeing it as more of a hinderance than a benefit. Yes it does some fiddling for you but the fact that it will only work WITHIN a single solution (as far as I can tell) is a tad annoying.
I think I'd prefer to have two solutions and manage the linking manually. Crazy???
I've got the team here using ReSharper and it's frankly rendered that more or less useless in terms of reporting false positives on the solution wide analysis. It's annoying already on a tiny test project with two class files! Moving this into production on the app would be a nightmare!
Does anyone have any practical tips or suggestions for using Project Linker in a more useful manner. Right now I'm leaning towards careful manual management of linking files that we want to reuse in both WPF and Silverlight.
If I'm slightly annoyed by it already moving this into production will only compound that imho ...
Jammer
|
|
|
|
|
A word of caution, mate, from the dark side of having done this in the past. If you haven't designed your application for multi-targetting from the get go, there are all sorts of little incompatibility issues that crop up and bite you. The reason is simple - Silverlight is not WPF. WPF provides features that just aren't available in Silverlight, so if you've used any of those features, you have rework to do.
|
|
|
|