I have a content pane on which i have a theme applied, the content pane can be docked anywhere on the screen and can make it as a floating window.
When i am making my content pane a floating windows, the theme gets lost.
I wanted my theme to remain when the content pane acts as a floating window or is there any alternative to set my personal theme only while content pane is floating
Regards,
Sachin Deoli
Hello Divya
The code you have provided worked on the sample project but in our application we don't have App.Xaml file, we are applying style in a Default.Xaml file, can you help me providing the style for floating window title bar colour.
eg-:
<Style x:Key="{x:Static igDock:PaneHeaderPresenter.MaximizeButtonStyleKey}" TargetType="{x:Type Button}" BasedOn="{StaticResource paneCaptionButtonStyleBase}"> <Setter Property="ToolTip" Value="{StaticResource maximizeToolTip}" /> </Style>
Or do we have any alternate way to resource wash colour in the ToolWindowLoaded event.
Hello Sachin,
Than you for sharing the sample. It was supper easy to find the cause of the issue .
So you needed to include PrimitivesIGThemein the ResourceWasher Dictionary for the floating window.
So your complete code in the app.xaml would be:
<Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="HideCloseBtnDictionary.xaml"/> <igWPF:ResourceWasher WashMode="HueSaturationReplacement" WashColor="Black"> <igWPF:ResourceWasher.SourceDictionary> <igThemes:DockManagerIGTheme /> </igWPF:ResourceWasher.SourceDictionary> </igWPF:ResourceWasher> <igWPF:ResourceWasher WashMode="HueSaturationReplacement" WashColor="Black"> <igWPF:ResourceWasher.SourceDictionary> <igThemes:PrimitivesIGTheme /> </igWPF:ResourceWasher.SourceDictionary> </igWPF:ResourceWasher> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources>
Let me know if you have any question.
Hello Divya,
XamDockManagerCloseBtnCase.zip
Thank you for the update. Ok so you are not using the default styles ,instead resource washer.
Note Styles/resourcewasher/etc in the xamdockmanager's resources or even in the resources of the window containing the xamdockmanager will not affect the floating windows since they are separate top level windows.
Try coping your styles/resourcewashers into the app.xaml, this should help.
You can also refer to this post ,discussing the same issue.
https://ko.infragistics.com/community/forums/f/ultimate-ui-for-wpf/121470/resourcewasher-doesn-t-work-with-xamdockmanager-floating-panes
Hi Divya
I have created my own theme for XamDockManager-:
<ResourceDictionary xmlns="">schemas.microsoft.com/.../presentation"
xmlns:x="">schemas.microsoft.com/.../xaml"
xmlns:igThemes="">infragistics.com/Themes">
<ResourceDictionary.MergedDictionaries>
<igThemes:DockManagerIGTheme />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
Which i have used on my code like-:
<igWPF:ResourceWasher WashMode="HueSaturationReplacement" WashColor="#FF6D6D6D">
<igWPF:ResourceWasher.SourceDictionary>
<ResourceDictionary Source="/NewFolder/Themes/IG/IG.xamDockManager.xaml" />
</igWPF:ResourceWasher.SourceDictionary>
</igWPF:ResourceWasher>
This is how my content pane looks like when its docked(Not Floating)-: