How can I hide the US units on the ScaleLine?
<esri:ScaleLine.Template> <ControlTemplate TargetType="esri:ScaleLine"> <Grid x:Name="LayoutRoot"> <Grid.Resources> <converters:ObjectToObjectConverter x:Key="UnitsConverter"> <ResourceDictionary> <sys:String x:Key="Meters">Métres</sys:String> <sys:String x:Key="Kilometers">Kilométres</sys:String> </ResourceDictionary> </converters:ObjectToObjectConverter> </Grid.Resources> <StackPanel HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" > <StackPanel x:Name="MetricNotchs" Orientation="Horizontal"> <Rectangle x:Name="LeftTopNotch" Width="2" Fill="{TemplateBinding Foreground}" Height="5" Stroke="{TemplateBinding Foreground}" VerticalAlignment="Bottom" /> <Grid Width="{Binding MetricSize, RelativeSource={RelativeSource TemplatedParent}}"> <StackPanel x:Name="MetricText" Orientation="Horizontal" HorizontalAlignment="Center" > <TextBlock Text="{Binding MetricValue, RelativeSource={RelativeSource TemplatedParent}}"/> <TextBlock Text="{Binding MetricUnit, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource UnitsConverter}}"/> </StackPanel> </Grid> <Rectangle x:Name="RightTopNotch" Width="2" Fill="{TemplateBinding Foreground}" Height="5" Stroke="{TemplateBinding Foreground}" VerticalAlignment="Bottom"/> </StackPanel> <StackPanel x:Name="ScaleLineBlock" Orientation="Horizontal"> <Rectangle x:Name="NotchsWidth" Fill="{TemplateBinding Foreground}" Height="2" Stroke="{TemplateBinding Foreground}" Width="4"/> <Rectangle Fill="{TemplateBinding Foreground}" Height="2" Stroke="{TemplateBinding Foreground}" Margin="0" HorizontalAlignment="Left" Width="{Binding MetricSize, RelativeSource={RelativeSource TemplatedParent}}" /> </StackPanel> <StackPanel x:Name="BottomNotchs" Orientation="Horizontal"> <Rectangle x:Name="LeftBottomNotch" Width="2" Fill="{TemplateBinding Foreground}" Height="5" Stroke="{TemplateBinding Foreground}" VerticalAlignment="Top" /> <Grid x:Name="PaddingLeftBottomNotch" Width="{Binding MetricSize, RelativeSource={RelativeSource TemplatedParent}}" /> <Rectangle x:Name="RightBottomNotch" Width="2" Fill="{TemplateBinding Foreground}" Height="5" Stroke="{TemplateBinding Foreground}" VerticalAlignment="Top"/> </StackPanel> </StackPanel> </Grid> </ControlTemplate> </esri:ScaleLine.Template>
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.