Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8656913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:23:46+00:00 2026-06-12T15:23:46+00:00

I have made a control which inherits TextBox, and I’m trying to give a

  • 0

I have made a control which inherits TextBox, and I’m trying to give a notebook grid:

Notebook page

I already have the code that will specify where to draw the lines including all of the grids features, but I’m not sure what to draw it to.
I’ve Googled a lot and searched for a brush that will let me have the same interface as a DrawingContext (so I could call drawingContext.DrawLine() etc.), or something familiar, but I couldn’t find any!

So how can I achieve to get my grid background?

P.S I can’t create a static bmp file and load it, because the grid color and spacing would most certainly change

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T15:23:47+00:00Added an answer on June 12, 2026 at 3:23 pm

    You could try using DrawingVisual to get your DrawingContext then create a VisualBrush to assign to your Background. Something like this.

    DrawingVisual dv = new DrawingVisual();
    DrawingContext dc = dv.RenderOpen();
    
    dc.DrawLine( new Pen(Brushes.Red,5),new Point(0,0),new Point(50,50));
    dc.Close();
    
    VisualBrush vb = new VisualBrush(dv);
    textBox1.Background = vb;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made a control which has a property that is calculated by using
I have made a basic ascx control which is just a panel with a
I have made a code that read data from flash Nand (without filesystem). fd
I have made one function named SetControls(control controlName) which only takes control as a
We have a custom made server control which several properties defined in it. <cc1:DropdownCheck
I have made a custom control which consists of a richtextbox and a picture
I have made a web user control (.ascx) which consists of the two html
I have a use control which contains some ajax functionality. I made all necessary
I have a custom made ASP control which is based on a select (drop
I have made a segment control. In that there is three segments.. Now I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.