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 8888043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:57:06+00:00 2026-06-14T21:57:06+00:00

For example: public class DesignerPatternBrush : Brush { public string Name { get; set;

  • 0

For example:

public class DesignerPatternBrush : Brush
{
    public string Name { get; set; }
}

I would like to define my own Brush class by adding a new property called Name, but there is a compiler error:

error CS0534: ‘Brushes.DesignerPatternBrush’ does not implement inherited abstract member ‘System.Windows.Freezable.CreateInstanceCore()’

How can I add a Name property to a Brush type?

Note this related question: How do I implement a custom Brush in WPF? It answers the question of why it is not possible to literally inherit Brush. But is there some other way (e.g. using an attached property) to achieve the same effect I want?

  • 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-14T21:57:07+00:00Added an answer on June 14, 2026 at 9:57 pm

    As the compile error message says is Brush an abstract class –> you have to implement its abstract members

    to let Visual Studio do all the work for you there exist a shortcut.

    Select the Brush class and press Alt + Shift + F10 –> Enter
    the abstract class gets automatically implemented:

    public class T : Brush
    {
    
        protected override Freezable CreateInstanceCore()
        {
            throw new NotImplementedException();
        }
    }
    

    EDIT:

    but this will not work with the Brush class. Visual Studio auto-implements all methods which are visible, but the Brush class defines some methods as internal abstract

    i.e:

    internal abstract int GetChannelCountCore();
    

    As the Brush is defined in PresentationCore we will never be able to override the abstract method outside the assembly… –> impossible to inherit from the class

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Example: public class person { public String Name {get;set;} } public static class FactoryStatic
Consider the following example: public class BaseClass { public string StringInBaseClass {get;set;} public int
Consider this simple example - public class Person { private String name; private Date
public class DTOa { public int Id { get; set;} public string FirstName {
Example: public abstract class BaseControler : Controller { public IUnitOfWork UnitOfWork { get; set;
Example public class MyItems { public object Test1 {get ; set; } public object
public class ScheduleModel { [DisplayName(Example)] public bool DayOff { get; set; } } public
Let's take this class as an example: public class Student{ private String name; private
I have some class. For example: public class Data { private String name; public
Simple example: public class Person { String name; } public class VIP extends Person

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.