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

Display Grid Lines on Specific Theme

5 Answers 305 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 1
Adam asked on 19 Jul 2013, 09:37 PM
I am trying to display gridlines in the Detail View of a ListView control. I am currently using the VisualStudio2012Dark theme and it does not show the gridlines that separate each row. I have watched several of your webinars on the themebuilder but cannot figure out how to modify the theme to have gridlines.

Thanks

5 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 24 Jul 2013, 02:53 PM
Hello Adam,

Thank you for contacting Telerik Support.

You should edit the VisualStudio2012Dark theme in order to achieve the desired view. It is necessary to change the border color of DetailListViewDataCellElement. Please follow the steps:
  1. Open VisualStyleBuilder, which comes with RadControls for WinForms
  2. Open the "File" menu
  3. Click "Export Build-in Themes"
  4. Then open the theme you want to edit with the "Open package" button

You can read more details about using the VisualStyleBuilder here:
  1. Loading predefined themes
  2. Working with Repository Items
  3. Saving and Loading Theme Files
  4. Loading Themes from an External File
  5. Loading Themes from a Resource
  6. Applying Theme to a Control
  7. http://tv.telerik.com/watch/winforms/visualstylebuilder/whats-new-visual-style-builder-q1-2010

After customizing the already existing theme I have used the following code snippet to obtain the design from the attached picture:
public Form1()
        {
            InitializeComponent();
 
            List<Item> dataItems = new List<Item>
            {
                new Item("First", "Some description", DateTime.Now),
                new Item("Second", "Some description", DateTime.Now),
                new Item("Third", "Some description", DateTime.Now),
                new Item("Fourth", "Some description", DateTime.Now),
                new Item("Fifth", "Some description", DateTime.Now),
                new Item("Sixth", "Some description", DateTime.Now),
                new Item("Seventh", "Some description", DateTime.Now),
            };
            this.radListView1.DataSource = dataItems;
            ThemeResolutionService.LoadPackageFile(@"C:\Users\yordanova\Desktop\themes\VisualStudio2012DarkNew.tssp");
            this.radListView1.ThemeName = "VisualStudio2012DarkNew";
        }
    }
 
    public class Item
    {
        public string Name { get; set; }
 
        public string Description { get; set; }
 
        public DateTime Date { get; set; }
 
        public Item(string name, string description, DateTime date)
        {
            this.Name = name;
            this.Description = description;
            this.Date = date;
        }
    }

I hope this information helps. Please let me know if I can assist you any further with this service request. Thank you in advance.

Regards,
Desislava
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Adam
Top achievements
Rank 1
answered on 26 Jul 2013, 09:43 PM
Thanks for the quick response. I have exported the file and reopened it in VisualStyleBuilder however I am having a hard time finding the DetailListViewDataCellElement you were referring too. I watched the video but it really only covered using the Repository but now how to find specific elements and change their color. 

Thanks,

Adam
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 31 Jul 2013, 04:52 PM
Hello Adam,

Thank you for writing back.

The appropriate way to find the specific elements easily is to use ControlSpy (Visual Style Builder -> Tools -> Show Spy). Thus you can test whether changing the color of a given element is the right one.

To your question on the element you are unable to find. There are several controls that offer several different views e.g. RadPageView (strip, explorer bar, stack, outlook). RadListView offers several views as well (Simple, Details, Icons). These views are build with different elements which cannot exist at the same time in the control. That is why you need to change the view of the control. To do that right-click on the control in the Element tree of VSB and select the appropriate view. I am attaching a screen shot for your convenience.

I hope this information helps. Should you have further questions, I would be glad to help.

Regards,
Desislava
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Adam
Top achievements
Rank 1
answered on 31 Jul 2013, 06:06 PM
I am still having issues. I have used the ControlSpy to locate the DetailListViewDataCellElement and I have changed its border color and nothing shows up in the Preview Box of the Visual Style Builder. I have attached some screenshots to show the change. Please let me know if I am changing the correct values or not.

Thanks
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 02 Aug 2013, 01:07 PM
Hello Adam,

Thank you for writing back.

Please find the attached video (drag and drop over the browser to play) demonstrating how to achieve the desired border of RadListView rows.

I hope this information helps. Should you have further questions, I would be glad to help.

Regards,
Desislava
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
ListView
Asked by
Adam
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Adam
Top achievements
Rank 1
Share this question
or