Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question on Telerik Namespace for components #20

Closed
BenHayat opened this issue Apr 25, 2019 · 3 comments
Closed

Question on Telerik Namespace for components #20

BenHayat opened this issue Apr 25, 2019 · 3 comments

Comments

@BenHayat
Copy link

Looking at the demo codes (razor pages) I see some pages like Calendar.razor uses both Telerik.Blazor namespace and the fully defined namespace for the Calendar
@using Telerik.Blazor
@using Telerik.Blazor.Components.Calendar

And in most other samples I only see the fully defined namespace for that component and not the Telerik.Blazor.

This has got me confused, as my thinking was Telerik.Blazor is the core component that ALL components use & share and then each component, i.e. Calendar has extra features and that's why we need to include it as using statement. But I find some inconsistency across some of the pages I was looking at.

What namespace hierarchy are being used with Telerik framework?
Perhaps the answer should also be in the docs to make it easier what using statement we should be using.
If I have missed it, please let me know.

Thanks!
..Ben

@ivanchev
Copy link
Contributor

ivanchev commented May 2, 2019

The Telerik.Blazor namespace is added because we currently hold some of the enums in it. For instance the IconName static class.

This was with the intention of having them available everywhere without the need of including an extra namespace - for instance inside a grid page, you were able to automatically use IconName.

However after the namespace changes implemented in preview 4, this was turned on its head, and we're now forced to be extremely verbose, until they introduce the ability to define namespaces.

In other words - this will be changed and fixed, and I'll update this issue when we do.

@BenHayat
Copy link
Author

BenHayat commented May 2, 2019

Thanks for the explanation.

@marin-bratanov
Copy link
Contributor

An improvement on the namespaces was implemented in the 2.0.0 release.

This repo will contain examples and is not going to be used as an issue tracker for the component suite itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants