Sign In|Join
Home/Silverlight.NET Forums/Programming with .NET - General/c# clip property/Re: c# clip property
Member
8 Points
4 Posts
May 08, 2008 01:15 PM | LINK
RectangleGeometry xRect = new RectangleGeometry(); xRect.Rect = new Rect(100, 100, 100, 100); xRect.RadiusX = 20; xRect.RadiusY = 20; Image xImage = new Image(); xImage.Source = new BitmapImage(new Uri("1.jpg", UriKind.Relative)); xImage.Stretch = Stretch.Fill; xImage.Width = 300; xImage.Height = 200; xImage.Clip = xRect; LayoutRoot.Children.Add(xImage); This one works for images
fatihpiristine
Member
8 Points
4 Posts
Re: c# clip property
May 08, 2008 01:15 PM | LINK
RectangleGeometry xRect = new RectangleGeometry();
xRect.Rect = new Rect(100, 100, 100, 100);
xRect.RadiusX = 20;
xRect.RadiusY = 20;
Image xImage = new Image();
xImage.Source = new BitmapImage(new Uri("1.jpg", UriKind.Relative));
xImage.Stretch = Stretch.Fill;
xImage.Width = 300;
xImage.Height = 200;
xImage.Clip = xRect;
LayoutRoot.Children.Add(xImage);
This one works for images