Comments (14)
thanks to @pictos here is the deal:
To consume types from the custom namespace schema, the XAML compiler requires that there's a code reference from the assembly that consumes the types, to the assembly that defines the types. This can be accomplished by adding a class containing an Init method to the assembly that defines the types that will be consumed through XAML:
So for the namespace schema to work, you need to call initializer from App.xaml.cs like this:
public App()
{
InitializeComponent();
Sharpnado.Shades.Initializer.Initialize(false);
Sharpnado.Tabs.Initializer.Initialize(true, true);
}
from sharpnado.shadows.
@byme8 xmlns:shades="http://sharpnado.com" - change this to xmlns:shades="clr-namespace:Sharpnado.Shades;assembly=Sharpnado.Shadows"
from sharpnado.shadows.
Cannot replicate your issue
from sharpnado.shadows.
@themronion @byme8 how do you end up with this issue ?
what IDE are you using (including precise version number) ?
from sharpnado.shadows.
@roubachof I didn't even try to reproduce this issue, i just recommended the way i declare your plugin in xamls)
from sharpnado.shadows.
it's the new namespace attribute, it should work this way in the latest version
from sharpnado.shadows.
@themronion, with xmlns:shades="clr-namespace:Sharpnado.Shades;assembly=Sharpnado.Shadows"
everything works as expected. Thanks!
@roubachof, I am using Microsoft Visual Studio Community 2019 Version 16.7.6. Also tested on VS For Mac 8.7.8.4 and got the same compilation error.
from sharpnado.shadows.
how do you end up with this issue?
I just installed the package and VS resolved namespace as xmlns:shades="http://sharpnado.com"
. That's all.
from sharpnado.shadows.
Which version of XF please ?
from sharpnado.shadows.
Same for me on version XF 4.8.0.1451 the syntax only shows xmlns:shades="http://sharpnado.com" when implementing in XAML
from sharpnado.shadows.
@dansiegel do you have an idea what is causing this. I could replicate it also. If you add as a nuget package and you add a Shadows, it is fine with the intellisense but you end up with a compile error...
from sharpnado.shadows.
I'm not sure what's causing this, I know that you have your preferred prefix as sho
but I tried changing the xmlns to sho
and got the same result. It seems very similar to xamarin/Xamarin.Forms#8451 but I believe that has to do with a project not having been compiled yet which wouldn't quite be the same issue when you're working with a nuget...
Perhaps someone on the Forms team can provide some input here... to me it looks like a problem with XamlC
@Redth @StephaneDelcroix @PureWeen
from sharpnado.shadows.
Giving the control a name solved it for me, "x:name" to the shadow control
from sharpnado.shadows.
Yup cause it generates a code reference to the assembly.
from sharpnado.shadows.
Related Issues (20)
- [Bug][UWP] White Background added inside Shadow element when using SingleShade. HOT 3
- Shade ColorBindableProperty is not Dynamic ! HOT 6
- Very bad performance on Android HOT 8
- Colored Neumorphism HOT 2
- Can you please release a version for mac? HOT 1
- [Question] Adding shadow in Code Behind HOT 4
- Shadow works only with iOS HOT 6
- Shadow White Box HOT 2
- Java.Lang.OutOfMemoryError on Android HOT 7
- [Enhancement] Inner Shadows
- Crash: ShadowView.CreateBitmap: java.lang.nullpointerException HOT 3
- How-To: offset (0,-15) but bottom padding causes shadow on the lower side HOT 1
- [Bug] Super weird behavior with Material button
- Shadow binding stopped working in 1.2.0 version (worked in 1.1.0) HOT 21
- Possible to dynamically change properties on a shade using DataTriggers?
- Support MAUI HOT 7
- Strict mode - ShadowView LeakedClosableViolation
- [BUG] udating to XamarinFrom 5.0.0.2291 InvalidOperationException "Invalid on Color.Default"
- iOS shadows do not have the correct color after updating Sharpnado.Shadows Nuget
- Maui support? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sharpnado.shadows.