Hi. i have added xamdatagrid and i want line for each record for that xamdatagrid.For that i have added style DataRecordcellarea.
<Setter Property="BorderBrush" Value="#EEEEEEEE"/>
<Setter Property="BorderThickness" Value="0,0,0,2"/>
</Style>
i am facing problem in background brush Selected and Mouseover.It is taking default style if i select igtheme or any theme.how can i overcome this problem.How can i write basedon property for that style and can i write in app.xaml.
Hello,
Thank you for your post. I have been looking into your sample and I modified it, so now it works as you want. Basically I set the DataRecordCellArea’s Style in the ComboBox’ SelectionChnaged event.
Hope this helps you.
This will not solve my problem.I think u got confuse about my problem.What u have sent an example resembles my problem.I want mouse over and selection of the field based on the theme selection in combo box.But in your example Mouse over and selection background brush is same.it is taking generic theme or Aero theme.So plz solve my problem.If i remove that DataRecordCellArea style in resouce file i can solve the problem but if i remove that i won't get border after for each field and height of each record is minimise.If u got any doubt let me know.
I want theming for every xamdatagrid,So that i will be having options tab in mainwindow and i will be have different usercontrols containing xamdatagrid.If i go in options and change the theme it should reflect in all xamdatagrid.how can i add dynamically this code?
XamDataGrid1.FieldLayoutSettings.DataRecordCellAreaStyle = currentStyle;
here XamDataGrid1 is name for respective xamdatagrid.But i am using 100 xamdatagrids.So, plz solve this problem.
I have been looking into your requirement and I can say that since you are not able to add Resources without Keys from code behind your option is to set the Style for all XamDataGrids manually. You can do this in every XamDataGrid’s Loaded event for example.
Hi... I tried what u told in loaded event but its not working.I am sending a file which is similar to my project.In that project i am using many xamdatagrid(different values and different xamdatagrid) and how can i set the same styles for all xamdatagrids without writing loaded event for xamdatagrid .cs file.I am sending file in which i have added same xamdatagrid for all tabs(for reference it will be different in my project).Plz help in solving.
I have been looking into your sample, but as I said before if you want to add Style based on other Style or Theme you should either add the new Style in the XamDataGrid’s Resources or set it directly to the corresponding Property. Your other option is to copy the Themes from C:\Program Files (x86)\Infragistics\NetAdvantage 2011.2\WPF\DefaultStyles\DataPresenter folder, edit them and create Resource dictionaries, which you can use. This way there will be no need of Setting new Styles based on the Themes.
S... can i add.But i am adding Theme=[Current] in XamDataGrid.how can i add these style in xamdatagrid.I am not getting wat ur mentioned.Plz can u send me a sample?
All the Styles for the NetAdvantage for WPF product are installed here: C:\Program Files (x86)\Infragistics\NetAdvantage 2011.2\WPF\DefaultStyles by default.
Hi.... thanks. I dont no what wrong.It is not working in my project.I have done exactly same wat u did.But no use.can i get xaml files of all the styles so that i can add manually in Resource Dictionary?
Plz send URLor is their any way to do?
I have modified your sample, so now it works as you want. Basically I changed the Binding of MyProperty, so I can make the connection between it and the ComboBox' SelectedItem. I used the UserControl's Tag Property as helping Property.
Thanks.It will work if xamdatagrid is present in mainwindow.If it present in one usercontrol and thati placed in mainwindow style will not affect.Check it i am sending a .zip file.Plz verify it.I am done some changes in that file wat u have sent.
I have modified the sample I sent you firstly and now it works as you want. Basically I inherited XamDataGrid and added a Dependency Property called MyProperty, which I bound to the ComboBox’s SelectedItem and used the PropertyChnaged event to set the Style of the XamDataGrid that rises the event. In your solution you need to change XamDataGrids with the custom one, which in my project is called MyXDG and is defined in a file called MyXDG.cs