I've encountered a very strange issue: I've started creating a custom control library and I am replacing the standard control on a existing dektop application with my custom contorls one by one. It's easier to explain if a show you the UI:
At first, I replaced the Menu with my custom Menu control, then the ComboBox, Button, TextBox and at last the ListView. Everthing worked fine until a replaced the ListView control. Then suddenly, all my custom controls are no longer rendered and the UI looks like this:
If I replace my custom ListView with the standard ListView again, nothing changes, the controls are still not rendered. If however I replace my custom Menu control, which was the first custom control used that has always worked fine and I haven't changed since then, with the standard Menu, my other custom controls are rendered again and everthing is as it should be. I have really no idea what could be causing this and I would really appreciate if someone could help me out.
All my custom controls are in one referenced assembly and look more or less like this:
public class Menu : System.Windows.Controls.Menu { static Menu() { DefaultStyleKeyProperty.OverrideMetadata(typeof(Menu), new FrameworkPropertyMetadata(typeof(Menu))); } // Some Methods and DependencyProperties }
Generic.xaml:
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:ArgusLib.WPF.Controls"><ResourceDictionary.MergedDictionaries><local:SharedResourceDictionary Source="/ArgusLib.WPF.Controls;component/Themes/Window.xaml"/><local:SharedResourceDictionary Source="/ArgusLib.WPF.Controls;component/Themes/ContentControl.xaml"/><local:SharedResourceDictionary Source="/ArgusLib.WPF.Controls;component/Themes/ComboBox.xaml"/><local:SharedResourceDictionary Source="/ArgusLib.WPF.Controls;component/Themes/Menu.xaml"/><local:SharedResourceDictionary Source="/ArgusLib.WPF.Controls;component/Themes/TextBox.xaml"/><local:SharedResourceDictionary Source="/ArgusLib.WPF.Controls;component/Themes/Button.xaml"/><local:SharedResourceDictionary Source="/ArgusLib.WPF.Controls;component/Themes/ListView.xaml"/></ResourceDictionary.MergedDictionaries><Style TargetType="{x:Type local:Window}" BasedOn="{StaticResource DefaultWindowStyle}"/><Style TargetType="{x:Type local:ContentControl}" BasedOn="{StaticResource DefaultContentControlStyle}"/><Style TargetType="{x:Type local:ComboBox}" BasedOn="{StaticResource DefaultComboBoxStyle}"/><Style TargetType="{x:Type local:EnumComboBox}" BasedOn="{StaticResource DefaultEnumComboBoxStyle}"/><Style TargetType="{x:Type local:Menu}" BasedOn="{StaticResource DefaultMenuStyle}"/><Style TargetType="{x:Type local:TextBox}" BasedOn="{StaticResource DefaultTextBoxStyle}"/><Style TargetType="{x:Type local:Button}" BasedOn="{StaticResource DefaultButtonStyle}"/><Style TargetType="{x:Type local:ListView}" BasedOn="{StaticResource DefaultListViewStyle}"/></ResourceDictionary>
https://fraktalysator.codeplex.com