Giter Club home page Giter Club logo

Comments (3)

dotMorten avatar dotMorten commented on August 27, 2024 1

@mikebattista I think v2.0 could have some cleanup of duplication - I'd like to have a chance to deprecate for a few releases first though, and I'd prefer to just keep it small.

from winuiex.

dotMorten avatar dotMorten commented on August 27, 2024

I think this is a fair argument - a bit caused by the evolution of WinUIEx over time as well as WinUI 3. WinUI have since added several members to AppWindow that WinUIEx already had, so they are now effectively passthrough - they weren't always.

Generally with methods I was relying on Extension methods, but for a lot of stuff I wanted to set things in XAML so exposed the properties for easier configuration of your window.

I'm not 100% sure how we could address this, without introducing a major set of breaking changes - something I'd be quite reluctant to do.

If the guidance is to use WindowEx or the extension methods but not both

I might have been a bit hasty on that recommendation. Extension methods add methods to WindowEx, but WindowEx itself is adding properties for configuration. I think this is a good split.

Where it gets tricky/ugly is when the extension methods also does similar functionality as the properties, but since we don't have extension properties in C#, these are mapped as methods, and you'll often get a Get/Set[propertyname]() method in addition to the WindowEx property. As long as they do the same thing though, I'm not sure it's such a big problem?

from winuiex.

mikebattista avatar mikebattista commented on August 27, 2024

I might have been a bit hasty on that recommendation. Extension methods add methods to WindowEx, but WindowEx itself is adding properties for configuration. I think this is a good split.
Where it gets tricky/ugly is when the extension methods also does similar functionality as the properties, but since we don't have extension properties in C#, these are mapped as methods, and you'll often get a Get/Set[propertyname]() method in addition to the WindowEx property. As long as they do the same thing though, I'm not sure it's such a big problem?

The duplication is what originally led us down the path of using WindowEx without the extensions, but if the recommendation is to use them together, then passing through to AppWindow is less necessary, since the extensions will be directly available on WindowEx, at the expense of perceived duplication. If we have to choose between living with the duplication but getting all the functionality vs. exposing a bunch of passthrough APIs and potentially introducing major breaking changes, then I'd be ok living with the duplication.

from winuiex.

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.