我在 Expression Design 中创建了一个图像,我试图将其导入 Blend 以创建一个按钮。当我在 Blend 中调整它的大小时,我试图用它的容器(很可能是一个网格)来缩放按钮。不幸的是,这两种产品的文档都不是很有帮助。设计中的 xaml 如下所示:
<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="Document" Width="61" Height="61" Clip="F1 M 0,0L 61,0L 61,61L 0,61L 0,0">
<Canvas x:Name="MinimizeButtonBase" Width="799.999" Height="600" Canvas.Left="0" Canvas.Top="0">
<Viewbox x:Name="Group" Width="61" Height="61" Canvas.Left="0" Canvas.Top="0">
<Canvas Width="61" Height="61">
<Path x:Name="Path" Width="61" Height="61" Canvas.Left="0" Canvas.Top="3.05176e-005" Stretch="Fill" StrokeLineJoin="Round" Stroke="#B0000000" Data="F1 M 5.5,0.500031L 55.5,0.500031C 58.2614,0.500031 60.5,2.73859 60.5,5.5L 60.5,55.5C 60.5,58.2614 58.2614,60.5 55.5,60.5L 5.5,60.5C 2.73859,60.5 0.5,58.2614 0.5,55.5L 0.5,5.5C 0.5,2.73859 2.73859,0.500031 5.5,0.500031 Z ">
<Path.Fill>
<LinearGradientBrush StartPoint="0.561118,0.955553" EndPoint="0.58334,-0.177781">
<LinearGradientBrush.GradientStops>
<GradientStop Color="#B0000000" Offset="0"/>
<GradientStop Color="#B0FFFFFF" Offset="1"/>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Path.Fill>
</Path>
<Path x:Name="Line" Width="49.2547" Height="5" Canvas.Left="5.23578" Canvas.Top="47" Stretch="Fill" StrokeThickness="5" StrokeLineJoin="Round" Stroke="#B0000000" Data="M 7.73578,49.5L 51.9904,49.5"/>
</Canvas>
</Viewbox>
</Canvas>
有谁知道在设计中导入简单的 2 路径图像以使其成为混合按钮的步骤?当我将以下 xaml 添加到混合中的资源文件时,在将其转换为控件后调整大小时,我无法让按钮缩放到它的容器。