This is a migrated thread and some comments may be shown as answers.

Add fullscreen button in RadMap Navigation Bar

2 Answers 117 Views
Map
This is a migrated thread and some comments may be shown as answers.
Evgenia
Top achievements
Rank 1
Evgenia asked on 09 Apr 2010, 12:11 PM
Hello,

 Adiing buttons in Silverlight Bing Maps Control Navigation Bar is quite easy. But In your map control it's complicated to me. I would like to have button for toggle fullscreen. Could you please lend me a hand with this?

2 Answers, 1 is accepted

Sort by
0
Evgenia
Top achievements
Rank 1
answered on 13 Apr 2010, 02:59 PM
No ideas?
I can add custom buton over my map but how to make it part of Rad Navigation?
0
Giuseppe
Telerik team
answered on 13 Apr 2010, 05:25 PM
Hi evgenia,

The current version of RadMap does not expose API that would allow you to add custom controls to the default command layout but you can achieve the desired effect by setting the RadMap.UseDefaultLayout property to false, and constructing the desired command layout like this:

xmlns:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
xmlns:map="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.DataVisualization"
xmlns:maps="clr-namespace:Telerik.Windows.Controls.Map;assembly=Telerik.Windows.Controls.DataVisualization"

<Grid x:Name="LayoutRoot">
 
    <map:RadMap x:Name="RadMap1" UseDefaultLayout="False" ZoomLevel="7" />
 
    <Grid HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="5">
        <Grid.Resources>
            <LinearGradientBrush x:Key="MapDefaultLayoutBackground" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#995B5B5B" Offset="1"/>
                <GradientStop Color="#66868686"/>
                <GradientStop Color="#994F4F4F" Offset="0.5"/>
                <GradientStop Color="#E50E0E0E" Offset="0.51"/>
            </LinearGradientBrush>
            <LinearGradientBrush x:Key="MapDefaultLayoutBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FF343434" Offset="1"/>
                <GradientStop Color="#FF6C6C6C"/>
            </LinearGradientBrush>
            <LinearGradientBrush x:Key="MapDefaultLayoutOuterBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#998C8C8C" Offset="1"/>
                <GradientStop Color="#B2FFFFFF"/>
            </LinearGradientBrush>
            <CornerRadius x:Key="MapDefaultLayoutCornerRadius">4</CornerRadius>
            <CornerRadius x:Key="MapDefaultLayoutOuterCornerRadius">3</CornerRadius>
        </Grid.Resources>
         
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
 
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
 
        <Border Grid.Row="1" Grid.ColumnSpan="4"
                Height="34"
                BorderThickness="1"
                BorderBrush="{StaticResource MapDefaultLayoutOuterBorderBrush}"
                CornerRadius="{StaticResource MapDefaultLayoutOuterCornerRadius}">
            <Border Background="{StaticResource MapDefaultLayoutBackground}"
                    BorderThickness="1"
                    BorderBrush="{StaticResource MapDefaultLayoutBorderBrush}"
                    CornerRadius="{StaticResource MapDefaultLayoutCornerRadius}" />
        </Border>
 
        <maps:MapCommandBar MapControl="{Binding ElementName=RadMap1}"
            Grid.Row="1" Grid.Column="0" Margin="6,0,6,0" />
 
        <maps:MapNavigation MapControl="{Binding ElementName=RadMap1}"
            Grid.Column="1" Grid.RowSpan="3" />
 
        <maps:MapZoomBar MapControl="{Binding ElementName=RadMap1}"
            Grid.Row="1" Grid.Column="2" Margin="6,0,6,0" />
         
        <controls:RadButton Height="26" VerticalAlignment="Center" Content="Fullscreen"
            Grid.Row="1" Grid.Column="3" Margin="0,0,6,0" />
    </Grid>
</Grid>


Hope this helps.


Best wishes,
Freddie
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Map
Asked by
Evgenia
Top achievements
Rank 1
Answers by
Evgenia
Top achievements
Rank 1
Giuseppe
Telerik team
Share this question
or