How can I extend or change some of the properties of the styles applied by the themes?

Dec 5, 2012 at 2:26 AM
Edited Dec 5, 2012 at 3:27 AM

I need to change to properties for all the grids used in my application.

 

The first one is the property "GroupByHeaderText", and the second one is the property ContextMenu, I want to apply, but it is not working for me, I try with the following code: 

<Application x:Class="xxxx.App"

xmlns:ExtendedGridControl="clr-namespace:ExtendedGrid.ExtendedGridControl;assembly=ExtendedGrid"             xmlns:Controls="clr-namespace:ExtendedGrid.Microsoft.Windows.Controls;assembly=ExtendedGrid"

 StartupUri="MainWindow.xaml" Startup="ApplicationStartup">    <Application.Resources>

<Style  TargetType="{x:Type ExtendedGridControl:ExtendedDataGrid}" BasedOn="{StaticResource {x:Type Controls:DataGrid}}">           

<Style.Setters>               

<Setter Property="GroupByHeaderText" Value="Example Header" />           

</Style.Setters>       

</Style>

  </Application.Resources>

</Application>

 

but when the style is applied all the stylish from the default theme disappears.

Coordinator
Dec 5, 2012 at 1:26 PM

Hi,

I will work on style part. But as of now you can set directly.

Regards,
Bpoojary

On Dec 5, 2012 8:56 AM, "Devtelco" <notifications@codeplex.com> wrote:

From: Devtelco

I need to change to properties for all the grids used in my application.

The first one is the property "GroupByHeaderText", and the second one is the property ContextMenu, I want to apply, but it is not working for me, I try with the following code:

<Style TargetType="{x:Type ExtendedGridControl:ExtendedDataGrid}" BasedOn="{StaticResource {x:Type Controls:DataGrid}}"> <Style.Setters> <Setter Property="GroupByHeaderText" Value="Example Header" /> </Style.Setters> </Style>

but when the style is applied all the stylish from the default theme disappears.

Read the full discussion online.

To add a post to this discussion, reply to this email (WPFExtendedDataGrid@discussions.codeplex.com)

To start a new discussion for this project, email WPFExtendedDataGrid@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Dec 5, 2012 at 2:31 PM

Ok,thanks for your help, I will wait for the next version.

Coordinator
Dec 5, 2012 at 4:37 PM

Hi Devtelco,

I tried various way to use style to update the value GroupHeaderText but didn't work. If you want simple work around you can download the source code for the grid and replace "Drag a column header here to group by that column." text wherever you find in solution with your desired text.

Use this project dll in your software.

Let me know if I can assist you further with this.

Regards,

bpoojary

 

 

Dec 5, 2012 at 4:48 PM

That can works, the only reason that I don’t want to do that, is because when the team release a new code version I will need to paste all the changes to the code again, I need to change the GroupHeaderText and the ContextMenu property to set a context menu with options to export to excel,pdf and csv.

Thanks

Coordinator
Dec 5, 2012 at 5:00 PM
Hi,

True , Other way round would be Directly your Text as of now,

Regards,
bpoojary

On Wed, Dec 5, 2012 at 11:18 PM, Devtelco <notifications@codeplex.com> wrote:

From: Devtelco

That can works, the only reason that I don’t want to do that, is because when the team release a new code version I will need to paste all the changes to the code again, I need to change the GroupHeaderText and the ContextMenu property to set a context menu with options to export to excel,pdf and csv.

Thanks

Read the full discussion online.

To add a post to this discussion, reply to this email (WPFExtendedDataGrid@discussions.codeplex.com)

To start a new discussion for this project, email WPFExtendedDataGrid@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Dec 5, 2012 at 7:09 PM

I will do that, thanks for taking your time to help me.