Error 2 Cannot Find Governing Frameworkelement
Contents |
here for a quick overview of the site Help Center Detailed cannot find governing frameworkelement or frameworkcontentelement for target element answers to any questions you might have Meta Discuss the cannot find governing frameworkelement or frameworkcontentelement for target element. dataitem=null workings and policies of this site About Us Learn more about Stack Overflow the company datagrid cannot find governing frameworkelement or frameworkcontentelement for target element Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join datagridtextcolumn visibility binding the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up WPF Error: Cannot find governing FrameworkElement for target element up vote 39 down vote favorite 15 I've got a datagrid with
Wpf Datagrid Column Visibility Binding
a Row that has an image. This image is bound with a trigger to a certain state. When the state changes I want to change the image. The Template itself is set on the HeaderStyle of a DataGridTemplateColumn. This template has some bindings. The first binding Day shows what day it is and the State changes the image with a trigger. These properties are set in a ViewModel. Properties: public class HeaderItem { public string Day { get; set; } public ValidationStatus State { get; set; } } this.HeaderItems = new ObservableCollection answers to any questions you might have Meta Discuss datagridcomboboxcolumn itemssource the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss http://stackoverflow.com/questions/7660967/wpf-error-cannot-find-governing-frameworkelement-for-target-element Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up WPF Error: “Cannot find governing FrameworkElement or Framework…” up vote 2 down vote favorite Im getting the following error: System.Windows.Data http://stackoverflow.com/questions/15773128/wpf-error-cannot-find-governing-frameworkelement-or-framework Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=ImagePath; DataItem=null; target element is 'VisualBrush' (HashCode=52892165); target property is 'Visual' (type 'Visual') I'm trying to set a Canvas type from MainWindow to my WPF Control (Named SearchTextBox) property ImagePath, so the control show it. This Canvas wraps the path of an icon. When i try and run it i cant see the icon and i get the: System.Windows.Data Error: 2. This is my code: My WPF Control: SearchTextBox.cs: public static readonly DependencyProperty ImagePathProperty = DependencyProperty.Register( "ImagePath", typeof(Canvas), typeof(SearchTextBox)); public Canvas ImagePath { get { return (Canvas)GetValue(ImagePathProperty); } set { SetValue(ImagePathProperty, value); } } Generic.xaml