create a usercontrol in WPF project.
<UserControl x:Class="Test1.PostOperations" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Test1" mc:Ignorable="d" d:DesignHeight="50" d:DesignWidth="500"> <Grid> <StackPanel Orientation="Horizontal"> <Image Name="Heart1" Margin="8" Source="pack://siteoforigin:,,, /Icons/nolike.png" Stretch="Uniform" MouseDown="Heart_MouseDown" Width="40" Height="40" /> <Image Name="Comment" Margin="8" Source="pack://siteoforigin:,,,/Icons/comment.png" Stretch="Uniform" Width="40" Height="35" /> <Image Name="Send" Margin="8" Source="pack://siteoforigin:,,,/Icons/send.png" Stretch="Uniform" Width="40" Height="35" /> </StackPanel> <Image Name="bookmark" HorizontalAlignment="Right" Margin="8" Source="pack://siteoforigin:,,,/Icons/bookmark.png" Width="40" Height="35" /> </Grid>
Images do appear in usercontrol.
include the usercontrol in the project mainwindow but the image disappeared.
enter <local:PostOperations Height="60"> </local:PostOperations> here
how to show the image in the usercontrol to a windows?