Xaml.Label --> XF.Label or Forms.Label or View.Label or UI.Label
See original GitHub issueFeedback from @migueldeicaza and others:
rename
Xaml.FooBar
to something else, e.g.UI.FooBar
orXF.FooBar
orForms.FooBar
Of these I think I would prefer XF.Label
, XF.Button
etc., but please chime in if you have a preference.
Issue Analytics
- State:
- Created 5 years ago
- Comments:12
Top Results From Across the Web
Xaml.Label --> XF.Label or Forms.Label or View.Label or ...
This is a great argument for XF.Label vs Xaml.* right here. You refer to it as XF, but use Xaml, which will only...
Read more >Xamarin.Forms Label
The Label view is used for displaying text, both single and multi-line. Labels can have text decorations, colored text, and use custom fonts...
Read more >How to change label text in xamarin
Try initializing the Text value in XAML like the following: <Label x:Name="YourLableName" Text="Initial Label"/>. Then access it in the code ...
Read more >Building a Floating Label Entry with Xamarin.Forms
The Float Label Pattern was introduced as a UI concept back in 2013 by ... a Xamarin Forms project and adding a ContentView...
Read more >The Label control
An article on how and when to use the WPF Label control, including the usage of access keys/text and inline child controls.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @charlesroddie
Yes, 2 is necessary for 1.
The code is generated from the model in
bindings.json
and thebinding.json
is fairly straight-forward.Regarding size - I’ve added to the roadmap to double check that the Xamarin tree-shaker removes unused portions of the code and only leaves the update code for the controls you use. If it doesn’t there’s something wrong with the tree-shaker, since there are no circular dependencies.
TBH it’s actually fairly buttoned down. The process of code generation from bindings,json and subsequent compilation checks the overall validity of the construction of DynamicXaml.fs. There are niggles but the approach is sound in the sense that if properties are missing or the bindings.json model is ill-typed then you find out during the construction of the library. I’ve not encountered any practical typing problems from this approach.
You currently need to maintain bindings.json, and yes, there is a question of versioning and delivery.
For 3rd party controls there are various ways to skin this cat and we haven’t started skinning yet (as noted in the README.md). The approach closest to the results you want would be to make an F# type provider that automates the process. You would point the TP at any set of normal-looking control libraries (i.e. controls whose API surface area looks like the ones in Xamarin.Forms.Core.dll) and do the appropriate thing. An optional
bindings.json
could be used to configure this. The code would look something like thisIn theory this approach could remove the need for any base
Elmish.XamarinForms.dll
library and all necessary code would be injected into the user application. This removes versioning problems but comes with some other drawbacks.The approach is being prototyped over Xamarin.Forms but can in theory be applied to WPF and UWP directly. That’s a separate story though. XF is a sensible place to start. The approach is fairly straight-forward so it’s likely we’ll see other variations on it.
Note that implementing the C# 5.0 “open static classes” feature in F# would allow th prefix to be dropped altogether, but right now we need a qualifier.