|
i checked the XAML in depth & found that it is not related with the XAML. It is dynamically created from the code behind. I am unable to findout the same.
can anybody please guide me to resolve the issue?
Regards,
- Kunal Chowdhury ( My Blog)
|
|
|
|
|
Hi all.
I want to create a Silverlight graph that plots data by getting them from a database when the user enters them from the UI. I hope to use LinQ to SQL to do this. I am also using Visual Studio 2008 .NET 3.5, SQL Server 2008.
Can anyone help me? Feel free to ask me for any additional info that might be of help.
|
|
|
|
|
I'm sorry, but you're unlikely to find anybody willing to write the amount of code for you that you seem to be requesting. You have all the right ideas, but it seems that you lack the SL capability/inclination here - if that's the case, start off with a smaller application and get your head round that at first.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Well, I'm not really requesting anyone to write the full code for me, but rather give me a head start and guide me along. Sad to say, it's quite an urgent and rushed project for me, so I don't really have time to "get my head round silverlight" anymore.
|
|
|
|
|
burger87 wrote: it's quite an urgent and rushed project for me, so I don't really have time to "get my head round silverlight"
Ouch. Right, let's start by working out what you do know - out of the list you provided, what are you comfortable with? For instance, are you thoroughly versed in LINQ?
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
I'm glad you're helping.
Another big ouch, I'm versed in neither. I'm only slightly comfortable in C# and that's it. I've done a few tutorials on creating simple charts and a simple Silverlight application that gets data from WCF using LinQ to SQL.
|
|
|
|
|
burger87 wrote: I've done a few tutorials on creating simple charts and a simple Silverlight application that gets data from WCF using LinQ to SQL.
So, you've got the basics there. If you are using the Silverlight Toolkit charts, this page has some useful samples to demonstrate how to populate the charts[^].
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Oh I see. However, if I'm not mistaken these charts' values are hard-coded right?
|
|
|
|
|
burger87 wrote: Oh I see. However, if I'm not mistaken these charts' values are hard-coded right?
That's right. You can retrieve these values using LINQ. You need to put them into a dictionary, as in:
var result = mySql.OrderBy(res => res.Value)
.ToDictionary( res => res.Name, res => res.FloatValue); This example supposes that your key string name is called Name and your numeric value is stored in your database as FloatValue . All you need do then is apply this with the DataContext, e.g.
chart.DataContext = result;
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
What is a dictionary and DataContext?
|
|
|
|
|
|
Thanks for the links SunilUrs, but I forgot to mention that I cannot use Visifire for my project.
|
|
|
|
|
You might want to check out my blog post here[^]. You might find it illuminating.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hey Pete(is that your name?). A very big thanks for the sample code. It's very helpful. A few questions that needs clarification.
1) What is an ObservableCollection? Is it similar to a container?
2) For the DataContext, what do you mean by "bind to the collection"? Do you mean the ObservableCollection?
3) If I use the database's values to update the chart instead of using ObservableCollection, do I still need to make use of ObservableCollection?
4) What is MVVM? I'm interested. Does it help my situation in any case?
Hope you can shed some extra light there.
|
|
|
|
|
burger87 wrote: Hey Pete(is that your name?).
Yes.
burger87 wrote: 1) What is an ObservableCollection? Is it similar to a container?
An ObservableCollection is a specialist collection that's designed to support data binding in WPF and Silverlight. Basically, when you add or remove an item from this collection the collection notifies the binding engine that values have been added or removed.
burger87 wrote: For the DataContext, what do you mean by "bind to the collection"? Do you mean the ObservableCollection?
Yes.
burger87 wrote: If I use the database's values to update the chart instead of using ObservableCollection, do I still need to make use of ObservableCollection?
Seriously, use the collection - create a model that encapsulates your database values and put this into your collection. Don't cause problems for yourself; use the tools available.
burger87 wrote: What is MVVM? I'm interested. Does it help my situation in any case?
MVVM is a pattern - it stands for Model-View-ViewModel. Basically this pattern is designed to work with Silverlight and WPF. Google it to find out about it, and read the samples and articles (I have a WPF version here[^]).
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
I am trying to make a dissolve in-out effect for my image but I have no idea how to do it.
Does anyone have any ideas?
Thanks a lot.
|
|
|
|
|
Yes - use the Wpffx[^] library on Codeplex.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Use a storyboard.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hi,
I am using the Calendar control from the WPF toolkit, to display events based on values in an MS Access Table.
I customised the method decribed in the RedLetterDay example in this article, by placing my Select staement in the IValueConverter.
As a result, the performance is very slow, as it is making a seperate db connection for each day rendered in the calendar.
I takes approx 25 seconds to load, how can I reduce this time?
Thanks,
Glyn
|
|
|
|
|
Do you retrieve the items only once, or every time? To be honest, I wouldn't look at using that as a starting point because it's not a brilliant example.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
I am retrieving the items every time (i.e. for every day displayed on the calendar), which is why it's slow.
You say that the example is not a brilliant example, do you have a link to a better article?
How do I retrieve the data onle once? Do you have any examples?
Can the date be collected in the code behind, and bound the the calendar?
|
|
|
|
|
Hi,
In my silverlight application I need to call a WCF service. I have to pass a string variable as input and return an array list from the WCF service.
If anyone have any idea how to call WCF service or pass perameters to the WCF service please reply me.
Thanks in Advance.
|
|
|
|
|
If you are using Visual Studio 2008, you need to install Silverlight Tool for Visual Studio. You will see the Silverlight Project template in "New Project" dialog after installation.
1. Chose Silverlight Application and check the check box for ASP.NET project for hosting Silverlight.
2. Add Silverlight-Enabled WCF service in ASP.NET
3. Write a method with parameter and return the array list that you want.
4. Build the ASP.NET project
5. Add this service as a service reference in Silverlight project.
6. then, you will be able to see the method that you write in Silverlight-Enabled WCF service
Hope it helps.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
Microsoft MVP (Silverlight), WPF/Silverlight Insiders
|
|
|
|
|
|
i have an asp.net website. I am also having a wpf application. I had published the wpf application and has a url which can be directly opened from ie explorer when pasted on its url window. now how can i open this wpf window from website in the same window. i have been trying to do it through response.redirect but could not do it.
|
|
|
|