Skip to content

Commit

Permalink
8.6.1 version published.
Browse files Browse the repository at this point in the history
  • Loading branch information
gonultasmf committed Jul 27, 2024
1 parent e794676 commit 03e2598
Show file tree
Hide file tree
Showing 7 changed files with 257 additions and 14 deletions.
7 changes: 7 additions & 0 deletions libs/FmgLib.MauiMarkup/Extensions/BindableLayoutExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ public static T ItemsSources<T>(this T layout, IEnumerable source) where T : Bin
return layout;
}

public static T ItemsSources<T>(this T layout, Func<PropertyContext<IEnumerable>, IPropertyBuilder<IEnumerable>> configure) where T : BindableObject, Microsoft.Maui.ILayout
{
var context = new PropertyContext<IEnumerable>(layout, BindableLayout.ItemsSourceProperty);
configure(context).Build();
return layout;
}

public static T ItemTemplates<T>(this T layout, DataTemplate template) where T : BindableObject, Microsoft.Maui.ILayout
{
BindableLayout.SetItemTemplate(layout, template);
Expand Down
51 changes: 49 additions & 2 deletions libs/FmgLib.MauiMarkup/Extensions/EditorExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ public static T OnCompleted<T>(this T self, Action<T> action)
self.Completed += (o, arg) => action(self);
return self;
}


public static T TextCenterHorizontal<T>(this T self)
where T : Editor
Expand Down Expand Up @@ -398,6 +398,54 @@ public static T TextBottomStart<T>(this T self)
return self;
}

public static T TextTopCenterH<T>(this T self)
where T : Editor
{
self.SetValue(Editor.VerticalTextAlignmentProperty, TextAlignment.Start);
self.SetValue(Editor.HorizontalTextAlignmentProperty, TextAlignment.Center);
return self;
}

public static T TextBottomCenterH<T>(this T self)
where T : Editor
{
self.SetValue(Editor.VerticalTextAlignmentProperty, TextAlignment.End);
self.SetValue(Editor.HorizontalTextAlignmentProperty, TextAlignment.Center);
return self;
}

public static T TextCenterVEnd<T>(this T self)
where T : Editor
{
self.SetValue(Editor.VerticalTextAlignmentProperty, TextAlignment.Start);
self.SetValue(Editor.HorizontalTextAlignmentProperty, TextAlignment.End);
return self;
}

public static T TextCenterVStart<T>(this T self)
where T : Editor
{
self.SetValue(Editor.VerticalTextAlignmentProperty, TextAlignment.End);
self.SetValue(Editor.HorizontalTextAlignmentProperty, TextAlignment.End);
return self;
}

public static T AlignText<T>(this T self, TextAlignment vertical, TextAlignment horizontal)
where T : Editor
{
self.SetValue(Editor.VerticalTextAlignmentProperty, vertical);
self.SetValue(Editor.HorizontalTextAlignmentProperty, horizontal);
return self;
}

public static SettersContext<T> AlignText<T>(this SettersContext<T> self, TextAlignment vertical, TextAlignment horizontal)
where T : Editor
{
self.XamlSetters.Add(new Setter { Property = Editor.VerticalTextAlignmentProperty, Value = vertical });
self.XamlSetters.Add(new Setter { Property = Editor.HorizontalTextAlignmentProperty, Value = horizontal });
return self;
}

public static T TextTopEnd<T>(this T self)
where T : Editor
{
Expand Down Expand Up @@ -428,5 +476,4 @@ public static T TextEnd<T>(this T self)
return self;
}


}
52 changes: 50 additions & 2 deletions libs/FmgLib.MauiMarkup/Extensions/EntryCellExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,10 @@ public static T OnCompleted<T>(this T self, Action<T> action)
self.Completed += (o, arg) => action(self);
return self;
}


public static T TextCenterHorizontal<T>(this T self)
where T : EntryCell
where T : EntryCell
{
self.SetValue(EntryCell.HorizontalTextAlignmentProperty, TextAlignment.Center);
return self;
Expand Down Expand Up @@ -302,6 +302,54 @@ public static T TextBottomStart<T>(this T self)
return self;
}

public static T TextTopCenterH<T>(this T self)
where T : EntryCell
{
self.SetValue(EntryCell.VerticalTextAlignmentProperty, TextAlignment.Start);
self.SetValue(EntryCell.HorizontalTextAlignmentProperty, TextAlignment.Center);
return self;
}

public static T TextBottomCenterH<T>(this T self)
where T : EntryCell
{
self.SetValue(EntryCell.VerticalTextAlignmentProperty, TextAlignment.End);
self.SetValue(EntryCell.HorizontalTextAlignmentProperty, TextAlignment.Center);
return self;
}

public static T TextCenterVEnd<T>(this T self)
where T : EntryCell
{
self.SetValue(EntryCell.VerticalTextAlignmentProperty, TextAlignment.Start);
self.SetValue(EntryCell.HorizontalTextAlignmentProperty, TextAlignment.End);
return self;
}

