We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:(no path); DataItem=null; target element is 'VisualBrush' (HashCode=25747420); target property is 'Visual' (type 'Visual')
<Application x:Class="MDTest.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:MDTest" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" StartupUri="MainWindow.xaml"> <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <materialDesign:BundledTheme BaseTheme="Light" PrimaryColor="DeepPurple" SecondaryColor="Lime" /> <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesign3.Defaults.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources> </Application>
<Window x:Class="MDTest.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:MDTest" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Title="MainWindow" Width="800" Height="450" Style="{StaticResource MaterialDesignWindow}" mc:Ignorable="d"> <materialDesign:DialogHost> <Grid /> </materialDesign:DialogHost> </Window>
Similar to bug #3228 happened in version 4.9.0
5.2.1
The text was updated successfully, but these errors were encountered:
I think this is due to the static reference to the converter, which was introduced in #3732:
MaterialDesignInXamlToolkit/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.DialogHost.xaml
Line 220 in e3c1240
Sorry, something went wrong.
Confirm that changing to StaticResource can solve the issue:
<converters:FirstNonNullConverter x:Key="FirstNonNullConverter" /> <!-- deducted --> <MultiBinding Converter="{StaticResource FirstNonNullConverter}"> <Binding ElementName="ContentCoverBorder" /> <Binding Source="{x:Static DependencyProperty.UnsetValue}" /> </MultiBinding> <!-- deducted -->
No branches or pull requests
Bug explanation
Bug detail
System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:(no path); DataItem=null; target element is 'VisualBrush' (HashCode=25747420); target property is 'Visual' (type 'Visual')
Environment
App.xaml
MainWindow.xaml
Other details
Similar to bug #3228 happened in version 4.9.0
Version
5.2.1
The text was updated successfully, but these errors were encountered: