Binding image value to path in wpf and c#
问题 I am strugling to bind value to path ImageSource. I get NullReferenceError when I try to set new value. My current code is: In MainWindow.xaml the Path code is following <Path x:Name="PPButton" Data="M110,97 L155,123 C135,150 135,203 153,227 L112,255 C80,205 80,150 110,97" Stretch="none" MouseEnter="Path_MouseEnter_1" MouseLeave="Path_MouseLeave_1" > <Path.Fill> <ImageBrush ImageSource="{Binding ImageSource}"/> </Path.Fill> </Path> on MainWindow.xaml.cs where I get error, I commented behind