WPF chart control: OxyPlot documentation - wpf

I'm looking for a simple, free charting control for WPF. After some reading (e.g. WPF chart controls), I had a look at OxyPlot: http://oxyplot.codeplex.com/
It looks very promising and well done: did you ever use it? Can you suggest a place to find some additional reference (that on the website seems to be still incomplete)?

I started to use this library as well. Until now I like it.
About the documentation, I agree it is indeed quite poor. Probably the best you can do is to explore the code of the examples that you find in the project. I can say I could find all the code I need.
By the way the only small problem that I have had until now is visible in picture. It happens with a large number of points (e.g.. > 1000).
EDIT:
this problem happens when LineJoin is set to OxyPenLineJoin.Miter;
it can be solved by
LineJoin = OxyPenLineJoin.Bevel;
or
LineJoin = OxyPenLineJoin.Round;
Hope this helps

Related

Drawing app - the easiest design

Well, I'm a newbie. I'd like to write an app in WPF. The main purpouse will be in drawing predefined elements/objects. Input from user is mostly realized by text boxes - numbers. But I'd like to add some kind of user input into drawing itself too + zooming and moving. Next functionality will be in saving the draw for later loading and another editing (printing maybe, but it's far far away).
I can imagine something like this:
due to some user interaction I'd prefere to use of InkCanvas
i want to define my own elements/objects with some properties. But where it will be define? Some external file maybe?
the save file will be composed of XAML code only
I will study this more lately, but I want to know if my thoughts are in the right way.
Are these points correct, or completely bullshit? :)
Thanks, and sorry for English...
I don't know if this is exactly what are you looking for, but here a little list of advice to help you on reaching your goal:
First of all, if you are crating an application, you should see this before. It explain the Model-View-ViewModel pattern, which is essential when you are creating something on WPF. This can help you abount your 2nd point.
Regarding your save file, i don't know exactly what you have in mind, but it depends on what do you want to save exactly. If you want, InkCanvas have the option to export directly the work in a bitmap . If you need to store some setting, depending on your need you can work with Settings or Resources
InkCanvas seems the appropriate tool for your need. Of course you will have to build your app around this control

How to configure the HubTile control width in Xaml

I'm trying to set the size of the a HubTile control from the Silverlight toolkit, but it always use the default size of 173.
There is anyway that can be used to change this property ??
Thanks,
Georges Benatti Jr
Since this is is a Q&A site, I'll try to be helpful.
To do what you want, you need to change the style and visual states and transitions like joseharriaga suggested. Since you obviously do need it, I suggest you take a look at my blog post in which I covered that scenario, and even gave a link to the HubTile styling example that changed it's size to 300x300.
http://igrali.wordpress.com/2011/08/19/how-to-use-the-hubtile-control/
You can change it to whatever you like from there.
Regards
I'm not sure if this is possible but you have the sourcecode and you could use some styling, but remember to make sure it fits in the metro ui. It has this default size so it fits to the whole look and feel of the phone. Changing this might make it more difficult for the user to navigate your app. Sorry i can't help you more specific at the moment. I'm on the go.
Changing the size of a HubTile to something else than it's default 173 x 173 size is not supported.
That was done to be Metro-compliant, so that it matches the original user experience.
Still, you can get the source code and modify the 173 values in the Control Template, Visual States and Visual Transitions to the value you're looking for, but I would only do this if I really need the tile to be sized differently and there's no way around it.
Ideally, I'd stick to the default size, so that my app looks like it's a native app, making it feel part of the phone itself.

Silverlight - Highlight List<> of words/prhases within TextBox

I am new to Silverlight and have a requirement to highlight (or change font color) all words and phrases wtihin a TextBox that match a list of words/phrases. At first I though this would be easy, but the more I look into it, the more confused I get.
My goal is to write something reusable so I can also apply the logic to a RadGridView later. I've seen a few examples of stuff close to what I need, but it's beyond my Silverlight level at this point.
I want to write this myself to get a better understanding of how some of the Silverlight internals work. Can someone point me in the right direction of where to start on something like this? Should this be implemented in a control? Should I use a behavior? I'm using Silverlight 4.
Once I know where to start, I am sure I can get this done - with some help from you guys of course ;-)
Thanks,
-Scott
How about using the RadRichTextBox (I assume you have a licence for it as you mentionned the RadGridView)?
There's also a good sample project on Telerik forum that is doing exactly what you want to do.

Silverlight template selector solution works great, but not blend able

Before I begin here is a reference to how I implemented a template selector with Silverlight.
http://geekswithblogs.net/tkokke/archive/2009/09/28/datatemplateselector-in-silverlight.aspx
Everything works great. But the solution just doesn't work in blends making things more difficult to visualize overall. Is the correct work flow to just create a UserControl from the contents and embed it inside the Resource Dictionary to make it blendable, or is there a better way to do this?
Either way, I'm asking this question and posting the Template Selector solution at the same time, because I found it useful. Better solutions are very much welcome.
fyi.. sl4,.net4, latest blends.. all the new toys.. using mvvm light(little relevance).
I would recommend you go with the the following kind of implementation: DataTemplateSelector on CodeProject.
The drawback of the link you posted is that the location and name of the templates are hard-coded in the ContentControl's implementation. With the approach provided in the article I link to, the data templates are accessed in-line, or by regular {StaticResource} references (which means more flexibility), and on top of that, Blend knows what to do with that.

Silverlight DRY when animating multiple UserControls on main Navigation page

Starting with Silverlight development. Yet to read a good Silverlight book: suggestions welcome.
I have a main GUI screen where 7 user controls (menu items) 'swoop' into sight, all along their own path. I have the user controls nicely seperated and behaving well. Having multiple storyboards (1 each for each menuitem) with multiple keyframe animations (X,Y,height, width) in one .XAML is not sitting well with me. Repeating all those property values is hideous, neverthemind maintenance.
I've tried to move values into the app.xaml and set animation durations with style keys, but having limited success. Can anyone suggest a nice way of making this cleaner? Refactor the storyboards out to their own control? Property values in resources? Dynamic building in codebehind?
Referring me to a how-to site is fine as well.
You may be falling foul of XAML overload. It seems that most developers, when starting with WPF or Silverlight, feel everything should go into XAML that can go into XAML. They then get to a point where they're fighting with the XAML to get something done that would take moments in the code-behind (I too have hit his issue).
If you're finding something cumbersome or ugly in XAML, consider writing it in code. It's not a crime. You can probably declare a single method for creating your storyboard and then use it multiple times, or you could create a class that wraps your storyboard and add multiple instances into XAML in much neater ways. As you have quite rightly identified towards the end of your post, there are multiple ways to make it cleaner, you just need to decide which one suits your situation.
Without some example XAML, it's difficult to visualize the exact issue you face, so I couldn't make a distinct recommendation, but I hope this helps. I like the sound of your swooping controls - the image I have in my head is quite nice indeed.

Resources