-1
私は、XAMLで画像境界でボタンを得た:UWPボタンのボーダーのイメージブラシイメージがコードの背後にありますか?
<Button Content="Button" HorizontalAlignment="Left" Height="128" Margin="405,16,0,0" Grid.Row="1" VerticalAlignment="Top" Width="295" Foreground="Red">
<Button.BorderBrush>
<ImageBrush Stretch="Fill" ImageSource="Assets/myGraphic.png"/>
</Button.BorderBrush>
</Button>
の背後にあるコードのためのコードが何でありますか?
私のコード:あなたの助けのための
Button button = new Button()
{
FontWeight = FontWeights.Bold,
FontSize = 12,
--> BorderBrush = ?? // new Imagesource("Assets/myGraphic.png")
// Foreground = new SolidColorBrush(Colors.Red),
VerticalContentAlignment = VerticalAlignment.Bottom,
HorizontalContentAlignment = HorizontalAlignment.Center,
Content = "my new Button",
Tag = i
};
感謝!