Skip to content

Commit

Permalink
Cleaned
Browse files Browse the repository at this point in the history
  • Loading branch information
IeuanWalker committed Apr 6, 2023
1 parent 525fb34 commit 31d3332
Show file tree
Hide file tree
Showing 17 changed files with 23 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Demo/Controls/Examples/BackButton.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
</stateButton:StateButton>
</ControlTemplate>
</ContentView.ControlTemplate>
</ContentView>
</ContentView>
2 changes: 1 addition & 1 deletion Demo/Controls/Examples/CustomButton.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
</stateButton:StateButton>
</ControlTemplate>
</ContentView.ControlTemplate>
</ContentView>
</ContentView>
2 changes: 2 additions & 0 deletions Demo/Controls/Examples/CustomButton.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ namespace App.Controls.Examples;
public partial class CustomButton : ContentView
{
public static readonly BindableProperty TextProperty = BindableProperty.Create(nameof(Text), typeof(string), typeof(CustomButton), string.Empty);

public string Text
{
get => (string)GetValue(TextProperty);
set => SetValue(TextProperty, value);
}

public event EventHandler? Clicked;

public CustomButton()
{
InitializeComponent();
Expand Down
2 changes: 1 addition & 1 deletion Demo/Controls/Examples/Examle1.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
TextColor="#313131"
VerticalTextAlignment="Center" />
</stateButton:StateButton>
</ContentView>
</ContentView>
2 changes: 1 addition & 1 deletion Demo/Controls/Examples/Example2.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@
</HorizontalStackLayout>
</Grid>
</stateButton:StateButton>
</ContentView>
</ContentView>
2 changes: 1 addition & 1 deletion Demo/Controls/Examples/Example3.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@
TextColor="#9FE9C8" />
</Grid>
</stateButton:StateButton>
</ContentView>
</ContentView>
2 changes: 1 addition & 1 deletion Demo/Controls/Examples/Example4.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
</Label.Triggers>
</Label>
</stateButton:StateButton>
</ContentView>
</ContentView>
2 changes: 1 addition & 1 deletion Demo/Controls/Examples/Example5.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@
</Label.Triggers>
</Label>
</stateButton:StateButton>
</ContentView>
</ContentView>
4 changes: 2 additions & 2 deletions Demo/Controls/Examples/Example6.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:stateButton="clr-namespace:IeuanWalker.Maui.StateButton;assembly=IeuanWalker.Maui.StateButton">
<ContentView.ControlTemplate>
<ControlTemplate>
<stateButton:StateButton Grid.Column="0"
<stateButton:StateButton Grid.Column="0"
BackgroundColor="#7B66FF"
Clicked="StateButton_Clicked"
ClickedCommand="{TemplateBinding ClickedCommand}"
Expand Down Expand Up @@ -37,4 +37,4 @@
</stateButton:StateButton>
</ControlTemplate>
</ContentView.ControlTemplate>
</ContentView>
</ContentView>
5 changes: 5 additions & 0 deletions Demo/Controls/Examples/Example6.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ namespace App.Controls.Examples;
public partial class Example6 : ContentView
{
public static readonly BindableProperty TextProperty = BindableProperty.Create(nameof(Text), typeof(string), typeof(CustomButton), string.Empty);

public string Text
{
get => (string)GetValue(TextProperty);
set => SetValue(TextProperty, value);
}

public static readonly BindableProperty AccessibilityHintProperty = BindableProperty.Create(nameof(AccessibilityHint), typeof(string), typeof(CustomButton), string.Empty);

public string AccessibilityHint
{
get => (string)GetValue(AccessibilityHintProperty);
Expand Down Expand Up @@ -102,7 +105,9 @@ public object ReleasedCommandParameter
}

public event EventHandler? Clicked;

public event EventHandler? Pressed;

public event EventHandler? Released;

public Example6()
Expand Down
2 changes: 1 addition & 1 deletion Demo/Controls/Examples/Example7.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
</stateButton:StateButton>
</ControlTemplate>
</ContentView.ControlTemplate>
</ContentView>
</ContentView>
1 change: 1 addition & 0 deletions Demo/Controls/Examples/Example7.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ namespace App.Controls.Examples;
public partial class Example7 : ContentView
{
public static readonly BindableProperty IconProperty = BindableProperty.Create(nameof(Icon), typeof(string), typeof(CustomButton), string.Empty);

public string Icon
{
get => (string)GetValue(IconProperty);
Expand Down
2 changes: 1 addition & 1 deletion Demo/Controls/Examples/Example8.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
TextColor="White"
VerticalTextAlignment="Center" />
</stateButton:StateButton>
</ContentView>
</ContentView>
2 changes: 2 additions & 0 deletions Demo/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ async void ExampleBtn_Clicked(object sender, EventArgs e)
{
await Navigation.PushAsync(new ExamplePage());
}

async void EventCommandBtn_Clicked(object sender, EventArgs e)
{
await Navigation.PushAsync(new EventCommandPage());
}

async void BtnNotInScrollView_Clicked(object sender, EventArgs e)
{
await Navigation.PushAsync(new ButtonNotInScrollViewPage());
Expand Down
1 change: 1 addition & 0 deletions Scr/Handler/IStateButtonHandler.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Microsoft.Maui.Handlers;

namespace IeuanWalker.Maui.StateButton.Handler;

public interface IStateButtonHandler : IBorderHandler
{
}
3 changes: 1 addition & 2 deletions Scr/Handler/StateButtonHandler.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using IeuanWalker.Maui.StateButton.Handler;
using Microsoft.Maui.Handlers;
using Microsoft.Maui.Handlers;

namespace IeuanWalker.Maui.StateButton.Handler;

Expand Down
1 change: 0 additions & 1 deletion Scr/Platform/CustomContentViewGroup.Android.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Views.Accessibility;
using Java.Lang;
using Microsoft.Maui.Platform;
using String = Java.Lang.String;
Expand Down

0 comments on commit 31d3332

Please sign in to comment.