Jump to content
Software FX Community

Custom Border


timtos
 Share

Recommended Posts

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.

Link to comment
Share on other sites

  • 5 weeks later...

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

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...