Register  |  Login
ThinkGeo - GPS Tracking and Mapping Solutions  |  Visit the Wiki  |  Find us on: Twitter Facebook Google+ LinkedIn

Discussion Forums

The online community for users of Map Suite GIS components

Change the map size dynamically
Last Post 07-19-2010 12:41 AM by Howard. 1 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
RaquiburUser is Offline
Level 3
Level 3
Posts:70
Avatar

--
07-16-2010 12:16 PM

Hi,

 

I want to change the size of the map dynamically whenever parent window size change. I write the following code to do that 

 

void Window_SizeChanged(object sender, SizeChangedEventArgs e)          {              if (IsLoaded)              {                  wpfMap.Width = e.NewSize.Width;                  
wpfMap.Height = e.NewSize.Height;                  
wpfMap.Refresh();              }          }

 

but it is not working? What should i do to change the size of the imaged based map.

 

Thanks

Raquib

 

HowardUser is Offline
MVP
MVP
Posts:1406
Avatar

--
07-19-2010 12:41 AM
Hi Raquibur,

You don't need to write the size changed event because the map's size is automatically changed with its parent; I just have 2 things to point out that all of our how do I samples are following these two rules:

1, Map's parent needs to be some panels like grid which allows its child fit its size.
2, Remove the specific width and height value of the map.

Please let me know if there is any misunderstanding.

Thanks,
Howard
You are not authorized to post a reply.

Active Forums 4.2