Hi,
I've added a xamDataGrid to my wpf usercontrol, but nothing displays, even though I point it at a datasource.
I'd just like to get a designer's view so that I can arrange columns, hide / show row selector, etc.
Any ideas?
I am supposed to have help with the styling of our Xaml app. I am a developer and maybe like the others, my skill is in data base and providing system functionality, not making a border around a cell a specific color. Being that Xaml is new and I may not get the services of the graphics designer, I am formulating a plan to help me with the grid styling. I can share that plan with you but it may not help you with specifics.
I have used a Theme supplied by Infragistics for development so far, "Theme=LunaOlive". This color matches closely with the color requirements of the system as a whole. I plan on disecting this theme and taking the pieces I want for the Grid Theme for our system. I do not want MouseOver or MouseHover colors which the the LunaOlive theme contains. I want a CellValuePresenter style that shows a field in the grid has been changed. I am going to style the HeaderPresenter and RowSummaryPresenter. I hope disecting an existing theme is going to show me all the style points and allow me to choose the style points I want to incorporate.
I have taken the Infragistics sponsored WPF training. Curtis Taylor taught the class and he used Expression Blend to perform most of the styling, switching between EB and Visual Studio depending on if he was providing functionality or styling. It may be that we programmers, if we are going to have to do the styling, are going to have to be EB users as well. I am not an EB user and do not have Expression Blend installed yet. I am still holding out hope for help with the styling. If you are able to use VS to bind the XamDataGrid to your specific data and not sample data, and then switch to EB to style the grid with your data showing, this would be a method to see in real time. What about it Curtis, can you bind data in Visual Studio and then style the grid in Expression Blend using the bound data? I think you can I just don't have all the tools to try it.
That matches my experience; the only time I've seen columns is if you set ShowSampleData (or some such property) to true, which uses some schema based on a fictional car object.
I've never seen columns appear in the designer. I just assumed it wasn't supported functionality, at all. Is anyone saying they see columns at design time?
Don't feel like the lone ranger when it comes to WPF. I have created some styles, control templates, done some binding but I still don't feel I know exactly what to do and if I do something, am I doing it the "WPF" way. By next year we will both feel like experts.
I do not have a lot of time for styling as my main goal is to make sure the application performs the necessary functions and stores the necessary data. Today I am overwhlemed by the amount of styling that can be found in the Theme files but I hope that once I get a chance to dig in I will learn and it will make more sense. WPF is so flexible and powerful that anything can be accomplished if you have enough time to play around and figure it out.
Ahh, sorry I assumed you had worked for Infragistics. Oh well..
I did try settings the BindToSample data to true, and sure enough sample data appears in the VS designer. Unfortunately, the sample data has nothing to do with the .Net type to which the DataProvider is bound... it gives you some columns for describing various cars...
i'm still trying to wrap my head around wpf in general.. including the styling. at some point I'll have to finish reading my Wpf Unleased book.. and then re-read it.