public static T TextCenterVStart<T>(this T self)
where T : EntryCell
{
self.SetValue(EntryCell.VerticalTextAlignmentProperty, TextAlignment.End);
self.SetValue(EntryCell.HorizontalTextAlignmentProperty, TextAlignment.End);
return self;
}

public static T AlignText<T>(this T self, TextAlignment vertical, TextAlignment horizontal)
where T : EntryCell
{
self.SetValue(EntryCell.VerticalTextAlignmentProperty, vertical);
self.SetValue(EntryCell.HorizontalTextAlignmentProperty, horizontal);
return self;
}

public static SettersContext<T> AlignText<T>(this SettersContext<T> self, TextAlignment vertical, TextAlignment horizontal)
where T : EntryCell
{
self.XamlSetters.Add(new Setter { Property = EntryCell.VerticalTextAlignmentProperty, Value = vertical });
self.XamlSetters.Add(new Setter { Property = EntryCell.HorizontalTextAlignmentProperty, Value = horizontal });
return self;
}

public static T TextTopEnd<T>(this T self)
where T : EntryCell
{
Expand Down
53 changes: 50 additions & 3 deletions libs/FmgLib.MauiMarkup/Extensions/EntryExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -472,10 +472,10 @@ public static T OnCompleted<T>(this T self, Action<T> action)
self.Completed += (o, arg) => action(self);
return self;
}


public static T TextCenterHorizontal<T>(this T self)
where T : Entry
where T : Entry
{
self.SetValue(Entry.HorizontalTextAlignmentProperty, TextAlignment.Center);
return self;
Expand Down Expand Up @@ -526,6 +526,54 @@ public static T TextBottomStart<T>(this T self)
return self;
}

public static T TextTopCenterH<T>(this T self)
where T : Entry
{
self.SetValue(Entry.VerticalTextAlignmentProperty, TextAlignment.Start);
self.SetValue(Entry.HorizontalTextAlignmentProperty, TextAlignment.Center);
return self;
}

public static T TextBottomCenterH<T>(this T self)
where T : Entry
{
self.SetValue(Entry.VerticalTextAlignmentProperty, TextAlignment.End);
self.SetValue(Entry.HorizontalTextAlignmentProperty, TextAlignment.Center);
return self;
}

public static T TextCenterVEnd<T>(this T self)
where T : Entry
{
self.SetValue(Entry.VerticalTextAlignmentProperty, TextAlignment.Start);
self.SetValue(Entry.HorizontalTextAlignmentProperty, TextAlignment.End);
return self;
}

public static T TextCenterVStart<T>(this T self)
where T : Entry
{
self.SetValue(Entry.VerticalTextAlignmentProperty, TextAlignment.End);
self.SetValue(Entry.HorizontalTextAlignmentProperty, TextAlignment.End);
return self;
}

public static T AlignText<T>(this T self, TextAlignment vertical, TextAlignment horizontal)
where T : Entry
{
self.SetValue(Entry.VerticalTextAlignmentProperty, vertical);
self.SetValue(Entry.HorizontalTextAlignmentProperty, horizontal);
return self;
}

public static SettersContext<T> AlignText<T>(this SettersContext<T> self, TextAlignment vertical, TextAlignment horizontal)
where T : Entry
{
self.XamlSetters.Add(new Setter { Property = Entry.VerticalTextAlignmentProperty, Value = vertical });
self.XamlSetters.Add(new Setter { Property = Entry.HorizontalTextAlignmentProperty, Value = horizontal });
return self;
}

public static T TextTopEnd<T>(this T self)
where T : Entry
{
Expand Down Expand Up @@ -556,5 +604,4 @@ public static T TextEnd<T>(this T self)
return self;
}


}
53 changes: 50 additions & 3 deletions libs/FmgLib.MauiMarkup/Extensions/PickerExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -495,10 +495,10 @@ public static T OnSelectedIndexChanged<T>(this T self, Action<T> action)
self.SelectedIndexChanged += (o, arg) => action(self);
return self;
}


public static T TextCenterHorizontal<T>(this T self)
where T : Picker
where T : Picker
{
self.SetValue(Picker.HorizontalTextAlignmentProperty, TextAlignment.Center);
return self;
Expand Down Expand Up @@ -549,6 +549,54 @@ public static T TextBottomStart<T>(this T self)
return self;
}

public static T TextTopCenterH<T>(this T self)
where T : Picker
{
self.SetValue(Picker.VerticalTextAlignmentProperty, TextAlignment.Start);
self.SetValue(Picker.HorizontalTextAlignmentProperty, TextAlignment.Center);
return self;
}

public static T TextBottomCenterH<T>(this T self)
where T : Picker
{
self.SetValue(Picker.VerticalTextAlignmentProperty, TextAlignment.End);
self.SetValue(Picker.HorizontalTextAlignmentProperty, TextAlignment.Center);
return self;
}

