Skip to content

Commit b448f45

Browse files
author
Rawoof
committed
Image size reduced.
1 parent 4c9bf57 commit b448f45

File tree

19 files changed

+84
-0
lines changed

19 files changed

+84
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using Xamarin.Forms;
2+
using Xamarin.Forms.Platform.Android;
3+
4+
[assembly: ResolutionGroupName("EssentialUIKit")]
5+
[assembly: ExportEffect(typeof(EssentialUIKit.Droid.Effects.BorderlessEffect), nameof(EssentialUIKit.Droid.Effects.BorderlessEffect))]
6+
namespace EssentialUIKit.Droid.Effects
7+
{
8+
public class BorderlessEffect : PlatformEffect
9+
{
10+
protected override void OnAttached()
11+
{
12+
if (this.Control != null)
13+
{
14+
this.Control.SetBackground(null);
15+
this.Control.SetPadding(0, 0, 0, 0);
16+
}
17+
}
18+
19+
protected override void OnDetached()
20+
{
21+
}
22+
}
23+
}
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
using Windows.UI.Xaml;
2+
using Xamarin.Forms;
3+
using Xamarin.Forms.Platform.UWP;
4+
using Setter = Windows.UI.Xaml.Setter;
5+
using Style = Windows.UI.Xaml.Style;
6+
7+
[assembly: ResolutionGroupName("EssentialUIKit")]
8+
[assembly: ExportEffect(typeof(EssentialUIKit.UWP.Effects.BorderlessEffect), nameof(EssentialUIKit.UWP.Effects.BorderlessEffect))]
9+
10+
namespace EssentialUIKit.UWP.Effects
11+
{
12+
public class BorderlessEffect : PlatformEffect
13+
{
14+
protected override void OnAttached()
15+
{
16+
FormsTextBox formsTextBox = this.Control as FormsTextBox;
17+
if (formsTextBox != null)
18+
{
19+
formsTextBox.BorderThickness = new Windows.UI.Xaml.Thickness(0);
20+
formsTextBox.VerticalAlignment = VerticalAlignment.Center;
21+
22+
// Make the text vertically aligned at centre of the entry.
23+
Style style = new Style(typeof(Windows.UI.Xaml.Controls.ContentControl));
24+
style.Setters.Add(new Setter(FrameworkElement.VerticalAlignmentProperty, VerticalAlignment.Center));
25+
this.Control.Resources.Add(typeof(Windows.UI.Xaml.Controls.ContentControl), style);
26+
}
27+
}
28+
29+
protected override void OnDetached()
30+
{
31+
}
32+
}
33+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System;
2+
using UIKit;
3+
using Xamarin.Forms;
4+
using Xamarin.Forms.Platform.iOS;
5+
6+
[assembly: ResolutionGroupName("EssentialUIKit")]
7+
[assembly: ExportEffect(typeof(EssentialUIKit.iOS.Effects.BorderlessEffect), nameof(EssentialUIKit.iOS.Effects.BorderlessEffect))]
8+
9+
namespace EssentialUIKit.iOS.Effects
10+
{
11+
public class BorderlessEffect : PlatformEffect
12+
{
13+
14+
protected override void OnAttached()
15+
{
16+
UITextField uITextField = this.Control as UITextField;
17+
if (uITextField != null)
18+
{
19+
uITextField.BorderStyle = UITextBorderStyle.None;
20+
}
21+
}
22+
23+
protected override void OnDetached()
24+
{
25+
26+
}
27+
}
28+
}
-116 KB
Loading
-479 KB
Loading
-595 KB
Loading
-2.13 MB
Loading

0 commit comments

Comments
 (0)