Skip to content

Commit

Permalink
Fixed files I didn't check in
Browse files Browse the repository at this point in the history
  • Loading branch information
PureWeen committed May 23, 2023
1 parent 2d600de commit 4b14438
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 38 deletions.
43 changes: 40 additions & 3 deletions ShanedlerSamples/Library/Common/HostExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Shapes = Microsoft.Maui.Controls.Shapes;

namespace Maui.FixesAndWorkarounds
{
Expand All @@ -15,13 +16,49 @@ public static MauiAppBuilder ConfigureRTLFixes(this MauiAppBuilder builder)
builder.ConfigureMauiHandlers(handlers =>
{
#if IOS || MACCATALYST
handlers.AddHandler(typeof(Microsoft.Maui.ILayout), typeof(CustomLayoutHandler));
handlers.AddHandler<CollectionView, CustomCollectionViewHandler>();
handlers.AddHandler<CarouselView, CustomCarouselViewHandler>();
handlers.AddHandler<ActivityIndicator, CustomActivityIndicatorHandler>();
handlers.AddHandler<BoxView, CustomShapeViewHandler>();
handlers.AddHandler<Button, CustomButtonHandler>();
handlers.AddHandler<CheckBox, CustomCheckBoxHandler>();
handlers.AddHandler<DatePicker, CustomDatePickerHandler>();
handlers.AddHandler<Editor, CustomEditorHandler>();
handlers.AddHandler<Entry, CustomEntryHandler>();
handlers.AddHandler<GraphicsView, CustomGraphicsViewHandler>();
handlers.AddHandler<Image, CustomImageHandler>();
handlers.AddHandler<Label, CustomLabelHandler>();
handlers.AddHandler<Layout, CustomLayoutHandler>();
handlers.AddHandler<Picker, CustomPickerHandler>();
handlers.AddHandler<ProgressBar, CustomProgressBarHandler>();
handlers.AddHandler<ScrollView, CustomScrollViewHandler>();
handlers.AddHandler<SearchBar, CustomSearchBarHandler>();
handlers.AddHandler<Slider, CustomSliderHandler>();
handlers.AddHandler<Stepper, CustomStepperHandler>();
handlers.AddHandler<Switch, CustomSwitchHandler>();
handlers.AddHandler<TimePicker, CustomTimePickerHandler>();
handlers.AddHandler<Page, CustomPageHandler>();
handlers.AddHandler<WebView, CustomWebViewHandler>();
handlers.AddHandler<Border, CustomBorderHandler>();
handlers.AddHandler<IContentView, CustomContentViewHandler>();
handlers.AddHandler<Shapes.Ellipse, CustomShapeViewHandler>();
handlers.AddHandler<Shapes.Line, CustomLineHandler>();
handlers.AddHandler<Shapes.Path, CustomPathHandler>();
handlers.AddHandler<Shapes.Polygon, CustomPolygonHandler>();
handlers.AddHandler<Shapes.Polyline, CustomPolylineHandler>();
handlers.AddHandler<Shapes.Rectangle, CustomRectangleHandler>();
handlers.AddHandler<Shapes.RoundRectangle, CustomRoundRectangleHandler>();
handlers.AddHandler<ImageButton, CustomImageButtonHandler>();
handlers.AddHandler<IndicatorView, CustomIndicatorViewHandler>();
handlers.AddHandler<RadioButton, CustomRadioButtonHandler>();
handlers.AddHandler(typeof(Layout), typeof(CustomLayoutHandler));
handlers.AddHandler(typeof(Page), typeof(CustomPageHandler));
handlers.AddHandler(typeof(ContentView), typeof(CustomContentViewHandler));
handlers.AddHandler(typeof(Button), typeof(CustomButtonViewHandler));
handlers.AddHandler(typeof(Label), typeof(CustomLabelViewHandler));
handlers.AddHandler(typeof(Entry), typeof(CustomEntryViewHandler));
#endif
});
return builder;
Expand Down
72 changes: 37 additions & 35 deletions ShanedlerSamples/Library/Workarounds/CustomRTLHandlerFixes.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
using System;
#if IOS || MACCATALYST
using UIKit;
using CoreGraphics;
#endif
using Maui.FixesAndWorkarounds.Library.Common;
using Microsoft.Maui.Controls.Handlers;
using Microsoft.Maui.Controls.Handlers.Items;
using Microsoft.Maui.Handlers;
using Microsoft.Maui.Platform;
using UIKit;

namespace Maui.FixesAndWorkarounds
{
Expand All @@ -15,7 +17,7 @@ public CustomPageHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -27,7 +29,7 @@ public CustomLayoutHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -39,7 +41,7 @@ public CustomContentViewHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -51,7 +53,7 @@ public CustomButtonHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -63,7 +65,7 @@ public CustomLabelHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -75,7 +77,7 @@ public CustomEntryHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);

Expand All @@ -95,7 +97,7 @@ public CustomBorderHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -107,7 +109,7 @@ public CustomEditorHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -119,7 +121,7 @@ public CustomCollectionViewHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -131,7 +133,7 @@ public CustomCarouselViewHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -143,7 +145,7 @@ public CustomActivityIndicatorHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -155,7 +157,7 @@ public CustomShapeViewHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -167,7 +169,7 @@ public CustomCheckBoxHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -179,7 +181,7 @@ public CustomDatePickerHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -191,7 +193,7 @@ public CustomGraphicsViewHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -203,7 +205,7 @@ public CustomImageHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -215,7 +217,7 @@ public CustomPickerHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -227,7 +229,7 @@ public CustomProgressBarHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -241,7 +243,7 @@ public CustomScrollViewHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect)
{
this.PlatformArrangeHandler(rect);
Expand Down Expand Up @@ -289,7 +291,7 @@ public CustomSearchBarHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -301,7 +303,7 @@ public CustomSliderHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -313,7 +315,7 @@ public CustomStepperHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -325,7 +327,7 @@ public CustomSwitchHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -337,7 +339,7 @@ public CustomTimePickerHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -349,7 +351,7 @@ public CustomWebViewHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -361,7 +363,7 @@ public CustomLineHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -373,7 +375,7 @@ public CustomPathHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -385,7 +387,7 @@ public CustomPolygonHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -397,7 +399,7 @@ public CustomPolylineHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -409,7 +411,7 @@ public CustomRectangleHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -421,7 +423,7 @@ public CustomRoundRectangleHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -433,7 +435,7 @@ public CustomImageButtonHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -445,7 +447,7 @@ public CustomIndicatorViewHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand All @@ -457,7 +459,7 @@ public CustomRadioButtonHandler()
{
}

#if IOS
#if IOS || MACCATALYST
public override void PlatformArrange(Rect rect) =>
this.PlatformArrangeHandler(rect);
#endif
Expand Down

0 comments on commit 4b14438

Please sign in to comment.