私はこれが古い質問であることを知っています...しかし、これにはいくつかの方法があります。これが Google の検索者に役立つことを願って、2 つの方法を共有します。
まず、その Canvas (変換された .ai ファイルから取得したもの) の周りに Viewbox を配置するだけです。希望どおりに動作させるには、Stretch プロパティと配置プロパティを調整する必要がある場合があることに注意してください。ただし、ほとんどの場合、Stretch を UniformToFill に設定し、配置プロパティを Center に設定します。
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="BackgroundSkin.MainWindow"
x:Name="Window"
Width="640"
Height="480"
>
<Grid x:Name="LayoutRoot">
<Viewbox
Stretch="UniformToFill"
HorizontalAlignment="Center"
VerticalAlignment="Center"
>
<!-- Replace the following Canvas with yours. -->
<Canvas Background="White"/>
</Viewbox>
</Grid>
</Window>
次に、より共有可能なもの (複数の Windows で背景として使用できるようなもの) が必要な場合は、そのアートワークからブラシを作成できます。これを行うにはいくつかの方法があります。1 つ目は、Expression Design を使用して .ai ファイルを DrawingBrush に変換できることを理解することです (つまり、Expression Design は、Canvas/Shape(s) または ResourceDictionary/Brush(es)) の 2 つの主な方法でエクスポートできます)。
再エクスポート用の元の .ai/.design ファイルがない場合は、キャンバスから VisualBrush を作成できます (@Ugar Turan が示唆するように)。今度は、VisualBrush で Stretch プロパティ (およびその他のプロパティ) をいじる必要がある可能性が高いことに注意してください。
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="BackgroundSkin.MainWindow"
x:Name="Window"
Width="640"
Height="480"
Background="{DynamicResource backgroundBrush}"
>
<Window.Resources>
<!-- Replace the following Canvas with yours. -->
<Canvas x:Key="backgroundCanvas"/>
<VisualBrush
x:Key="backgroundBrush"
Visual="{DynamicResource backgroundCanvas}"
Stretch="UniformToFill"
/>
</Window.Resources>
</Window>