Home Forums WPF controls Xceed DataGrid for WPF Custom Themes?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #23860 |

    Howdy,

    The search function isnt working here at the moment for me and so after looking through about 10 pages of posts, I thought I might just ask the question, so sorry if it has already been asked and answered previously.

    I need to create a custom theme for the DataGrid. I had a look though the theme’s that come with the install and even though I changes some values, nothing perpetuated to the element in WPF.

    I assuming that the themes may in this case be “pre-loaded”?

    Any information on this would be greatly appreciated.

    Cheers

    Imported from legacy forums. Posted by Brennon (had 779 views)

    User (Old forums)
    Member
    Post count: 23064

    Our next version will include a “theme creation wizard”. Basically it will give you a blank project so that you can incorporate your own styles and templates. I am however interested to know what you mean by : “even though I changes some values, nothing perpetuated to the element in WPF” can you give me an example?

    Imported from legacy forums. Posted by Matt (had 290 views)

    User (Old forums)
    Member
    Post count: 23064

    howdy..

    This is a while back but I changed some of the values in the xaml fies to different color values just to try and locate which part was for what in the themes… it appeared that regardless of what i changed in those resource dictionaries, nothing changed in the dev project.

    I like many others are waiting for the next version with antisipation… I dont want to change the structure of the grids templates in terms of elements etc,,, I just wanted to change the color schemes. Any early advice on that would be greatly appreciated.

    Cheers

    Imported from legacy forums. Posted by Brennon (had 389 views)

    Xceed Support
    Member
    Post count: 5658

    Hi,

    In order to help you, it would be nice if you could post more particular details on what it is you tried changing and the resulting XAML code as well… This way, it`s gonna be easier to help you.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 358 views)

    User (Old forums)
    Member
    Post count: 23064

    Howdy Marc,

    Thanks for your reply.

    A couple of key words in my last post probably gives you an indication to what I tried to do?

    An example is when I change the color values in CardView.Luna.homestead.xaml

    <LinearGradientBrush x:Key=”cardTitleBackgroundBrush”
    StartPoint=”0.5,1″
    EndPoint=”0.5,0″>

    <GradientStop Offset=”0″
    Color=”#C5CBAA” />

    <GradientStop Offset=”1″
    Color=”#E9EDD2″ />

    </LinearGradientBrush>

    Changing these would appear to have no effect.

    Cheers

    Imported from legacy forums. Posted by Brennon (had 486 views)

    Xceed Support
    Member
    Post count: 5658

    If I understand correctly, you are modifying the file located in “Xceed DataGrid for WPF 1.1\Themes” folder ?

    These files are provided as “examples” for reference purpose and are not used by the assembly when executing.

    If you need to modify a visual aspect, you will need to create styles in your application’s resource dictionaries that changes the aspect in question…

    To see how this can be achieved, you ca refer to <a href=”http://doc.xceedsoft.com/products/XceedWpfDataGrid/Templates.html”>this article in the documentation</a>

    Imported from legacy forums. Posted by Marcus [Xceed] (had 315 views)

    User (Old forums)
    Member
    Post count: 23064

    Cheers Marc,

    Say I add a DataGridControl.. it’s template contains PART_ScrollView… I edit that parts control template.. that gets me to a template item – SyncronizedScrollViewer, which contains a StackPanel…. which contains the part on the Control that I want to modify in terms of colour…

    That part displays the dragable area for Column Headers to sort by… its linear gradient green is lovely.. but I want to change it to suit other parts of my application…

    When I remove the StackPanel and replace it with a customised one.. the sort etc no longer works…

    Any advice?

    Cheers

    Imported from legacy forums. Posted by Brennon (had 354 views)

    Xceed Support
    Member
    Post count: 5658

    The StackPanel included within the SynchronizedScrollViewer is in fact populated automatically with the content of the DataGridControl.View.FixedHeaders…

    To modify the colors of the GroupByControl, you should instead replace the default FixedHeaders with you how headers (instead of hacking the visual tree).

    Here is a quick example:
    <code>
    <xcdg:DataGridControl>
    <xcdg:DataGridControl.View>
    <xcdg:TableView>
    <xcdg:TableView.FixedHeaders>
    <!– this step required to clear the default fixed headers –>
    <xcdg:ClearHeadersFooters/>

    <DataTemplate>
    <xcdg:GroupByControl Background=”HotPink” />
    </DataTemplate>

    <DataTemplate>
    <xcdg:ColumnManagerRow/>
    </DataTemplate>

    </xcdg:TableView.FixedHeaders>
    </xcdg:TableView>
    </xcdg:DataGridControl.View>
    </xcdg:DataGridControl>
    </code>

    Imported from legacy forums. Posted by Marcus [Xceed] (had 6080 views)

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.