Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ public object ConvertBack(object value, Type targetType, object parameter, Cultu
}
return Binding.DoNothing;
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,113 +16,133 @@
</ResourceDictionary>
</ContentPage.Resources>

<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Shape Display Area -->
<ScrollView Grid.Row="1">
<ContentView Padding="20"
BackgroundColor="White">
<Grid WidthRequest="400"
HeightRequest="400"
HorizontalOptions="Center"
VerticalOptions="Center">
<!-- Rectangle Shape -->
<Rectangle x:Name="RectangleShape"
WidthRequest="{Binding Width}"
HeightRequest="{Binding Height}"
Fill="{Binding FillColor}"
Stroke="{Binding StrokeColor}"
HorizontalOptions="Center"
VerticalOptions="Center"
StrokeThickness="{Binding StrokeThickness}"
StrokeDashArray="{Binding StrokeDashCollection}"
StrokeDashOffset="{Binding StrokeDashOffset}"
RadiusX="{Binding RadiusX}"
RadiusY="{Binding RadiusY}"
Shadow="{Binding BoxShadow}"
IsVisible="{Binding SelectedShapeType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Rectangle}"
AutomationId="RectangleShape"/>
<Grid Padding="20"
HorizontalOptions="Center"
VerticalOptions="Center">
<!-- Rectangle Shape -->
<Rectangle x:Name="RectangleShape"
WidthRequest="{Binding Width}"
HeightRequest="{Binding Height}"
Fill="{Binding FillColor}"
Stroke="{Binding StrokeColor}"
HorizontalOptions="Center"
VerticalOptions="Center"
StrokeThickness="{Binding StrokeThickness}"
StrokeDashArray="{Binding StrokeDashCollection}"
StrokeDashOffset="{Binding StrokeDashOffset}"
StrokeLineCap="{Binding StrokeLineCap}"
StrokeLineJoin="{Binding StrokeLineJoin}"
RadiusX="{Binding RadiusX}"
RadiusY="{Binding RadiusY}"
Shadow="{Binding BoxShadow}"
IsVisible="{Binding SelectedShapeType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Rectangle}"
AutomationId="RectangleShape"/>

<!-- RoundRectangle Shape -->
<shapes:RoundRectangle x:Name="RoundRectangleShape"
Stroke="{Binding StrokeColor}"
StrokeThickness="{Binding StrokeThickness}"
WidthRequest="{Binding Width}"
HeightRequest="{Binding Height}"
CornerRadius="{Binding CornerRadius}"
Fill="{Binding FillColor}"
StrokeDashArray="{Binding StrokeDashCollection}"
StrokeDashOffset="{Binding StrokeDashOffset}"
StrokeLineCap="{Binding StrokeLineCap}"
StrokeLineJoin="{Binding StrokeLineJoin}"
Shadow="{Binding BoxShadow}"
IsVisible="{Binding SelectedShapeType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=RoundRectangle}"
AutomationId="RoundRectangleShape"/>

<!-- Ellipse Shape -->
<Ellipse x:Name="EllipseShape"
WidthRequest="{Binding Width}"
HeightRequest="{Binding Height}"
Fill="{Binding FillColor}"
HorizontalOptions="Center"
VerticalOptions="Center"
Stroke="{Binding StrokeColor}"
StrokeThickness="{Binding StrokeThickness}"
StrokeDashArray="{Binding StrokeDashCollection}"
StrokeDashOffset="{Binding StrokeDashOffset}"
Shadow="{Binding BoxShadow}"
IsVisible="{Binding SelectedShapeType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Ellipse}"
AutomationId="EllipseShape"/>
<!-- Ellipse Shape -->
<Ellipse x:Name="EllipseShape"
WidthRequest="{Binding Width}"
HeightRequest="{Binding Height}"
Fill="{Binding FillColor}"
HorizontalOptions="Center"
VerticalOptions="Center"
Stroke="{Binding StrokeColor}"
StrokeThickness="{Binding StrokeThickness}"
StrokeDashArray="{Binding StrokeDashCollection}"
StrokeDashOffset="{Binding StrokeDashOffset}"
StrokeLineCap="{Binding StrokeLineCap}"
StrokeLineJoin="{Binding StrokeLineJoin}"
Shadow="{Binding BoxShadow}"
IsVisible="{Binding SelectedShapeType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Ellipse}"
AutomationId="EllipseShape"/>

<!-- Line Shape -->
<Line x:Name="LineShape"
X1="{Binding X1}"
Y1="{Binding Y1}"
X2="{Binding X2}"
Y2="{Binding Y2}"
VerticalOptions="Center"
HorizontalOptions="Center"
Stroke="{Binding StrokeColor}"
StrokeThickness="{Binding StrokeThickness}"
StrokeDashArray="{Binding StrokeDashCollection}"
StrokeDashOffset="{Binding StrokeDashOffset}"
Shadow="{Binding BoxShadow}"
IsVisible="{Binding SelectedShapeType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Line}"
AutomationId="LineShape"/>
<!-- Line Shape -->
<Line x:Name="LineShape"
X1="{Binding X1}"
Y1="{Binding Y1}"
X2="{Binding X2}"
Y2="{Binding Y2}"
VerticalOptions="Center"
HorizontalOptions="Center"
Stroke="{Binding StrokeColor}"
StrokeThickness="{Binding StrokeThickness}"
StrokeDashArray="{Binding StrokeDashCollection}"
StrokeDashOffset="{Binding StrokeDashOffset}"
StrokeLineCap="{Binding StrokeLineCap}"
StrokeLineJoin="{Binding StrokeLineJoin}"
Shadow="{Binding BoxShadow}"
IsVisible="{Binding SelectedShapeType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Line}"
AutomationId="LineShape"/>

