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

Theme Visual Studio 2013

4 Answers 73 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Gerard
Top achievements
Rank 1
Gerard asked on 12 Jun 2017, 02:39 PM

Hi,

Following the steps of the documentation I installed the theme of visual studio 2013:

http://docs.telerik.com/devtools/wpf/styling-and-appearance/styling-apperance-setting-a-theme-overview

The problem I have is that it works for me in all grids except one that I have filters (I do not know if it has anything to do with). 

As you can see in the picture 1.png works fine.

In the 2.png image we can see that the theme is applied in the grid header, but the shading and selection are of a different color (I guess the default theme). The same thing happens in the 3.png image that belongs to RadContextMenu, the shading is not of the visual studio 2013 theme.

<telerik:RadGridView Grid.Row="1" Name="DatagridResults" FilterOperatorsLoading="DatagridResults_OnFilterOperatorsLoading" Filtering="DatagridResults_OnFiltering" Filtered="DatagridResults_OnFiltered" ItemsSource="{Binding OptimizerResults}" helpers1:BarLogColumnsBindingBehavior.Columns="{Binding ResultsOptimizerColumns}" Loaded="DatagridResults_OnLoaded" MouseDoubleClick="ResultsOnMouseDoubleClick" Sorting="DatagridResults_OnSorting" Sorted="DatagridResults_OnSorted" ShouldCloseFilteringPopupOnKeyboardFocusChanged="True" IsReadOnly="True" ShowGroupPanel="False" CanUserDeleteRows="False" CanUserInsertRows="False" AreRowDetailsFrozen="True" CanUserReorderColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False" RowIndicatorVisibility="Collapsed" IsFilteringAllowed="True" EnableColumnVirtualization="True" FrozenColumnsSplitterVisibility="Collapsed">
    <telerik:RadContextMenu.ContextMenu>
        <telerik:RadContextMenu ItemsSource="{Binding MenuItemContextMenuItemsCollection}" >
            <telerik:RadContextMenu.ItemContainerStyle>
                <Style TargetType="telerik:RadMenuItem">
                    <Setter Property="IsCheckable" Value="True"/>
                    <Setter Property="IsChecked" Value="{Binding IsChecked}"/>
                    <Setter Property="Command" Value="{Binding Command}"/>
                    <Setter Property="Header" Value="{Binding Header}"/>
                    <Setter Property="CommandParameter" Value="{Binding RelativeSource={RelativeSource Self}}" />
                </Style>
            </telerik:RadContextMenu.ItemContainerStyle>
        </telerik:RadContextMenu>
    </telerik:RadContextMenu.ContextMenu>
</telerik:RadGridView>

 

Do you think it may be happening? Thank you.

 

Regards,

Gerard.

 

 

 

4 Answers, 1 is accepted

Sort by
0
Sia
Telerik team
answered on 15 Jun 2017, 08:54 AM
Hello,

It seems that there is mismatch of the referenced binaries or some custom style that does not apply correctly.

Can you please check whether all used binaries are NoXaml ones?
This can be done by clicking on the file, choosing properties and looking at the details. In the file description it should say "Telerik.Windows.Controls (No XAML)" instead of "Telerik.Windows.Controls" only.

Regards,
Sia
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Gerard
Top achievements
Rank 1
answered on 16 Jun 2017, 09:04 AM

Hi Sia,

Yes, this is fine.

I have this custom style for some rows values. If I delete this style it works fine. Is there any way I can apply my custom style while keeping the vs2013 theme?

<Style TargetType="telerik:GridViewRow" x:Key="GridViewRowStyleOptimizeResults">
                <Style.Triggers>
                    <DataTrigger Binding="{Binding Color}" Value="Green">
                        <DataTrigger.Setters>
                            <Setter Property="Background" Value="LightGreen" />
                        </DataTrigger.Setters>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Color}" Value="Yellow">
                        <DataTrigger.Setters>
                            <Setter Property="Background" Value="LightGoldenrodYellow" />
                        </DataTrigger.Setters>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Color}" Value="White">
                        <DataTrigger.Setters>
                            <Setter Property="Background" Value="White" />
                        </DataTrigger.Setters>
                    </DataTrigger>
                </Style.Triggers>
</Style>

 

Regards,

Gerard.

0
Sia
Telerik team
answered on 19 Jun 2017, 08:18 AM
Hi again,

Can you please try to base your style on ours as follows:
<Style x:Key="GridViewRowStyleOptimizeResults" TargetType="telerik:GridViewRow" BasedOn="{StaticResource GridViewRowStyle}">
...
</Style>

If you change themes in your application, you will need to remerge it once you have cleared the resources and merged the new ones.
Please let me know if this helps.

Regards,
Sia
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Gerard
Top achievements
Rank 1
answered on 19 Jun 2017, 08:45 AM

Hi Sia,

Many thanks, with the property BasedOn="{StaticResource GridViewRowStyle}" works to perfection!

best regards,
Gerard!

Tags
GridView
Asked by
Gerard
Top achievements
Rank 1
Answers by
Sia
Telerik team
Gerard
Top achievements
Rank 1
Share this question
or