به نام خدا سلام بر برنامه نویسان عزیز 😉 در این مطلب آموزش قرار دادن عکس درون ListBox با wpf و c#.net را آماده کردم. انشاالله که این کد سی شارپ براتون مفید باشد.
تصاویر خروجی نهایی این کد:
کد قرار دادن عکس درون ListBox با wpf و c#.net :
<Window x:Class="Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Use ListBox" Height="300" Width="300">
<Grid>
<ListBox Margin="10,10,10,0" Name="ListBox1" VerticalAlignment="Top" SelectedIndex="1" VerticalContentAlignment="Center">
<ListBoxItem>Apple</ListBoxItem>
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Use ListBox" Height="300" Width="300">
<Grid>
<ListBox Margin="10,10,10,0" Name="ListBox1" VerticalAlignment="Top" SelectedIndex="1" VerticalContentAlignment="Center">
<ListBoxItem>Apple</ListBoxItem>