Map Navigation Control Approach - .NET - c#

I'd like to know what could be the best approach to develop a Windows desktop application that has a map navigability control - very similar to those in Google Maps and Live Maps, with drag and drop support and so on.
Initially, due to time restrictions, I was thinking about a WinForms solution - I think one future solution using WPF would be better, but I'd have to learn all that WPF stuff first.
With that in mind, what approach should I take to develop that? It could be a third part tool, or some simple implementation/algorithm that I could take some ideas from. To be honest, I'm kinda lost, so any idea would be helpful.
Thanks, have a great day

take a look at this codeplex project. Reviewing the Source and downloading the sample project should be a good start.
GMap.Net # Codeplex

There is open-source application Kosmos for browsing OpenStreetMap maps
http://wiki.openstreetmap.org/wiki/Kosmos
However it reads OSM data and renders it on the fly.
I guess you need some example which loads map tiles and put them in the right order. There is such an example for OpenStreetMap: project osmclient on the sourceforge (sorry cannot post a link, i am a newbie)
It can be simply redone to load other sources, even ArcGIS, but be sure if it is compatible with the Map Provider licence. E.g. you cannot choose Google Maps, because you must use Google Maps within their API.

Related

Pull to Refresh UWP - Grid view?

Could someone please advise me on the "correct" way of implementing Pull to refresh on UWP?
Below are some examples I've found however I'm not sure which one is using the best approach:
Microsoft sample which is for a ListView - This works however it is specific to the ListView Control
AmazingPullToRefresh is a NuGet package that also works however it is somewhat limited in terms of styling
PullToRefreshUWP_WindowsComposition is another example however it works differently to the other two as it does not use an extension class
Any advice is much appreciated
There is no standard answer for this question, basically, there are two points we need to implement:
Get the offset changes when user pull something on the control
Generate some indicator to notify user
Both XamlPullToRefresh and PullToRefreshUWP_WindowsComposition use the new Windows Composition API: Windows.UI.Composition namespace
Ref Windows.UI.Composition Overview
The API is a powerful supplement to existing frameworks such as XAML
to give developers of UWP applications a familiar C# surface to add to
their application. These APIs can also be used to create DX style
framework-less applications.
Please notice that this API works only on Windows 10.
While AmazingPullToRefresh uses Manipulation API and implement all things by calculating offset changes. A similar implementation can be found here
If you want to implement a cool pull-to-refresh control, I would recommend using the Windows.UI.Composition API. You can get start from here
The functionality of pulling to refresh is not used by microsoft.
Reloading a page / data is something we have still in our mind from thinking apps like a website.
Why not have a synced database and alway update your UI with the data which got changed in your local db? For eg. see firebase.google.com
If you want to implement this feature anyway there is not really a way to go.
I have used the PullToRefresh.UWP library from NuGet. For a tutorial see:
codeproject.com
With some tweaking it works but sometimes when I lift my finger of the screen after pulling down the bar won't go up again.
So the answer is: Sorry, but nobody can give you an answer on how to do this the "correct" way. But is there a correct way anywhere? Like almost always in programming. It depends on the case you will use it.
Hope this will help you.

Using Monocross on Windows Phone 7 with Panorama and/or Pivot control

