Hi,
I am just getting to terms with the carousal and its working great. There is just a couple of things I am trying to get right. Maybe you can help me.
I have created some test code which adds the image list at runtime just looking at a directory. Code is displayed below. The code works fine but all the items are the same size. What I need is the selected item to be a larger size so they stand out from the rest. Also if its not too much work I want the rest of the items in the background to be slightly dimmed out just to emphasize on this.
PLEASE HELP...
Thanks
private void CreateCarouselItems()
{
//pictureBox2.Image = Image.FromFile("D:\\IMAGES\\1.jpg");
int[] myInterger = new int[1];
for (int i = 1; i < 100; i++)
{
RadButtonElement carouselItem = new RadButtonElement();
carouselItem.ImageAlignment = ContentAlignment.MiddleCenter;
carouselItem.TextAlignment = ContentAlignment.MiddleCenter;
carouselItem.TextImageRelation = TextImageRelation.ImageAboveText;
carouselItem.ShowBorder = true;
carouselItem.Text = "Peter Pan";
carouselItem.ForeColor = Color.WhiteSmoke;
carouselItem.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
carouselItem.BackColor = Color.YellowGreen;
Bitmap b;
b = (Bitmap)Image.FromFile("D:\\IMAGES\\" + i.ToString() + ".jpg");
carouselItem.Image = ResizeBitmap(b, 90, 60);
this.radCarousel1.Items.Add(carouselItem);
}
}
I am just getting to terms with the carousal and its working great. There is just a couple of things I am trying to get right. Maybe you can help me.
I have created some test code which adds the image list at runtime just looking at a directory. Code is displayed below. The code works fine but all the items are the same size. What I need is the selected item to be a larger size so they stand out from the rest. Also if its not too much work I want the rest of the items in the background to be slightly dimmed out just to emphasize on this.
PLEASE HELP...
Thanks
private void CreateCarouselItems()
{
//pictureBox2.Image = Image.FromFile("D:\\IMAGES\\1.jpg");
int[] myInterger = new int[1];
for (int i = 1; i < 100; i++)
{
RadButtonElement carouselItem = new RadButtonElement();
carouselItem.ImageAlignment = ContentAlignment.MiddleCenter;
carouselItem.TextAlignment = ContentAlignment.MiddleCenter;
carouselItem.TextImageRelation = TextImageRelation.ImageAboveText;
carouselItem.ShowBorder = true;
carouselItem.Text = "Peter Pan";
carouselItem.ForeColor = Color.WhiteSmoke;
carouselItem.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
carouselItem.BackColor = Color.YellowGreen;
Bitmap b;
b = (Bitmap)Image.FromFile("D:\\IMAGES\\" + i.ToString() + ".jpg");
carouselItem.Image = ResizeBitmap(b, 90, 60);
this.radCarousel1.Items.Add(carouselItem);
}
}