Pushpin Styles

Mar 11, 2009 at 7:10 PM
I have a pushpin style, where I imported an image, much like yall for the DevPin. However, mine runs sometime-ishly. This moment it will work the next moment it wont. Even some times, Internet Explorer throws an exception saying, Error: Sys.InvalidOperationException: ImageError error #4001 in control 'Xaml1': AG_E_NETWORK_ERROR and it often crashes in firefox. pleaz help me. here is the style...
     <Style x:Name="GranStyle" TargetType="ctrl:GranPin">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ctrl:GranPin">
                        <Grid>
                            <Grid.RenderTransform>
                                <ScaleTransform x:Name="PART_PinScale" />
                            </Grid.RenderTransform>

                            <Image x:Name="PART_Image" Width="64" Height="64" Source="Resources/storeHouse.png" Stretch="Uniform"  RenderTransformOrigin="0.5,0.5" />
                            <Grid x:Name="toolTip" Background="Transparent" ToolTipService.ToolTip="Granary" />
                        </Grid>

                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
Developer
Mar 12, 2009 at 1:39 AM
Edited Mar 12, 2009 at 1:39 AM
I think your issue might be you are using this "style" from different places with in your code?

e.g. maybe in dfferent user controls, that are in different locations with in your project?

so sometime the path to the storeHouse.png is correct and sometimes it is not, depending on where you use the style 

this is just a guess, 
but this "Error: Sys.InvalidOperationException: ImageError error #4001 in control 'Xaml1': AG_E_NETWORK_ERROR"
usually means the path to the image is incorrect and it cannot find/load the image