timtos Posted March 30, 2009 Report Share Posted March 30, 2009 Hello everyone! Has anyone tried to create a custom border for a chart control? Or is it possible anyhow? So, I don't want to use for example: new ImageBorder(ImageBorderType.Slide) but something like new CustomBorder() I was trying to implement the IAdornment, IPersistable, IBorderAdornment interfaces but it does not seem to work as expected. Unfortunately, I didn't find any information concerning the creation of custom borders. Has anyone some more information? Any suggestions? Greetings and thanks, Tim. Quote Link to comment Share on other sites More sharing options...
RandyJ Posted April 29, 2009 Report Share Posted April 29, 2009 Hi By design you are only able to use SimpleBorder or ImageBorder objects. However, please note that you can also use the Draw() method which allows you to draw a SimpleBorder to a selected device context without ever assigning the SimpleBorder object to a chart. Take a look at the following sample: SimpleBorder simpleBorder = new SimpleBorder(); Rectangle rect = new Rectangle(0, 0, 500, 350); Graphics graphics = this.CreateGraphics(); simpleBorder.Type = SimpleBorderType.RaisedOuter; simpleBorder.Draw(graphics, rect, Color.Red); Regards, RandyJ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.