Code Monkey home page Code Monkey logo

Comments (9)

elachlan avatar elachlan commented on May 27, 2024 2

@RajClinton26 why are you using DesignerSerializationVisibility.Content on a bool property? Shouldn't you use DesignerSerializationVisibility.Visible?

DesignerSerializationVisibility.Content is for more complex objects like Collections, is that what you are having issues with?

@Epica3055 Can your team test that DesignerSerializationVisibility.Visible works okay on the same property?

from winforms.

merriemcgaw avatar merriemcgaw commented on May 27, 2024 1

@LeafShi1 can you guys pull out the list of types or properties in the sample project so we know which one's we're worrying about.

from winforms.

elachlan avatar elachlan commented on May 27, 2024 1

I have no idea, but at least there is a work around for now.

When you say non-complex object property do you mean a class or a primitive? DesignerSerializationVisibility.Content is really meant for collections and not much else. I suspect its the designer not checking the object type, or maybe it needs a custom TypeConverter for your class?

It is definitely a bug for a bool property to not be persisted when using DesignerSerializationVisibility.Content in my mind, the designer should handle that. Otherwise an analyzer should exist for DesignerSerializationVisibility.Content and warn users about using it on primitive properties.

from winforms.

Epica3055 avatar Epica3055 commented on May 27, 2024
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        public bool CanChangeValue
        {
            get;
            set;
        }

from winforms.

SathiyathanamSathish avatar SathiyathanamSathish commented on May 27, 2024

Hi @merriemcgaw / @LeafShi1 / @Epica3055 ,

Any update regarding the above designer related issues in .NET Core.?

from winforms.

RajClinton26 avatar RajClinton26 commented on May 27, 2024

@elachlan I have used the DesignerSerializationVisibility.Visible attribute on a property, and it worked fine.

However, when we used the DesignerSerializationVisibility.Content attribute on a non-complex object property, the assigned value to this property persists after rebuilding in .NET Framework, but not in .NET Core.

Could you please provide the reason for this inconsistency?

from winforms.

SathiyathanamSathish avatar SathiyathanamSathish commented on May 27, 2024

@elachlan - Thanks for the update. Can we consider this as a bug in .NET CORE.?

from winforms.

elachlan avatar elachlan commented on May 27, 2024

Up to the team. I do not work on the winforms team. I suggest using DesignerSerializationVisibility.Visible as a work around until it is fixed.

from winforms.

merriemcgaw avatar merriemcgaw commented on May 27, 2024

We will take a look at this, but be aware that since a simple workaround exists this issue won't be high in the priority list.

from winforms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.