Select to view content in your preferred language

The name "ConstrainExtentBehavior" does not exist in the namespace "http://schemas.es

1031
1
Jump to solution
09-20-2013 12:57 PM
Labels (1)
JonathanBailey
Frequent Contributor
I created a new ArcGIS Runtime for WPF application. I then went into Blend and added a StackPanel with a nice transition between hidden and shown. Back in Visual Studio 2012, I can run the application and everything works fine. However, if I try to add the ConstrainExtentBehaviour to the map, I get the following error:

The name "ConstrainExtentBehavior" does not exist in the namespace "http://schemas.esri.com/arcgis/client/2009"

The full XAML code is below.

Is it possible that there's a name conflict between the ArcGIS schema and one of the Expression schemas?

Thanks,

Jon.

<Window      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"         xmlns:esri="http://schemas.esri.com/arcgis/client/2009"         xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"          xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"          x:Class="ArcGISWpfApplication2.MainWindow"         Title="MainWindow" Height="350" Width="525">  <Grid x:Name="grid">   <VisualStateManager.VisualStateGroups>    <VisualStateGroup x:Name="VisualStateGroup">     <VisualStateGroup.Transitions>      <VisualTransition GeneratedDuration="0:0:0.3"/>     </VisualStateGroup.Transitions>     <VisualState x:Name="Hidden"/>     <VisualState x:Name="Visible">      <Storyboard>       <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="stackPanel">        <EasingDoubleKeyFrame KeyTime="0" Value="-95"/>       </DoubleAnimationUsingKeyFrames>       <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)" Storyboard.TargetName="stackPanel">        <EasingColorKeyFrame KeyTime="0" Value="#7F000000"/>       </ColorAnimationUsingKeyFrames>      </Storyboard>     </VisualState>    </VisualStateGroup>   </VisualStateManager.VisualStateGroups>     <esri:Map x:Name="_map" UseAcceleratedDisplay="False">             <i:Interaction.Behaviors>                 <esri:ConstrainExtentBehavior ConstrainedExtent="-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892" />             </i:Interaction.Behaviors>    <esri:ArcGISTiledMapServiceLayer ID="World Topo Map" Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>   </esri:Map>   <StackPanel x:Name="stackPanel" HorizontalAlignment="Left" Height="110" Margin="0,209,0,-95" VerticalAlignment="Bottom" Width="{Binding ActualWidth, ElementName=grid}" Background="#00000000"                  RenderTransformOrigin="0.5,0.5">    <StackPanel.RenderTransform>     <TransformGroup>      <ScaleTransform/>      <SkewTransform/>      <RotateTransform/>      <TranslateTransform/>     </TransformGroup>    </StackPanel.RenderTransform>    <i:Interaction.Triggers>     <i:EventTrigger EventName="MouseEnter">      <ei:GoToStateAction StateName="Visible"/>     </i:EventTrigger>     <i:EventTrigger EventName="MouseLeave">      <ei:GoToStateAction StateName="Hidden"/>     </i:EventTrigger>    </i:Interaction.Triggers>   </StackPanel>  </Grid> </Window>
0 Kudos
1 Solution

Accepted Solutions
AaronHigh
Deactivated User
ConstrainExtentBehavior exists in ESRI.ArcGIS.Client.Behaviors, that reference must be added to the project to use the behavior. It's not apparent in the SDK samples, but that should resolve the issue.

View solution in original post

0 Kudos
1 Reply
AaronHigh
Deactivated User
ConstrainExtentBehavior exists in ESRI.ArcGIS.Client.Behaviors, that reference must be added to the project to use the behavior. It's not apparent in the SDK samples, but that should resolve the issue.
0 Kudos