Xaml 在图像上形成按钮
需要帮助,我是Xamarin的初学者 如何在图像上放置1和2个按钮? 我的XAML:Xaml 在图像上形成按钮,xaml,xamarin,xamarin.forms,Xaml,Xamarin,Xamarin.forms,需要帮助,我是Xamarin的初学者 如何在图像上放置1和2个按钮? 我的XAML: 试试这个: 您还需要为Im1和Im2设置边距 <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefiniti
试试这个:
您还需要为Im1和Im2设置边距
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image
Grid.Row="0"
Grid.RowSpan="3"
Source="{Binding ImSource}"
Aspect="AspectFill"
/>
<ImageButton
Grid.Row="0"
Source="{Binding Im1}"
HorizontalOptions="End" />
<ImageButton
Grid.Row="2"
Source="{Binding Im2}"
HorizontalOptions="Start"/>
</Grid>
试试这个:
您还需要为Im1和Im2设置边距
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image
Grid.Row="0"
Grid.RowSpan="3"
Source="{Binding ImSource}"
Aspect="AspectFill"
/>
<ImageButton
Grid.Row="0"
Source="{Binding Im1}"
HorizontalOptions="End" />
<ImageButton
Grid.Row="2"
Source="{Binding Im2}"
HorizontalOptions="Start"/>
</Grid>