зеркало из https://github.com/telerik/maui-docs.git
1.4 KiB
1.4 KiB
title | page_title | description | previous_url | slug |
---|---|---|---|---|
MultiPath | .NET MAUI Path Documentation - MultiPath | Learn more how to use the multi path which combines a number of Path Geometry objects into a single element. | /controls/path/path-multipath | path-multipath |
.NET MAUI Multi Path
The Multi Path allows you to combine a number of PathGeometry
objects into a single element. The Multi Path contains a collection of RadPathDefinition
objects and each of them provides a Geometry
property as well as the same styling properties as the Path.
The following example demonstrates how to define a RadMultiPath
.
The following code demonstrates the logic behind changing the Grid size:
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
this.root.SizeChanged += Root_SizeChanged;
}
private void Root_SizeChanged(object sender, EventArgs e)
{
double size = Math.Min(this.root.Width, this.root.Height / 2);
this.multiPath.WidthRequest = size;
this.multiPath.HeightRequest = size;
this.path2.WidthRequest = size;
this.path2.HeightRequest = size;
}
}
The image below shows the result:
See Also
- [PathGeometry]({% slug path-structure %})
- [Styling]({% slug path-styling %})