There really aren't. You're still attempting the same thing only this time your question showed nothing of what you've done and just asked for someone to give you code. This is code you could easily have found using Google as well.
I have a situation here to plot some data. For example there is an event occurs everyday at a particular time. I need to highlight that event in a Date Vs Time graph. There is no need to show a graph with lines. Just needed to highlight the events,thats it. On clicking the event it should go to another window and load its data. Event should also have a tooltip. Is there any controls available for this in WPF ? Please help.
Please help me to create the Row Double Click event for datagrid using MVVM, currently i am using MouseDoubleClick event, using MouseDoubleClick event when we click anywhere on datagrid then that event is firing. Please help me to produce the event only when double click on rows.
Code that currently i am using i.e. MouseDoubleClick event:
In wpf, MVVM Pattern i face the following issue. Did anyone notice this any time?
In page-1(XAML) there are 3 radio button of same group.
and in the corresponding View Model(Page-1 VM) in One method(eg: CreateXYZView()) in which i am instantiating another view(Page -2).
And in the page-2, i have the same set of radio buttons.
Now i have selected one radio button in page-1. And done some action which triggers the method(CreateXYZView()) in the Page -1 VM, which internally creates page-2.
So now my radio button selection in the page-1 is CLEARED(vanished).
Can anyone let me know the reason?
I am using a [RequiresRole("MANAGERS")] in my domainServices to restrict the use of a RIA services. Users are configured via the ASPNET Web administrative tool.
When publish the website, the authentication does not work. I can verify that access to the DB and all files work fine by just removing the [RequiresRole("MANAGERS")] statement
However, If I run the project in debug mode (VS2010) then it works as expected.
May be I am missing something in the web.config. Any other files I need to copy from my project to the website? Any ideas are greatly appreciated.
I thinks so,…It is a silverlight application that uses domainservies and RIA!!!!
In any case, it is always nicer to refrain making comments if there is no benefit to it. There are always nicer users willing to help.
So you don't actually know then? And the only technology you have mentioned in your question is ASPNET(sic) Web administrative tool.. Perhaps you should add more detail about the actual problem, and explain what it has to do with Silverlight or WPF.
Twice in my code. One draws a blue line (which works, exact same code but different collection), and this one draws a yellow line. However, as per my code, it WILL draw the line (although a dotted line, which as actually kind of a cool effect for what I'm going for), but only when I add the +1 to x1.
I have verified all my data is being read. Why is this happening? Thanks.
I have an xsd defined dataset which I use as the data class to send data back and forth between presentation layer and model/controller layer. For the same result, based on user selection of unit: U.S. v.s. Metric, I need to display differently. I am thinking to use xslt for the transformation, any suggestion? the software is an engineering calculator written in c# and used WPF. I have about 1000 data points in each calculation result, the original result is in U.S. units, if user select Metric, I need to flip to metric unit, but don't need to do the calculation again.
It really depends on how you want to display your data. Is it going to change frequently or are you just going to get it once and display it (switching backwards and forwards between the Metric/US version as appropriate). If it's just going to be a one off retrieval of the data and you don't need high resolution of your data, you could simply bind the data directly to the UI and use a value converter (a class that implements IValueConverter) to convert the data to US units if necessary, or just return the raw data if it's Metric.
My dataset is in U.S unit, if user select Metric, I will capture metric input and converted to U.S. units and populate the dataset. The U.S. dataset is passed to model/controller to get the ouptput dataset also in U.S units, before display the result dataset back, if it is in Metric, I need to convert to metric. Currently the dataset is bound to WPF controls, directly e.g. <datagrid> and in U.S unit alone. I am going to look into ValueConverter.
If you convert them yourself, you'll need to convert all of them. You really only care about the ones the user is looking at. If you have 100,000 items and the user only looks at 100, there is no need to do the computations to convert the rest. The IValueConverter will accomplish this for you. It'll only call in to do the conversion on whats needed by the UI. Small optimization, but can make a huge difference in performance.
There's a couple of ways you could do this. One way is to hook into the property itself and call the method when you're changing the value. The other way is to use RX to observe the property and call the method whenever the property changes. There's a pretty decent primer here[^] that should give you a heads up.
Well I implemented this and it doesn't work. I registered the property, compiled, and ran it. Nothing happens. The method I registered doesn't get called. The property IS changed, but the callback doesn't get called.
Too bad, it looked promising.
So here's what I just found....
I have a GridView bound to a list of JobAssignmentEntities and who's SelectedItem is bound to a property in my VM called SelectedJobAssignment.
In the CTOR of the VM I did
propertyObserver = new PropertyObserver<JobAssignmentHeaderEntity>(this.SelectedJobAssignment)
.RegisterHandler(n => n.PhaseStart, n => this.phaseStartChanged(n));
In order to register it the property must not be null, because of a null ref check in the register method.
So I moved the block above inside the SelectedJobAssignment's Getter and it works.
sooo, I will need to find a way to register EACH time the SelectedJobAssignment is set.
Yes, this makes sense.
The PropertyObserver constructor attaches to the current value (this.SelectedJobAssignment) of the passed property.
It does not automatically track if that property itself changes. (I.e., it doesn't notice if this.SelectedJobAssignment changes)
The registration tracks if the referenced property of that value changes. (I.e., it only notices if this.SelectedJobAssignment.PhaseStart changes)