4 ms·
Everything else aside, as a frontend developer I picked up C# and XAML to build a Windows application and while I really enjoyed C# (so familiar to Typescript,
by madeofpalk 6y ago
Everything else aside, as a frontend developer I picked up C# and XAML to build a Windows application and while I really enjoyed C# (so familiar to Typescript, funny that), I was really disapointed by XAML.
At first XAML feels really nice because you've got the nice GridView and other UI components, but the moment you want to start customising these everything falls down. I was really disapointed by it's lack of more flexible layout semantics (like flexbox or display: grid), and instead offloading that all into writing custom C# code to lay things out at pixel locations.
What was just a single line in css - grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) - ended up being many lines of custom layout code to achieve something much less performant.
I find the codegen/bindings situation to be really weird and XAML as well. Making custom XAML components/reusing code is trickier than it should be. React really got it right with JSX being just a thin layer of syntactic sugar on regular JS (I'm unsure how this would work for a static language like C#)
- nwah1 6y agoHave the exact opposite experience. The inconsistency of the web platform is a nightmare compared to my pain-free experience with XAML. XAML and C# allows a single developer to get a functional modern application going quickly. I had zero problems with extensibility as long as I followed the patterns. Using MVVM, convertors, triggers, events, and behaviors where needed. The Blend tool is ridiculously cool, but I'm not artistic enough to make great use of it. But it reminds me of how Flash made me feel early on. As a kid I could make cartoons without issue in Flash. Almost everything is open source or has an open source replacement available. Making new UserControls is trivial. Much easier than any Web Components nonsense.
- madeofpalk 6y agoidk, maybe its just because I'm so inexperienced and I was learning this as I go, but it all seemed great to begin with, but quickly fell out once i got into the reality of actually developing and designing. I still don't know how you're supposed to properly update data for a grouped List/GridView without causing the entire view to rerender. I'm so used to React's functional approach to building UIs that mutating collections seemed extremley alien and cumbersome to me. I still never found a good way to achieve this a in in XAML, a grid layout where the cells will expand to fill remaining space on the row, and then wrap. Multiple components got kind of close, but always lacked 1 aspect https://codepen.io/joshhunt/full/qBOdYjj https://codepen.io/joshhunt/full/qBOdYjj
- deleted 6y ago[deleted]
- Const-me 6y ago> how you're supposed to properly update data for a grouped List/GridView without causing the entire view to rerender By telling your views what was updated. For updating sets of items, see INotifyCollectionChanged interface, implemented by ObservableCollection<T> from the framework. For updating properties, see INotifyPropertyChanged. > Multiple components got kind of close, but always lacked 1 aspect Find a panel that does it best, then either copy-paste and patch, or inherit and override. The entire layout model is implemented in just 2 methods, MeasureOverride and ArrangeOverride. They are virtual, i.e. designed to be user-replaceable as you inherit from framework classes.
- ss3000 6y agoThe original complaint was mostly around layout patterns. I'm not super familiar with XAML, but "offloading that all into writing custom C# code to lay things out at pixel locations" certainly doesn't sound like a great dev experience, and definitely doesn't sound very responsive. Does XAML have anything comparable to flexbox/grid for building responsive layouts?
- Const-me 6y ago> Does XAML have anything comparable to flexbox/grid WrapPanel > for building responsive layouts? There're two kinds of them. On the web it means arranging stuff to only have vertical scrolling but not horizontal. On desktop you often don't want any scrolling, no amount of auto-wrapping is going to do that regardless on the GUI framework.
- Mertax 6y agoConsider using straight up Blazor which lets you take advantage of HTML/CSS but use C# in the browser. I find Blazor to be incredibly productive. I built a rough[1] implementation of the board game “Aquire” to play with friends in about 3 weeks of part time development in the evenings using Blazor and am sold on its potential. [1] http://acquiregame.azurewebsites.net/ http://acquiregame.azurewebsites.net/
- madeofpalk 6y agoThis was to make a widget - ghostoverlay.com - for the Xbox Game Bar on Windows, so I was specificlly targeting native platforms. If I wanted to make a website, I'm more than confident and productive with HTML/CSS/JS/React to build out what i need.
- gregopet 6y agoI still wear scars from a XAML on Windows Phone project (which was a weirdly disfunctional subset of the "real" XAML). I've programmed a lot of weird things in my life, but that one takes a lot of cakes..