Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/silverlight/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Silverlight 使用esri地图中的Sillverlight更改图例颜色和字体_Silverlight - Fatal编程技术网

Silverlight 使用esri地图中的Sillverlight更改图例颜色和字体

Silverlight 使用esri地图中的Sillverlight更改图例颜色和字体,silverlight,Silverlight,如何在Silverlight中更改代码隐藏中的图例颜色: <esri:Map x:Name="Map" Background="White" Loaded="Map_Loaded" WrapAround="True" Grid.ColumnSpan="3" MouseClick="Map_MouseClick" > <esri:ArcGISDynamicMapSer

如何在Silverlight中更改代码隐藏中的图例颜色:

<esri:Map x:Name="Map"  Background="White"  Loaded="Map_Loaded" WrapAround="True" Grid.ColumnSpan="3" 
                              MouseClick="Map_MouseClick" >
                        <esri:ArcGISDynamicMapServiceLayer  x:Name="gisdynamic"  ID="gisdynamic"
                         Url="http://192.168.10.1:6080/arcgis/rest/services/babolsar/Babolsar10/MapServer" 
                         DisplayName="نقشه بابلسر" DisableClientCaching="true" Initialized="Map_Initialized" InitializationFailed="layer_InitializationFailed" 
                         DynamicLayerInfos="{x:Null}" ImageFormat="PNG24" LayerDrawingOptions="{x:Null}" ProxyURL="{x:Null}"  />

                        <esri:GraphicsLayer ShowLegend="false" ID="ResultsGraphicsLayer" />
                        <esri:GraphicsLayer ShowLegend="false" ID="MyGraphicsLayer" />
                        <esri:GraphicsLayer ShowLegend="false" ID="MySelectionGraphicsLayer" MouseEnter="GraphicsLayer_MouseEnter" MouseLeave="GraphicsLayer_MouseLeave"/>
                        <esri:GraphicsLayer ShowLegend="false" ID="IdentifyIconGraphicsLayer"/>

<esri:Legend Name="Legend" HorizontalAlignment="Left" Background="White" Foreground="White" 
                              `enter code here`   VerticalAlignment="Top" Margin="0,0,0,0" Width="300" 
                                 Map="{Binding ElementName=Map}"
                                   LayerItemsMode="Tree" ShowOnlyVisibleLayers="false"  Refreshed="Legend_Refreshed">
                        <esri:Legend.MapLayerTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal">
                                    <CheckBox Content="{Binding Label}"
                                          IsChecked="{Binding IsEnabled, Mode=TwoWay}"
                                          IsEnabled="{Binding IsInScaleRange}" >
                                    </CheckBox>
                                    <Slider Maximum="1" Value="{Binding Layer.Opacity, Mode=TwoWay}" Width="100" />
                                </StackPanel>
                            </DataTemplate>
                        </esri:Legend.MapLayerTemplate>
                        <esri:Legend.LayerTemplate>
                            <DataTemplate>
                                <CheckBox Content="{Binding Label}"
                                     IsChecked="{Binding IsEnabled, Mode=TwoWay}"
                                     IsEnabled="{Binding IsInScaleRange}" >
                                </CheckBox>
                            </DataTemplate>
                        </esri:Legend.LayerTemplate>
                    </esri:Legend>

关于图例颜色和字体更改,以下链接将帮助您。您只需访问它


谢谢,但我想在c#silverlight中更改代码背后的颜色