dependabot[bot] on nuget
Bump MahApps.Metro from 3.0.0-a… (compare)
batzen on develop
Adding #1103 to changelog (compare)
batzen on develop
Backstage.IsOpen is now fully b… Move IsOpen code together in a … Merge pull request #1104 from c… (compare)
batzen on develop
Preventing multiple enumeration Improving formatting Improving code from #1099 (compare)
RibbonLocalization.Current.LocalizationMap.Clear()
and call RibbonLocalization.Current.Localization = new English()
afterwards
Loaded
event? 🤔
Does anyone know how to specify more or overriding styles for a ribbon in a non-WPF app?
I can add the additional resource dictionary when I create the Application(), but that doesn't seem to be enough.
if (Application.Current == null)
new Application();
Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary
{
Source = new Uri("pack://application:,,,/Fluent;Component/Themes/Generic.xaml", UriKind.RelativeOrAbsolute)
});
var resourcesxaml = (ResourceDictionary)Application.LoadComponent(new Uri("/MyDll;component/Styles/MyStyles.xaml", UriKind.Relative));
Application.Current.Resources.MergedDictionaries.Add(resourcesxaml);
Example of what I'd like to do in the custom MyStyles.xaml
<Style TargetType="Fluent:DropDownButton">
<Setter Property="Margin" Value="1 2 3 4"/>
</Style>
Unless I can load it on an the app level, the only way I seem to be able to make it work is to reference it in every xaml file (e.g. one per ribbon group)
but I might be missing something...
Fixed it: it was 2 separate issues 1) a build action/item type for the style xaml was incorrect in the csproj 2) When then it worked for most controls but not for a RibbonGroup I realized that was because my ribbon groups were broken out into separate file for each RibbonGroup, but that makes them user controls which are subclasses, which breaks the styling. Not sure if there is a simple way to split a large xaml (10k lines +) into files without usercontrols? I don't need any new behavior for each RibbonGroup, I just want a separate file. It feels like an oversight in WPF that "modularization" (splitting into user controls) breaks styling? I can't make the style's TargetType="Fluent:RibbbonGroupBox" also pick up all 200 sub classes of RibbonGroupBox I believe.
Thanks anyway - I'm sorted now.