This is a migrated thread and some comments may be shown as answers.

New to WPF

1 Answer 55 Views
Map
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 1
Tim asked on 26 Feb 2014, 07:24 PM
I am new to WPF and have developed a RadMap for Silverlight previously using MVVM.

I'm attempting to duplicate this for WPF that can be accessed from the web but I'm not seeing what I expect in the project.

I started out in VS 2010 clicking new Project > Telerik > Telerik C# WPF Application

I added a new WPF page and added the RadMap to it.

I've created the xaml, created the ViewModelBase class etc. Here is what I have so far:

xaml:
<Page x:Class="ccWPF.Centers"
      mc:Ignorable="d"
      d:DesignHeight="300" d:DesignWidth="300"
    Title="Centers">
 
    <Grid>
        <telerik:RadMap x:Name="radMap" />
    </Grid>
</Page>

XAML.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Telerik.Windows.Controls.Map;
 
namespace ccWPF
{
    /// <summary>
    /// Interaction logic for Centers.xaml
    /// </summary>
    public partial class Centers : Page
    {
        public Centers()
        {
            InitializeComponent();
 
            this.radMap.Provider = new BingMapProvider(MapMode.Aerial, true, "myKey");
        }
    }
}

Is there a simple solution someone can attach that would demonstrate this using MVVM available for the web and not a desktop application? I will be binding from SQL Server data.

Thanks,

Tim









1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 27 Feb 2014, 08:56 AM

Hi Tim,

I'm sorry, but I don't quite understand what the problem is. The MVVM pattern does not have any relation to the WPF application runtime environment. There is not any difference in the MVVM pattern implementation for desktop or XBAP applications.

Please, find attached a sample WPF XBAP application that demonstrates ESRI Shapefile, Heatmap and built-in legend support.

Regards,
Andrey Murzov
Telerik

Tags
Map
Asked by
Tim
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or