我的应用将瓷砖(按钮)加载到每个longlistselector中。因此没有单独的按钮被编码。我正在尝试添加边框和圆角半径,但它根本没有用。边框添加了曲线,但实际的瓷砖不是弯曲的。有没有办法绕实际瓷砖的角落并正确添加边框?
<DataTemplate x:Key="SoundTileDataTemplate">
<StackPanel>
<Grid Background="{StaticResource PhoneAccentBrush}"
Margin="0,5,6,0" Height="56" Width="400"
toolkit:TiltEffect.IsTiltEnabled="True">
<Border BorderBrush="white" BorderThickness="3" CornerRadius="15,15,15,15" />
<TextBlock Text="{Binding Title}" FontSize="19" TextWrapping="Wrap" Width="140" FontFamily="Tahoma" />
<Image Source="/Assets/tiles/soundwave1.png" Width="30" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0,0,6,6" Visibility="{Binding Status, Converter={StaticResource DownloadStatusToIconVisibilityConverter}}" />
<ProgressBar Height="12" VerticalAlignment="Bottom" Padding="0" Margin="0" Foreground="{StaticResource PhoneForegroundBrush}" Value="{Binding DownloadProgress}" Visibility="{Binding Status, Converter={StaticResource DownloadStatusToProgressBarVisibilityConverter}}"/>
</Grid>
</StackPanel>
</DataTemplate>
答案 0 :(得分:4)
您的网格正在设置背景颜色,但形状不像边框。删除它。
<Grid Background="{StaticResource PhoneAccentBrush}"
设置边框背景颜色。
<Border BorderBrush="white"
BorderThickness="3"
CornerRadius="15,15,15,15"
Background="{StaticResource PhoneAccentBrush}"></Border>