Hey guys we are going to implement shadow effects for the given label.
At first we are going to add Model Class( ShadowEffect.cs class) where we are going to define Radius,Color,DistanceX,DistanceY attribute for the given label.
Step1:ShadowEffect.cs
Our HomePage.Xaml Will take the platform specific label effect from local namespace.
Step2:HomePage.Xaml
LabelShadowEffect Renderer is the platform specific effect which will be exported with using this assembly [assembly:ExportEffect (typeof(LabelShadowEffect), “LabelShadowEffect“)]
All the label platform specific implementation effect will be inherited by the shared project. This is an alternative method to the usage of Custom renderer. All the platform specific effect available for the label is been called using this class.
Step3:Android Renderer
Our Ios project label effect will be used in order to provide platform specific effect to the label in our shared project.
Step4:IOS Renderer. we are going to get CornerRadius, Shadowcolor, Shadowoffset and Shadow opacity from platform specific project to give shadow effecct for the label.
At first we are going to add Model Class( ShadowEffect.cs class) where we are going to define Radius,Color,DistanceX,DistanceY attribute for the given label.
Step1:ShadowEffect.cs
Our HomePage.Xaml Will take the platform specific label effect from local namespace.
Step2:HomePage.Xaml
LabelShadowEffect Renderer is the platform specific effect which will be exported with using this assembly [assembly:ExportEffect (typeof(LabelShadowEffect), “LabelShadowEffect“)]
All the label platform specific implementation effect will be inherited by the shared project. This is an alternative method to the usage of Custom renderer. All the platform specific effect available for the label is been called using this class.
Step3:Android Renderer
Our Ios project label effect will be used in order to provide platform specific effect to the label in our shared project.
Step4:IOS Renderer. we are going to get CornerRadius, Shadowcolor, Shadowoffset and Shadow opacity from platform specific project to give shadow effecct for the label.