ThinkGeo.com    |     Documentation    |     Premium Support

How can I make my WpfMap full fill my usercontrol?

Yale,


 I want to use the wpf version of mapsuit desktop editetion . I want to add my WpfMap control to a usercontrol .

I want to full fill my WpfMap  to my usercontrol,which means I want the size of my Wpfmap changed with the size of

usercontrol. so I have to set  the  Width and  Height of wpfMap to Auto, But When I set the Width and Height of wpfMap to Auto,I use the usercontrol  which added the wpfmap ,I can't see the map. When I setthe Width and Height of wpfMap to a certain value ,I can see the map,but When I change the size f usercontrol,the size of map is fixed.


How can I resovle the problem? the follwing is my xaml.


<UserControl

xmlns="schemas.microsoft.com/winfx/...esentation"

xmlns:x="schemas.microsoft.com/winfx/2006/xaml"

xmlns:d="schemas.microsoft.com/expression/blend/2008"

xmlns:mc="schemas.openxmlformats.org/m...ility/2006"

mc:Ignorable="d"

xmlns:ThinkGeo_MapSuite_DesktopEdition="clr-namespace:ThinkGeo.MapSuite.Desk

topEdition;assembly=DesktopEdition"

x:Class="KOTEI.Coco.Map.Map2D.Coco2DMapEngine"

x:Name="UserControl"

d:DesignWidth="1272" d:DesignHeight="1000" >

<Grid x:Name="LayoutRoot" >

<ThinkGeo_MapSuite_DesktopEdition:WpfMap Name="m_wpfMap" MapUnit="Meter"

ZoomLevelSnapping="None" Grid.ColumnSpan="2" Width="Auto" Height="Auto" /> </Grid>

</UserControl>


 I'm excepting your reply! thanks very much!

 



Senlin,


Yes, in WPF MapControl, it cannot do as WinformsMap do. Following post do exactly what you want. Just take a look.

gis.thinkgeo.com/Support/Dis...fault.aspx


Any more questions just feel free to let me know.


Thanks.


Yale