<!-- Polygon Shape -->
<Polygon x:Name="PolygonShape"
Points="{Binding PolygonPointCollection}"
Fill="{Binding FillColor}"
Stroke="{Binding StrokeColor}"
VerticalOptions="Center"
HorizontalOptions="Center"
StrokeThickness="{Binding StrokeThickness}"
StrokeDashArray="{Binding StrokeDashCollection}"
StrokeDashOffset="{Binding StrokeDashOffset}"
Shadow="{Binding BoxShadow}"
WidthRequest="{Binding Width}"
IsVisible="{Binding SelectedShapeType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Polygon}"
AutomationId="PolygonShape"/>
<!-- Polygon Shape -->
<Polygon x:Name="PolygonShape"
Points="{Binding PolygonPointCollection}"
Fill="{Binding FillColor}"
Stroke="{Binding StrokeColor}"
VerticalOptions="Center"
HorizontalOptions="Center"
StrokeThickness="{Binding StrokeThickness}"
StrokeDashArray="{Binding StrokeDashCollection}"
StrokeDashOffset="{Binding StrokeDashOffset}"
StrokeLineCap="{Binding StrokeLineCap}"
StrokeLineJoin="{Binding StrokeLineJoin}"
FillRule="{Binding FillRule}"
Shadow="{Binding BoxShadow}"
WidthRequest="{Binding Width}"
HeightRequest="{Binding Height}"
IsVisible="{Binding SelectedShapeType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Polygon}"
AutomationId="PolygonShape"/>

<!-- Polyline Shape -->
<Polyline x:Name="PolylineShape"
Points="{Binding PolylinePointCollection}"
Stroke="{Binding StrokeColor}"
StrokeThickness="{Binding StrokeThickness}"
StrokeDashArray="{Binding StrokeDashCollection}"
VerticalOptions="Center"
HorizontalOptions="Center"
StrokeDashOffset="{Binding StrokeDashOffset}"
Shadow="{Binding BoxShadow}"
IsVisible="{Binding SelectedShapeType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Polyline}"
AutomationId="PolylineShape"/>
<!-- Polyline Shape -->
<Polyline x:Name="PolylineShape"
Points="{Binding PolylinePointCollection}"
Stroke="{Binding StrokeColor}"
StrokeThickness="{Binding StrokeThickness}"
StrokeDashArray="{Binding StrokeDashCollection}"
VerticalOptions="Center"
HorizontalOptions="Center"
StrokeDashOffset="{Binding StrokeDashOffset}"
StrokeLineCap="{Binding StrokeLineCap}"
StrokeLineJoin="{Binding StrokeLineJoin}"
FillRule="{Binding FillRule}"
Shadow="{Binding BoxShadow}"
WidthRequest="{Binding Width}"
HeightRequest="{Binding Height}"
IsVisible="{Binding SelectedShapeType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Polyline}"
AutomationId="PolylineShape"/>

<!-- Path Shape -->
<Path x:Name="PathShape"
Data="{Binding PathGeometry}"
Fill="{Binding FillColor}"
Stroke="{Binding StrokeColor}"
StrokeThickness="{Binding StrokeThickness}"
VerticalOptions="Center"
HorizontalOptions="Center"
StrokeDashArray="{Binding StrokeDashCollection}"
StrokeDashOffset="{Binding StrokeDashOffset}"
Shadow="{Binding BoxShadow}"
WidthRequest="{Binding Width}"
HeightRequest="{Binding Height}"
IsVisible="{Binding SelectedShapeType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Path}"
AutomationId="PathShape"/>
</Grid>
</ContentView>
</ScrollView>
<!-- Path Shape -->
<Path x:Name="PathShape"
Data="{Binding PathGeometry}"
Fill="{Binding FillColor}"
Stroke="{Binding StrokeColor}"
StrokeThickness="{Binding StrokeThickness}"
VerticalOptions="Center"
HorizontalOptions="Center"
StrokeDashArray="{Binding StrokeDashCollection}"
StrokeDashOffset="{Binding StrokeDashOffset}"
StrokeLineCap="{Binding StrokeLineCap}"
StrokeLineJoin="{Binding StrokeLineJoin}"
Aspect="{Binding Aspect}"
Shadow="{Binding BoxShadow}"
WidthRequest="{Binding Width}"
HeightRequest="{Binding Height}"
IsVisible="{Binding SelectedShapeType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Path}"
AutomationId="PathShape"/>
</Grid>
</ContentPage>
</ContentPage>
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ public ShapesControlMainPage(ShapesViewModel viewModel)

private async void NavigateToOptionsPage_Clicked(object sender, EventArgs e)
{
BindingContext = _viewModel = new ShapesViewModel();
// Reset to defaults before each options visit so every test starts from a known state.
_viewModel.ResetToDefaults();
await Navigation.PushAsync(new ShapesOptionsPage(_viewModel));
}
}
}
Loading
Loading