I love the Monocross idea but am a bit lost for Windows Phone 7 when I want to use a Panorama and/or Pivot control. The only view provided is the Page view. So navigating from one page to another works great! But now I want a Pivot or Panorama. Basically I could create a new controller for this view, but do get the "pages" inside the controls. The navigate does really Navigate to it, but not inside the Pivot / Panorama.
For Monotouch and MonoDroid samples have been prepared how to do this (basically a new viewcontroller was created). But WP7 has been left behind.
Anybody?
I am also doing cross platform development using mono and like you and many others face the problem of what to do with respect to the user interface and other underlying hardware integration.
I decided that I did not want to be at the mercy of yet another third party framework (mono is enough) and researched for a solution that I could build and maintain myself. The new MVVM pattern along with Expression Blend is really cool but soon you find yourself stuck when it comes to cross platform development.The MVC an MVP patterns also did not seem to suit what I needed. Finally settled on the PM pattern and expanded it into a PMH where the H is for hardware. To achieve what I needed I had to abstract the fundamental widgets (buttons, panels, textboxes) into a underlying platform layer for each device type. My platform layer represents around 1% of my code base and allows me to skin the application for each device I target it for.
For my WP7 solution I use hardly any HTML only around 25 lines which is enough to initialise the application and the main page. The rest of the user interface is put together programmatically just like I would in WinForms. On WP7 I still make use of the Pivot control as it really is pretty groovy and am modelling a similar control for use on Android/iPhone. While it wont be 100% the same it will be very similar and still use the same navigation engine within my core code.
I am not complete with my development yet but so far I am very happy with my progress. I have been developing user interface for Windows application for some 20 years and I never use the interface builder tools as I find they never give me what I want and really waste my time (Blend is pretty cool though) and also create a tremendous code bloat especially in Blend.
I can't entirely help with monocross - I did do a sample for droid once - https://github.com/slodge/monocross-tab-activity-view - but I never completed the wp7 part of that.
For mvvmcross... which is related... there's a couple of samples - one in the tutorial (a bit hacky!) and one in the conference app - much the preferred sample.
The basic technique I choose was to use sub-viewmodels for each "tab" of the panorama - see how the databinding DataContext is set for each Item in https://github.com/slodge/MvvmCross/blob/master/Sample%20-%20CirriousConference/Cirrious.Conference.UI.WP7/Views/HomeView.xaml
Note that in a bigger app there may be important memory issues to consider when doing this - especially when using a pivot control which does not load all pages into memory at the same time (so you don't really need to load all viewmodels either)
Some bloggage on the conf app: http://slodge.blogspot.co.uk/2012/03/update-on-mvvmcross-sqlbits-conference.html
And the final sql bits source: https://github.com/slodge/MvvmCross/tree/master/Sample%20-%20CirriousConference

A good 2D-primitive rendering library for C#/.NET?

I'm developing a C#/.NET application (Winforms/WPF, not entirely decided yet) which needs to display simple diagrams: boxes/"text boxes", lines/arrows, circles, text etc...
Some items on the diagram need to be clickable/selectable, allowing me to display e.g. a dialog for filling in data on the selected item.
I guess the diagram display could all be done from scratch using e.g. GDI+, but before going down that path I would like to ask for input/suggestions on existing libraries to use (commercial or free)?
I've already tried to google for suitable libraries, but found mostly 2D game-engines or "graph/chart"-rendering libraries. Neither seem to fit my requirements.
Best regards,
Søren
Even if you said you looked already into "graph/chart" libraries. What about Nevron Diagram? The only drawback would be that it is not free, but it doesn't cost that much.
I have used Piccolo2D for Java, but they aslo have a .Net version, and it's community driven.
The only problem is, I don't know how updated the .Net version is or give any comment on how well it works (.Net version).

dynamic loading in silverlight

Ill explain a little bit of my project here. I'm trying to make a website in silverlight, my goal is to store all the content in external files, and load them after my silverlight app has loaded. for instance, load the home page, then, while the user is browsing the home page, load the other pages in the backround, and then when a link is clicked, the main content will fade out, and the new page will then fade in its place. My question to you guys is:
whats the best way to create the external files? how should they be created/saved?
how can i load them in the backround while the user is browsing, and then display them by fading when a link is clicked?
how can i add features, for my silverlight app to edit, and re-save the files,for instance, adding a picture to a picture gallery and such
any help would be greatly appriciated. the code-behind of my app is in C#, but im new with the whole silverlight idea, so pretty much any advice at this point would be very welcomed!!
My suggestion for this scenario is using a MEF (Managed Extensibility Framework).
It's provide Dynamically Loading a .XAP, Downloading Based on User Interaction, and other's features out of the box. So, I think, use the MEF it's easyest way approach load-content-on-demand scenario.
You don't mention what sort of content you are dealing with. If it's markup (markdown) and images it should be pretty simple
Log every actual content request, and use that data to rank the order you pre-load the cache in. This way the system is self tuning. If there are complex paths to traverse, consider using a neural network process to determine what to pre-load
Silverlight uses the standard browser HTTP request methods and hence cache, so all you have to do is request a resource and it will be cached
You seem to be describing a wiki (editing pages in Silverlight etc). Consider using an existing wiki engine e.g. screwturn.eu and customising the display and editing interface to work via Silverlight. This will save an enormous amount in versioning, resource management, security etc
Similar to the Managed Extensibility Framework which FFire mentioned, you may also want to look into Prism V2. Heres some resources to get you started and find out if its for you.
WPF/Silverlight - Prism - Resources for beginners
from that list heres a good list of example videos about silverlight, modularity, regions etc.

Desktop Version of Google's Annotated Time Line Component?

I've been using Google's Annotated Time Line Visualization component for the last couple of weeks and I love it! I've been able to make plots with about 10k points without much trouble.
Do you know of a desktop component I could plug into my application that delivers the same WOW factor that Google's component does? I don't care what the language/toolkit is. I prefer C#,Java,Ruby,C++ or Python... (in that order) however any other's would apply. I also prefer it to be free and open source, but if it's not that's OK as well.
Thanks for your time!
Note: This doesn't have to be cross-platform. Windows is fine.
Edit (2009-08-07):
Even if I can only plot 10k points, I am fine with that. I would just like a desktop control that delivers the same "wow" factor and works in a similar manner (zooming, scrolling, annotations, etc) that the Google component does.
Edit (2009-09-03):
I really prefer the language to be C#. I started a bounty to see if anyone can find some good ones. I want it to be almost identical to Google's Annotated Timeline Component. I would use Google's Component, but I want a desktop component... and I don't want to run into performance limitations because of the browser. Using Adobe Air is out of the question.
Edit (2009-09-03):
Do not recommend Visifire. I have evaluated it, and it doesn't support zooming. Remember, it must be very close to Google's component in terms of functionality and "wow" factor.
This WPF-based chart control at codeproject may put you in the right direction. It's got smooth panning/zooming/scrolling :
WPF Chart Control With Pan, Zoom and More By John Stewien
If you're needing to plot millions of points, you're going to run into performance issues quickly if the control doesn't have a mechanism for loading/sampling only what it needs to display. Even then, that's a very large number of data point to want to access in one control.
Hm i am not sure if this is what you are looking for, but for java there is the very good library JFreeChart which is not exactly as interactive as the one you mentioned but it is really easy to use and pretty flexible for you to subclass and tweak to your preference.
Perhaps you could take a look at matplotlib. It's a python based library, however it's very flexible in that it can take it's input from a variety of sources.
An alternative is to embed a web browser control in you wpf application. You'll probably need access to the DOM, so you might have to use the WebBrowser in a WinForm. A good article descibing how this is done can be found here.
Microsoft also has free chart control you can get at http://www.microsoft.com/downloads/details.aspx?FamilyId=130F7986-BF49-4FE5-9CA8-910AE6EA442C&displaylang=en. It's pretty good--especially for being free.
I have used Dundas charts in the past. They are excellent but pricey. There are several other vendors with good chart controls including DotNetCharting, Telerik, Component Art, and Infragistics.

Categories

Resources