public static T TextCenterVEnd<T>(this T self)
where T : Picker
{
self.SetValue(Picker.VerticalTextAlignmentProperty, TextAlignment.Start);
self.SetValue(Picker.HorizontalTextAlignmentProperty, TextAlignment.End);
return self;
}

public static T TextCenterVStart<T>(this T self)
where T : Picker
{
self.SetValue(Picker.VerticalTextAlignmentProperty, TextAlignment.End);
self.SetValue(Picker.HorizontalTextAlignmentProperty, TextAlignment.End);
return self;
}

public static T AlignText<T>(this T self, TextAlignment vertical, TextAlignment horizontal)
where T : Picker
{
self.SetValue(Picker.VerticalTextAlignmentProperty, vertical);
self.SetValue(Picker.HorizontalTextAlignmentProperty, horizontal);
return self;
}

public static SettersContext<T> AlignText<T>(this SettersContext<T> self, TextAlignment vertical, TextAlignment horizontal)
where T : Picker
{
self.XamlSetters.Add(new Setter { Property = Picker.VerticalTextAlignmentProperty, Value = vertical });
self.XamlSetters.Add(new Setter { Property = Picker.HorizontalTextAlignmentProperty, Value = horizontal });
return self;
}

public static T TextTopEnd<T>(this T self)
where T : Picker
{
Expand Down Expand Up @@ -579,5 +627,4 @@ public static T TextEnd<T>(this T self)
return self;
}


}
53 changes: 50 additions & 3 deletions libs/FmgLib.MauiMarkup/Extensions/SearchBarExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,10 @@ public static T OnSearchButtonPressed<T>(this T self, Action<T> action)
self.SearchButtonPressed += (o, arg) => action(self);
return self;
}


public static T TextCenterHorizontal<T>(this T self)
where T : SearchBar
where T : SearchBar
{
self.SetValue(SearchBar.HorizontalTextAlignmentProperty, TextAlignment.Center);
return self;
Expand Down Expand Up @@ -473,6 +473,54 @@ public static T TextBottomStart<T>(this T self)
return self;
}

public static T TextTopCenterH<T>(this T self)
where T : SearchBar
{
self.SetValue(SearchBar.VerticalTextAlignmentProperty, TextAlignment.Start);
self.SetValue(SearchBar.HorizontalTextAlignmentProperty, TextAlignment.Center);
return self;
}

public static T TextBottomCenterH<T>(this T self)
where T : SearchBar
{
self.SetValue(SearchBar.VerticalTextAlignmentProperty, TextAlignment.End);
self.SetValue(SearchBar.HorizontalTextAlignmentProperty, TextAlignment.Center);
return self;
}

public static T TextCenterVEnd<T>(this T self)
where T : SearchBar
{
self.SetValue(SearchBar.VerticalTextAlignmentProperty, TextAlignment.Start);
self.SetValue(SearchBar.HorizontalTextAlignmentProperty, TextAlignment.End);
return self;
}

public static T TextCenterVStart<T>(this T self)
where T : SearchBar
{
self.SetValue(SearchBar.VerticalTextAlignmentProperty, TextAlignment.End);
self.SetValue(SearchBar.HorizontalTextAlignmentProperty, TextAlignment.End);
return self;
}

public static T AlignText<T>(this T self, TextAlignment vertical, TextAlignment horizontal)
where T : SearchBar
{
self.SetValue(SearchBar.VerticalTextAlignmentProperty, vertical);
self.SetValue(SearchBar.HorizontalTextAlignmentProperty, horizontal);
return self;
}

public static SettersContext<T> AlignText<T>(this SettersContext<T> self, TextAlignment vertical, TextAlignment horizontal)
where T : SearchBar
{
self.XamlSetters.Add(new Setter { Property = SearchBar.VerticalTextAlignmentProperty, Value = vertical });
self.XamlSetters.Add(new Setter { Property = SearchBar.HorizontalTextAlignmentProperty, Value = horizontal });
return self;
}

public static T TextTopEnd<T>(this T self)
where T : SearchBar
{
Expand Down Expand Up @@ -503,5 +551,4 @@ public static T TextEnd<T>(this T self)
return self;
}


}
2 changes: 1 addition & 1 deletion libs/FmgLib.MauiMarkup/FmgLib.MauiMarkup.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PackageId>FmgLib.MauiMarkup</PackageId>
<Summary>FmgLib.MauiMarkup with C# Markup classes and fluent helper methods</Summary>
<Title>FmgLib.MauiMarkup</Title>
<Version>8.6.0</Version>
<Version>8.6.1</Version>
<Authors>FmgYazılım</Authors>
<Company>Fmg Yazılım</Company>
<Copyright>©2024</Copyright>
Expand Down

0 comments on commit 03e2598

Please sign in to comment.