Hi Vanya Pavlova ,
I have made some change to replicate the issue, and I also made a screenshot.
It's a pity that I cannot upload the project , I'v tried several times but the forums system still alert some errors.
So I just post the code that I have changed.
MainPage.xaml.cs code:
public partial class MainPage : UserControl
{
public MainPage()
{
// Required to initialize variables
InitializeComponent();
}
private void Button_Click(object sender, RoutedEventArgs e)
{
if (gv.GridLinesVisibility == GridLinesVisibility.None)
{
gv.GridLinesVisibility = GridLinesVisibility.Both;
btn.Content = "HideGridLine";
}
else
{
gv.GridLinesVisibility=GridLinesVisibility.None;
btn.Content="ShowGridLine";
}
}
}
MainPage.xaml code:
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
x:Class="SilverlightApplication17.MainPage"
Width="640" Height="480">
<Grid x:Name="LayoutRoot" Background="White" DataContext="{Binding Source={StaticResource SampleDataSource}}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Button Grid.Row="0" Width="100" Name="btn" Click="Button_Click" Height="50">ShowGridLine</Button>
<telerik:RadGridView Name="gv" Grid.Row="1" GridLinesVisibility="None" ItemsSource="{Binding Collection}"/>
</Grid>
</UserControl>
SampleDataSource.xaml code:
<SampleData:SampleDataSource xmlns:SampleData="clr-namespace:Expression.Blend.SampleData.SampleDataSource" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<SampleData:SampleDataSource.Collection>
<SampleData:Item Property1="Aenean maecenas nam" Property2="True" Property3="Aenean nam" Property4="Class nam" Property5="Class aenean nam" Property6="Maecenas cras class" Property7="Aliquam integer" />
<SampleData:Item Property1="Praesent cras aliquam integer" Property2="False" Property3="Cras aliquam sed" Property4="Maecenas aenean mauris" Property5="Mauris maecenas praesent accumsan" Property6="Curae duis donec" Property7="Cras duis class aenean" />
<SampleData:Item Property1="Sed dis" Property2="True" Property3="Maecenas duis mauris praesent" Property4="Curae aliquam praesent" Property5="Aliquam bibendum" Property6="Praesent nunc" Property7="Maecenas mauris nullam quisque" />
<SampleData:Item Property1="Mauris quisque est accumsan" Property2="False" Property3="Nullam aptent class nunc" Property4="Nullam accumsan" Property5="Nullam dictumst sed dis" Property6="Accumsan bibendum" Property7="Vivamus nam aptent" />
<SampleData:Item Property1="Nullam aptent" Property2="True" Property3="Auctor curae" Property4="Sed donec integer dis" Property5="Est aptent" Property6="Nam amet" Property7="Aliquam aliquet sed curae" />
<SampleData:Item Property1="Class hac vivamus leo" Property2="False" Property3="Amet integer accumsan dis" Property4="Aptent quisque" Property5="Integer quisque curae auctor" Property6="Aenean sed ante" Property7="Praesent accumsan nunc" />
<SampleData:Item Property1="Mus nec duis aliquam" Property2="True" Property3="Ante bibendum" Property4="Auctor etiam congue" Property5="Congue donec" Property6="Dis dictumst" Property7="Amet dis" />
<SampleData:Item Property1="Auctor aliquet" Property2="False" Property3="Congue cursus" Property4="Bibendum est" Property5="Hac cras" Property6="Mauris arcu nullam etiam" Property7="Donec bibendum est" />
<SampleData:Item Property1="Curae non" Property2="True" Property3="Donec dictumst" Property4="Cras cursus dictum" Property5="Vivamus eleifend facilisi" Property6="Fusce lorem" Property7="Dictumst etiam blandit" />
<SampleData:Item Property1="Nunc blandit donec" Property2="False" Property3="Arcu est" Property4="Duis nunc" Property5="Duis nunc" Property6="Diam est" Property7="Auctor eleifend" />
<SampleData:Item Property1="Nunc blandit donec" Property2="False" Property3="Arcu est" Property4="Duis nunc" Property5="Duis nunc" Property6="Diam est" Property7="Auctor eleifend" />
<SampleData:Item Property1="Nunc blandit donec" Property2="False" Property3="Arcu est" Property4="Duis nunc" Property5="Duis nunc" Property6="Diam est" Property7="Auctor eleifend" />
<SampleData:Item Property1="Nunc blandit donec" Property2="False" Property3="Arcu est" Property4="Duis nunc" Property5="Duis nunc" Property6="Diam est" Property7="Auctor eleifend" />
<SampleData:Item Property1="Nunc blandit donec" Property2="False" Property3="Arcu est" Property4="Duis nunc" Property5="Duis nunc" Property6="Diam est" Property7="Auctor eleifend" />
<SampleData:Item Property1="Nunc blandit donec" Property2="False" Property3="Arcu est" Property4="Duis nunc" Property5="Duis nunc" Property6="Diam est" Property7="Auctor eleifend" />
<SampleData:Item Property1="Nunc blandit donec" Property2="False" Property3="Arcu est" Property4="Duis nunc" Property5="Duis nunc" Property6="Diam est" Property7="Auctor eleifend" />
<SampleData:Item Property1="Nunc blandit donec" Property2="False" Property3="Arcu est" Property4="Duis nunc" Property5="Duis nunc" Property6="Diam est" Property7="Auctor eleifend" />
<SampleData:Item Property1="Nunc blandit donec" Property2="False" Property3="Arcu est" Property4="Duis nunc" Property5="Duis nunc" Property6="Diam est" Property7="Auctor eleifend" />
<SampleData:Item Property1="Nunc blandit donec" Property2="False" Property3="Arcu est" Property4="Duis nunc" Property5="Duis nunc" Property6="Diam est" Property7="Auctor eleifend" />
<SampleData:Item Property1="Nunc blandit donec" Property2="False" Property3="Arcu est" Property4="Duis nunc" Property5="Duis nunc" Property6="Diam est" Property7="Auctor eleifend" />
<SampleData:Item Property1="Nunc blandit donec" Property2="False" Property3="Arcu est" Property4="Duis nunc" Property5="Duis nunc" Property6="Diam est" Property7="Auctor eleifend" />
<SampleData:Item Property1="Nunc blandit donec" Property2="False" Property3="Arcu est" Property4="Duis nunc" Property5="Duis nunc" Property6="Diam est" Property7="Auctor eleifend" />
<SampleData:Item Property1="Nunc blandit donec" Property2="False" Property3="Arcu est" Property4="Duis nunc" Property5="Duis nunc" Property6="Diam est" Property7="Auctor eleifend" />
<SampleData:Item Property1="Nunc blandit donec" Property2="False" Property3="Arcu est" Property4="Duis nunc" Property5="Duis nunc" Property6="Diam est" Property7="Auctor eleifend" />
<SampleData:Item Property1="Nunc blandit donec" Property2="False" Property3="Arcu est" Property4="Duis nunc" Property5="Duis nunc" Property6="Diam est" Property7="Auctor eleifend" />
<SampleData:Item Property1="Nunc blandit donec" Property2="False" Property3="Arcu est" Property4="Duis nunc" Property5="Duis nunc" Property6="Diam est" Property7="Auctor eleifend" />
<SampleData:Item Property1="Nunc blandit donec" Property2="False" Property3="Arcu est" Property4="Duis nunc" Property5="Duis nunc" Property6="Diam est" Property7="Auctor eleifend" />
<SampleData:Item Property1="Nunc blandit donec" Property2="False" Property3="Arcu est" Property4="Duis nunc" Property5="Duis nunc" Property6="Diam est" Property7="Auctor eleifend" />
<SampleData:Item Property1="Nunc blandit donec" Property2="False" Property3="Arcu est" Property4="Duis nunc" Property5="Duis nunc" Property6="Diam est" Property7="Auctor eleifend" />
<SampleData:Item Property1="Nunc blandit donec" Property2="False" Property3="Arcu est" Property4="Duis nunc" Property5="Duis nunc" Property6="Diam est" Property7="Auctor eleifend" />
<SampleData:Item Property1="Nunc blandit donec" Property2="False" Property3="Arcu est" Property4="Duis nunc" Property5="Duis nunc" Property6="Diam est" Property7="Auctor eleifend" />
<SampleData:Item Property1="Nunc blandit donec" Property2="False" Property3="Arcu est" Property4="Duis nunc" Property5="Duis nunc" Property6="Diam est" Property7="Auctor eleifend" />
<SampleData:Item Property1="Nunc blandit donec" Property2="False" Property3="Arcu est" Property4="Duis nunc" Property5="Duis nunc" Property6="Diam est" Property7="Auctor eleifend" />
<SampleData:Item Property1="Nunc blandit donec" Property2="False" Property3="Arcu est" Property4="Duis nunc" Property5="Duis nunc" Property6="Diam est" Property7="Auctor eleifend" />
</SampleData:SampleDataSource.Collection>
</SampleData:SampleDataSource>