The answer to my question is likely out there but I'm having trouble ferreting it out.
I want to create a complete custom theme but I want to start with the RoyalLight theme. Basically, I would like an example that might show taking all the RoyalLight (for example) into a new project and create a new theme. I am then going to go back and start tweaking the theme for my needs.
I feel like this is probably a good starting point but it is confusing: https://es.infragistics.com/help/wpf/thememanager-creating-new-custom-theme.
Maybe a sample project would be helpful.
Thx
Rick
Hello Rick,
Yes, you may extend an existing theme.
eg.
https://es.infragistics.com/help/wpf/thememanager-extending-existing-control-theme
Themes location:C:\Program Files (x86)\Infragistics\2019.1\WPF\Themes
Let me know if you have any questions.
Ok I have managed to reproduce the example (FYI ExtendedTheme.xamTileManager.xaml has many typos mostly unclosed quotes)
With that framework I then apllied it to the RoyalLight theme. Now that I have the basic framework of how to do the extension I want to extrapolate that to changing the colors of various controls. The first I wanted to start with is the Button. In RoyalLight the button background is "purple" when clicked. I want to change that to my desired color. I thought I could start by making changes in the Theme.Colors somehow I was able to have an effect but I think mostly all I did was confuse things so now I don't get purple but I don't get my color either.
So I will ask how would I change the background color of a button by extending the RoyalLight theme?
In that case I wouldn't worry about our themes since the Button is a microsoft control; we don't have our own button control that you need to reconfigure. We do support microsoft controls as listed here:https://es.infragistics.com/help/wpf/thememanager-applying-theme-to-supported-ms-wpf-controls
The way to make sure they're styled is as follows:
<ig:ThemeManager.Theme> <ig:Office2013Theme StyleMicrosoftControls="False" /> </ig:ThemeManager.Theme>
In C#:
var office2013Theme = new Office2013Theme {StyleMicrosoftControls = false}; ThemeManager.SetTheme(LayoutRootGrid, office2013Theme);
In Visual Basic:
Dim office2013Theme = New Office2013Theme() With { .StyleMicrosoftControls = False } ThemeManager.SetTheme(LayoutRootGrid, office2013Theme)
Michael,
Thank you for your reply but that is not exactly what I was looking for.
My end objective is to create a custom theme by Extending RoyalLight. I like almost all of the styling but not the purple. I want to change the purple across the entire theme to a blue I have selected.
I have been successful now in extending RoyalLight.MSControls.Core.Implicit.xaml and directing it to use the custom Style and theme.colors xaml I provided.
My plan is to move through each control I need and extend it to use my color styling. So to that end I started working on the ComboEditor control by extending RoyalLight.xamComboEditor.xaml. Using the same pattern I used following along for the TileManager example and what I did for the MSControls I added the RoyalLight.xamComboEditor.xaml.
When I add the xaml to my project I get the following error: The name "ComboEditorItemControl" does not exist in the namespace "">schemas.infragistics.com/xaml". I didn't change anything in the xaml file. What am I missing? Another approach to this is the build solution for the RoyalLight theme. I could take that, rename it as I like and then tweak it. Thx Rick
I managed to get rid of the error above, I was missing a library reference but now I get this runtime error:
Message='Failed to create a 'TargetType' from the text 'ig:ComboEditorItemControl'.' Line number '329' and line position '48'. XamlParseException: Type reference cannot find type named '{schemas.infragistics.com/xaml}ComboEditorItemControl'.
Please send me a sample project of the isolated theme styles attempting to style the controls you want.
Did the sample projects post?
This is correct for the RoyalLightTheme. Only the Default, IgTheme and Office 2010 Blue Themes have this layout style for the expansion indicators. So you will have to take a look at those styles and import them/replace what RoyalLight is doing.
I think I am nearly there. If I can understand this last thing I believe I can finish....
My problem is this: The RoyalLight theme using > and a down pointing version of > for the collapsed and expanded indicators in the XamTreeGrid. I have managed to get all the colors, cell borders, etc that I want to change implemented but I cannot figure out where these graphics are coming from. It would seem that the areas in DataPresenterRoyalLight_Express starting around line 4721 would be the target area. Specifically starting at line 4788 ****ExpandCollapseToggle Style*** this code would seem to imply the style:
<!-- ********************************** ExpandCollapseToggle Style ********************************** --> <Style x:Key="ExpandCollapseToggleStyle" TargetType="{x:Type ToggleButton}"> <Setter Property="Focusable" Value="False" /> <Setter Property="Width" Value="22" /> <Setter Property="Height" Value="22" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ToggleButton}"> <Border Background="{StaticResource TransparentBrush}" Padding="0"> <Grid> <Path x:Name="ExpansionIndicatorCollapsed" Width="5" Height="8" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M60,40L60,20 70,30z" Fill="{StaticResource ExpansionIndicatorGlyphBackgroundBrush}" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Stroke="{StaticResource ExpansionIndicatorGlyphBorderBrush}" StrokeThickness="1" UseLayoutRounding="False" /> <Path x:Name="ExpansionIndicatorExpanded" Width="6" Height="6" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M0.5,6.4997156 L3.3283137,3.6714226 3.6714667,3.6714429 3.6714465,3.3282926 6.4997594,0.50000001 6.500113,6.5000692 z" Fill="{StaticResource ExpansionIndicatorGlyphExpandedBackgroundBrush}" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Stroke="{StaticResource ExpansionIndicatorGlyphBorderBrush}" StrokeThickness="1" UseLayoutRounding="False" Visibility="Collapsed" /> </Grid> </Border> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter TargetName="ExpansionIndicatorCollapsed" Property="Stroke" Value="{StaticResource ExpansionIndicatorGlyphHoverBackgroundBrush}" /> <Setter TargetName="ExpansionIndicatorCollapsed" Property="Fill" Value="{StaticResource ExpansionIndicatorGlyphHoverBackgroundBrush}" /> <Setter TargetName="ExpansionIndicatorExpanded" Property="Stroke" Value="{StaticResource ExpansionIndicatorGlyphHoverBackgroundBrush}" /> <Setter TargetName="ExpansionIndicatorExpanded" Property="Fill" Value="{StaticResource ExpansionIndicatorGlyphHoverBackgroundBrush}" /> </Trigger> <Trigger Property="IsChecked" Value="True"> <Setter TargetName="ExpansionIndicatorExpanded" Property="Visibility" Value="Visible" /> <Setter TargetName="ExpansionIndicatorCollapsed" Property="Visibility" Value="Collapsed" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style>
Alas no amount of fiddling affects my outcome
I get this
but I want this
That is as far as the > versus + is concerned.
I am looking in the wrong place undoubtedly. But I have worked the entire DataPresenter chain for the RoyalLight theme so I am at a loss.
If I could crack this nut my up coming demo would be perfect.
Attached is all the xaml for our shared controls. Note I cannot easily provide you with the rest of the WPF-specific xaml because it's tethered to their own respectful folders. Let me know which Infragistics controls you need styled. Also it would be best if you could send me a small example of using the installed xaml (default styles) showing any issues you've ran into so we can fix them.
ResourceSets.zip
Michael thank you for the themes zip file. A lot of my problems are in the xaml contained in the DefaultStyles folder. Could I get the Default files folder that is used to build the 18.2 release. The files in the 18.2 distribution are not current. Please see above
Thx, Rick
You may download the entire Themes library for 18.2 here:https://filetransfer.infragistics.com/public.php?service=files&t=4cf451a5aa23aa7d77a5fa29d6fcafb8