Skip to content

Commit

Permalink
Obsolete Frame for NET9 in favor of Border (#23184)
Browse files Browse the repository at this point in the history
* Obsolete Frame for NET9

* - tizen fixes

* - tizen

* - fix deprecation errors

* - fix a few more frame areas

* - ignore tests not running on catalyst

* - remove a few more frames

* - few more test fixes

* - fix

* Update Issue15330.cs
  • Loading branch information
PureWeen authored Jun 28, 2024
1 parent 0050c0c commit 763ddb4
Show file tree
Hide file tree
Showing 40 changed files with 110 additions and 303 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Maui.Controls.Sample.Controls.CardView">
<Frame
<Border
x:Name="Card"
BackgroundColor="{Binding CardColor}"
BorderColor="{Binding BorderColor}"
CornerRadius="5"
HasShadow="True"
Stroke="{Binding BorderColor}"
Padding="8"
VerticalOptions="Center"
HorizontalOptions="Center"
Margin="0, 12, 0, 0">
<Border.StrokeShape>
<RoundRectangle CornerRadius="5" />
</Border.StrokeShape>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="75" />
Expand All @@ -23,23 +24,23 @@
<ColumnDefinition Width="75" />
<ColumnDefinition Width="200" />
</Grid.ColumnDefinitions>
<Frame
IsClippedToBounds="True"
BorderColor="{Binding BorderColor, FallbackValue='Black'}"
<Border
Stroke="{Binding BorderColor, FallbackValue='Black'}"
BackgroundColor="{Binding IconBackgroundColor, FallbackValue='Gray'}"
CornerRadius="38"
HeightRequest="60"
WidthRequest="60"
HorizontalOptions="Center"
HasShadow="False"
VerticalOptions="Center">
<Border.StrokeShape>
<RoundRectangle CornerRadius="38" />
</Border.StrokeShape>
<Image
Source="{Binding IconImageSource}"
Margin="-20"
WidthRequest="100"
HeightRequest="100"
Aspect="AspectFill" />
</Frame>
</Border>
<Label
Grid.Column="1"
Text="{Binding CardTitle, FallbackValue='Card Title'}"
Expand All @@ -61,5 +62,5 @@
VerticalOptions="Fill"
HorizontalOptions="Fill" />
</Grid>
</Frame>
</Border>
</ContentView>

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,9 @@ internal DataTemplate GetCarouselTemplate()
grid.Children.Add(info);
var frame = new Frame
var frame = new Border
{
Content = grid,
HasShadow = false
Content = grid
};
frame.SetBinding(BackgroundColorProperty, new Binding("Color"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,9 @@ internal DataTemplate GetCarouselTemplate()
grid.Children.Add(info);
var frame = new Frame
var frame = new Border
{
Content = grid,
HasShadow = false
Content = grid
};
frame.SetBinding(BackgroundColorProperty, new Binding("Color"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,9 @@ internal DataTemplate GetCarouselTemplate()
grid.Children.Add(info);
var frame = new Frame
var frame = new Border
{
Content = grid,
HasShadow = false
Content = grid
};
frame.SetBinding(BackgroundColorProperty, new Binding("Color"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Frame x:Name="frame" HasShadow="True" Padding="0" HorizontalOptions="Center" VerticalOptions="Center" BackgroundColor="Yellow">
<Border x:Name="frame" Padding="0" HorizontalOptions="Center" VerticalOptions="Center" BackgroundColor="Yellow">
<Grid>
<Image Source="{Binding FeaturedImage}" InputTransparent="true" Aspect="AspectFit" />
<Label Text="{Binding Index}" HorizontalOptions="Center" VerticalOptions="End" ></Label>
</Grid>
</Frame>
</Border>
</Grid>
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,14 @@ public static DataTemplate CarouselTemplate()
Grid.SetRow(caption, 1);
var frame = new Frame
var border = new Border
{
Padding = new Thickness(5),
BackgroundColor = Colors.Transparent,
Content = grid
};
return frame;
return border;
});
}

Expand Down Expand Up @@ -319,7 +319,7 @@ public static DataTemplate VariableSizeTemplate()

return new DataTemplate(() =>
{
var layout = new Frame();
var layout = new Border();
layout.SetBinding(VisualElement.HeightRequestProperty, new Binding("Index", converter: indexHeightConverter));
layout.SetBinding(VisualElement.WidthRequestProperty, new Binding("Index", converter: indexWidthConverter));
Expand Down Expand Up @@ -349,7 +349,7 @@ public static DataTemplate RandomSizeTemplate()

return new DataTemplate(() =>
{
var layout = new Frame();
var layout = new Border();
layout.SetBinding(VisualElement.HeightRequestProperty, new Binding("Index", converter: indexHeightConverter));
layout.SetBinding(VisualElement.WidthRequestProperty, new Binding("Index", converter: indexWidthConverter));
Expand Down Expand Up @@ -380,7 +380,7 @@ public static DataTemplate DynamicTextTemplate()
Margin = 10
};
var frame = new Frame
var frame = new Border
{
HeightRequest = 50,
WidthRequest = 200,
Expand Down
Loading

0 comments on commit 763ddb4

Please sign in to comment.