Hi,
I';m not new to WPF but I'm finding getting the theming working on your controls like wading through thick mud.
Is there a simple guide to get people started?I have the Ultimate edition for a project I'm working on and I can't even find pre-compiled theme DLLS after wading through the enormous number of directoried and dlls ...
I took the DataGrid theme XAML dictionary and popped it into my own apps styles dll and now I cannot find the DLL that contains the CultureValueConverter that is missing (I have the DataPresenter DLL referenced). Searching the online help I can only find references to this object in relation to SilverLight.
Serisouly guys, I love the controls and this is the 4th employer I've recommended them too but PLEASE, PLEASE reduce the searching and inbuilt obfuscation, it's getting just plain too hard to find stuff in the dirth of options available ...
Where do I start?
I should add here that I have subclassed the Controls so the type is actually not XamDataChart or XamDataGrid ... I have just created thin wrappers to encapsulate custom functionality.
I've so far completely failed to get any Infragistics themes to apply to the controls.
Not even sure which DLLs need to be referenced as Referenceing Forest theme and setting the theme manager to use this one does nothing at all.
findjammer3 said:I should add here that I have subclassed the Controls so the type is actually not XamDataChart or XamDataGrid ... I have just created thin wrappers to encapsulate custom functionality.
That makes a big difference since WPF uses the actual type as the key when searching for implicit/local styles - so your derived class' type - and therefore any styles we provide in our themes will not be picked up by WPF. You might want to review this post about common Theme/Style issues like this or other posts with similar questions like this one.
Setting this in XAML:
Style="{DynamicResource {x:Type igDP:XamDataGrid}}"
Doesn't work.
And this:
<Style TargetType="{x:Type uc:MangoDynamicDataGrid}" BasedOn="{DynamicResource {x:Type dp:XamDataGrid}}"> </Style>
Is illegal ... so I'm completely lost now. Is there any other way to apply a style to a derived type? I can't believe I'm the first or only person to subclass the XamDataGrid.
I've managed to get it to style but copying all the Generic styles into another dictionary and globally replacing the XamDataGrid type declaration with my own Type ...
This is the only approach that seems to work for me ...
You haven't provided me with a sample or a description of what exactly is not working so it is hard to say what is going on. I can say that both approaches (setting the dynamicresource in the xaml or calling setresourcereference in code) do allow WPF to pick up the styles for the control and allow theming to continue to work. I've attached a sample showing both approaches. With regards to BasedOn, you can only use that with a StaticResource - not a DynamicResource - in which case I believe it just picks up the generic style at the time it is created.
The specific problem is that setting these properties / executing the methods aren't doing what you said they would.
I'll try and get a sample together later to illustrate the problem.
Do you have an email address I can send the sample to?
Thanks for the demo app.
I've looked it over and it describes exactly what I tried ... it didn't work in my application.