R2 D2 2 Napisano 26 Sierpnia 2022 Udostępnij Napisano 26 Sierpnia 2022 w Błąd wyświetlania okna Asortyment dla użytkownika 'szef' Przy próbie wywołania Cytat IAsortymentOkno okno = sfera.PodajObiektTypu<IAsortymentOkno>(); IEnumerable<Asortyment> asortyment = okno.WybierzWiele(); IAsortymenty asortymenty = sfera.PodajObiektTypu<IAsortymenty>(); Okno jest tworzone (widok w debug VS) ale nie widoczne. Błąd: Cytat System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=HorizontalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='_Dodaj'); target property is 'HorizontalContentAlignment' (type 'HorizontalAlignment') System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=VerticalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='_Dodaj'); target property is 'VerticalContentAlignment' (type 'VerticalAlignment') System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=HorizontalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='_Operacje'); target property is 'HorizontalContentAlignment' (type 'HorizontalAlignment') System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=VerticalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='_Operacje'); target property is 'VerticalContentAlignment' (type 'VerticalAlignment') System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=HorizontalContentAlignment; DataItem=null; target element is 'MenuItem' (Name=''); target property is 'HorizontalContentAlignment' (type 'HorizontalAlignment') System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=VerticalContentAlignment; DataItem=null; target element is 'MenuItem' (Name=''); target property is 'VerticalContentAlignment' (type 'VerticalAlignment') System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=HorizontalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='HELP_MENU'); target property is 'HorizontalContentAlignment' (type 'HorizontalAlignment') System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=VerticalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='HELP_MENU'); target property is 'VerticalContentAlignment' (type 'VerticalAlignment') Problem występuje tylko na jednym użytkowniku (szef). W definicjach widoku każdy użytkownik (łącznie z szefem) ma przypisany tą samą definicję dla Asortymentu. Przy wołaniu okna z innego użytkownika (poza szef) mamy błąd: Cytat System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=HorizontalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='_Dodaj'); target property is 'HorizontalContentAlignment' (type 'HorizontalAlignment') System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=VerticalContentAlignment; DataItem=null; target element is 'MenuItem' (Name='_Dodaj'); target property is 'VerticalContentAlignment' (type 'VerticalAlignment') ale okno ładuje się prawidłowo i możemy wybrać asortyment. Link to postu
Paweł Kubacki 206 Napisano 5 Września 2022 Udostępnij Napisano 5 Września 2022 w Błąd wyświetlania okna Asortyment dla użytkownika 'szef' Proszę o przesłanie w wiadomości prywatnej danych diagnostycznych ze stanowiska komputerowego, na którym ten problem występuje. Link to postu
Polecane posty