Hello I have a problem with RadCarousel, at runtime you can not add items to the carousel OpenDialog because when I connect my ItemSource with images not see it, I realized that if the images are not shown in project resources can not be seen ...
What I have to do to see the images that are not in the resources folder?
DataTemplate?
C # code?
thank you very much, sorry for my english
What I have to do to see the images that are not in the resources folder?
DataTemplate?
C # code?
thank you very much, sorry for my english
public
partial
class
Window1 : Window
{
List<Image> lista;
private
const
String Extension =
"(*.jpg)|*.jpg|(*.png)|*.png"
;
public
Window1()
{
InitializeComponent();
lista =
new
List<Image>();
Microsoft.Win32.OpenFileDialog dialog ;
}
private
void
button1_Click(
object
sender, RoutedEventArgs e)
{
lista.Clear();
dialog =
new
Microsoft.Win32.OpenFileDialog { RestoreDirectory =
true
, Filter = Extension, Multiselect =
true
};
if
(dialog.ShowDialog() ==
true
)
{
foreach
(
string
Name
in
dialog.FileNames)
{
Image Im =
new
Image()
Im.Source =
new
BitmapImage(
new
Uri(fName, UriKind.Relative));
lista.Add(Im);
}
this
.radCarousel1.ItemsSource = lista;
}
}
}
}