日期:2014-05-17  浏览次数:20539 次

如何用WPF绘制三通管!会的帮忙,不会的帮顶!

RT!

------解决方案--------------------
让美工有AI给你画一个,你有Design生成XAML,就可以用了
------解决方案--------------------
给你整个简单的
XML code

<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="Untitled1" Width="200" Height="200" Clip="F1 M 0,0L 200,0L 200,200L 0,200L 0,0">
    <Canvas x:Name="Layer_1" Width="200" Height="200" Canvas.Left="0" Canvas.Top="0">
        <Path x:Name="Path" Width="61.0304" Height="160.026" Canvas.Left="32.1719" Canvas.Top="24.158" Stretch="Fill" StrokeThickness="1.33333" StrokeMiterLimit="2.75" Stroke="#FF000000" Data="F1 M 92.5356,84.4472C 92.5356,84.4472 86.5511,93.4757 86.275,103.471C 86.032,112.27 92.5356,120.355 92.5356,120.355L 92.5356,177.314C 92.5356,177.314 92.5356,183.055 61.1619,183.5C 32.8367,183.901 32.8385,177.314 32.8385,177.314L 32.8385,24.8246C 32.8385,24.8246 32.8385,31.973 62.6873,31.6493C 92.5427,31.3255 92.5356,24.8246 92.5356,24.8246L 92.5356,84.4472 Z ">
            <Path.Fill>
                <LinearGradientBrush StartPoint="-0.0447009,0.501209" EndPoint="1.04479,0.501209">
                    <LinearGradientBrush.GradientStops>
                        <GradientStop Color="#FFEBEBEB" Offset="0"/>
                        <GradientStop Color="#FFFF0000" Offset="1"/>
                    </LinearGradientBrush.GradientStops>
                </LinearGradientBrush>
            </Path.Fill>
        </Path>
        <Path x:Name="Path_0" Width="61.0304" Height="14.9826" Canvas.Left="32.1719" Canvas.Top="17.3333" Stretch="Fill" StrokeThickness="1.33333" StrokeMiterLimit="2.75" Stroke="#FF000000" Fill="#FFF38989" Data="F1 M 92.5356,24.8246C 92.5356,28.5937 79.1717,31.6493 62.6873,31.6493C 46.2024,31.6493 32.8385,28.5937 32.8385,24.8246C 32.8385,21.0556 46.2024,18 62.6873,18C 79.1717,18 92.5356,21.0556 92.5356,24.8246 Z "/>
        <Path x:Name="Path_1" Width="84.9003" Height="36.5276" Canvas.Left="85.6083" Canvas.Top="83.7806" Stretch="Fill" StrokeThickness="1.33333" StrokeMiterLimit="2.75" Stroke="#FF000000" Data="F1 M 169.842,119.642L 92.5356,119.642C 92.5356,119.642 86.275,111.794 86.275,103.471C 86.275,95.386 92.5356,84.4472 92.5356,84.4472L 169.842,84.4472L 169.842,119.642 Z ">
            <Path.Fill>
                <LinearGradientBrush StartPoint="0.5,1.73633" EndPoint="0.5,-0.736332">
                    <LinearGradientBrush.GradientStops>
                        <GradientStop Color="#FFEBEBEB" Offset="0"/>
                        <GradientStop Color="#FFFF0000" Offset="1"/>
                    </LinearGradientBrush.GradientStops>
                </LinearGradientBrush>
            </Path.Fill>
        </Path>
        <Path x:Name="Path_2" Width="7.40652" Height="36.5276" Canvas.Left="166.26" Canvas.Top="83.7806" Stretch="Fill" StrokeThickness="1.33333" StrokeMiterLimit="2.75" Stroke="#FF000000" Fill="#FF9F0202" Data="F1 M 173,102.044C 173,111.763 171.64,119.642 169.963,119.642C 168.287,119.642 166.927,111.763 166.927,102.044C 166.927,92.3257 168.287,84.4472 169.963,84.4472C 171.64,84.4472 173,92.3257 173,102.044