Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 330719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:42:27+00:00 2026-05-12T09:42:27+00:00

I am designing an application where I basically want to load geographical maps that

  • 0

I am designing an application where I basically want to load geographical maps that are defined using paths (outlines of countries).

The Maps should be displayed on my Window and when I hover each country on the map, it should change color.

I managed to do this partially by exporting an svg map to xaml and including this xaml in a custom usercontrol. My current code is much like the one used to design THIS.

However, I now want to modify the software in such a way that I can:

a) load different maps at runtime; therefore there should be a way to load the paths into my control at runtime.

b) Get the map information in some form of xml file format that would not only allow me to store a map graphic, but also additional data blocks for other stuff/information.

I am really new to WPF and have absolutely no clue about how to go about this…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T09:42:27+00:00Added an answer on May 12, 2026 at 9:42 am

    As a starting point, you could look into dynamically loading a xaml file into a window. for instance, from your Window class code, you can do this (see XamlReader in System.Windows.Markup):

    FileStream s = new FileStream("code.xaml", FileMode.Open);
    DependencyObject root = (DependencyObject)XamlReader.Load(s);
    this.Content = root;
    Button button1 = (Button)LogicalTreeHelper.FindLogicalNode(root, "button1");
    button1.Click += button1_Click;
    

    to load xaml from a file called code.xaml and attach to the click event of a button called button1 contained within that xaml file:

    <StackPanel 
      xmlns=
        "http://schemas.microsoft.com/winfx/2006/xaml/presentation">
      <Button Name="button1" Margin="30">click me.</Button>
    </StackPanel>
    

    Note that the code within code.xaml doesn’t full describe a window, but just what the content of the window is (ie the StackPanel is the top level element).

    I’m sure this is still far from what you’re looking for, but hopefully it’ll be of some help!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm designing an application that will use Oracle , and we have this department
I'm currently designing an application using PHP and MySQL, built on the Kohana framework.
I am designing an application using sockets to connect to each other over the
I am designing an application based on android platform. I want to show Right
Recently I participated in designing & writing of an application which my team was
Suppose you're designing an application (WebApp, Desktop, anything) and you need to define exception
I'm working on an application where the end user defines what columns a database
I'm creating a piece of software (written in C#, will be a windows application)
All of a sudden I'm having a bit of an OO crisis. Over the
Wondering if anyone else has encountered this problem when utilizing the new ability to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.