Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple nested canvases in Expression Design xaml output, why?

Just wondering why Expression Blend outputs a path nested in two canvases (rather than just one), I've also seen some with 3 or more but still outputting just one path:

<?xml version="1.0" encoding="utf-8"?>
<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="cross" Width="146.768" Height="146.768" Clip="F1 M 0,0L 146.768,0L 146.768,146.768L 0,146.768L 0,0" UseLayoutRounding="False">
    <Canvas x:Name="Layer_1" Width="146.768" Height="146.768" Canvas.Left="0" Canvas.Top="0">
        <Path x:Name="Path" Width="138.605" Height="138.605" Canvas.Left="4.12044" Canvas.Top="4.04301" Stretch="Fill" Fill="#FFF80000" Data="F1 M 4.28074,121.084L 4.15843,120.962C 4.40034,118.924 6.48998,117.557 7.9421,116.108C 10.772,113.284 13.6019,110.46 16.4318,107.637C 24.1129,99.9719 31.794,92.3074 39.4752,84.6428C 41.9008,82.2224 44.3264,79.802 46.752,77.3816C 47.1563,76.9782 47.5606,76.5748 47.9648,76.1714C 48.3691,75.768 48.7734,75.3646 49.1776,74.9613C 49.5819,74.5579 50.143,74.2658 50.3904,73.7511C 50.5336,73.4532 50.4055,73.0526 50.2299,72.7726C 49.9265,72.2889 49.4216,71.9658 49.0175,71.5624C 48.6134,71.159 48.2092,70.7556 47.8051,70.3522C 46.5927,69.142 45.3803,67.9318 44.1679,66.7216C 40.1265,62.6877 36.0852,58.6537 32.0438,54.6197C 25.9818,48.5687 19.9197,42.5177 13.8577,36.4668C 11.837,34.4498 9.81633,32.4328 7.79565,30.4158C 6.58325,29.2056 5.06703,28.2374 4.15843,26.7852C 4.04955,26.6112 4.20685,26.3775 4.23105,26.1737C 4.25526,25.9698 4.18553,25.73 4.30367,25.5621C 4.62703,25.1027 5.10008,24.7694 5.49829,24.3731C 5.89649,23.9767 6.2947,23.5803 6.6929,23.184C 8.28572,21.5985 9.87855,20.013 11.4714,18.4276C 14.657,15.2567 17.8427,12.0857 21.0283,8.91483C 22.6211,7.32936 23.8951,5.34012 25.8068,4.15845C 26.5968,3.67004 27.5839,4.85898 28.24,5.51649C 28.6434,5.92078 29.0468,6.32503 29.4502,6.72931C 29.8536,7.13358 30.257,7.53784 30.6604,7.94211C 33.8876,11.1763 37.1148,14.4104 40.342,17.6446C 47.6031,24.9215 54.8643,32.1983 62.1255,39.4752C 64.5459,41.9008 66.9662,44.3264 69.3866,46.752C 69.79,47.1563 70.1934,47.5606 70.5968,47.9648C 71.0002,48.3691 71.4036,48.7734 71.807,49.1776C 72.2104,49.5819 72.5025,50.143 73.0172,50.3904C 73.3151,50.5337 73.7157,50.4056 73.9957,50.2299C 74.4794,49.9265 74.8025,49.4216 75.2059,49.0175C 75.6093,48.6134 76.0127,48.2092 76.4161,47.8051C 76.8195,47.401 77.2229,46.9968 77.6263,46.5927C 80.8534,43.3596 84.0806,40.1265 87.3078,36.8934C 94.569,29.619 101.83,22.3446 109.091,15.0701C 111.512,12.6453 113.932,10.2205 116.352,7.79567C 117.563,6.58325 118.531,5.06705 119.983,4.15845C 120.763,3.67059 121.746,4.84642 122.395,5.49829C 122.792,5.89648 123.188,6.29471 123.584,6.6929C 123.981,7.09113 124.377,7.48932 124.773,7.88753C 127.152,10.2768 129.53,12.666 131.908,15.0552C 134.286,17.4445 136.664,19.8337 139.043,22.2229C 139.439,22.6211 139.835,23.0193 140.232,23.4175C 140.628,23.8157 141.024,24.2139 141.421,24.6121C 142.04,25.2343 142.971,26.3126 142.465,27.0298C 141.477,28.4297 140.039,29.4502 138.826,30.6604C 136.401,33.0808 133.975,35.5012 131.549,37.9216C 123.868,45.5862 116.187,53.2507 108.506,60.9153C 105.676,63.7391 102.846,66.5628 100.016,69.3866C 99.612,69.79 99.2077,70.1934 98.8034,70.5968C 98.3992,71.0002 97.9949,71.4036 97.5906,71.807C 97.1864,72.2104 96.6253,72.5025 96.3778,73.0172C 96.2346,73.3151 96.3627,73.7157 96.5384,73.9957C 96.8418,74.4794 97.3466,74.8025 97.7508,75.2059C 98.1549,75.6093 98.559,76.0127 98.9632,76.4161C 99.3673,76.8195 99.7714,77.2229 100.176,77.6263C 103.409,80.8534 106.642,84.0806 109.875,87.3078C 117.149,94.569 124.424,101.83 131.698,109.091C 134.123,111.512 136.548,113.932 138.973,116.352C 140.185,117.563 141.701,118.531 142.61,119.983C 143.098,120.763 141.922,121.746 141.27,122.395C 140.872,122.792 140.474,123.188 140.075,123.584C 139.677,123.981 139.279,124.377 138.881,124.773C 136.492,127.152 134.102,129.53 131.713,131.908C 129.324,134.286 126.935,136.664 124.545,139.043C 124.147,139.439 123.749,139.835 123.351,140.232C 122.953,140.628 122.554,141.024 122.156,141.421C 121.534,142.04 120.456,142.971 119.738,142.465C 118.339,141.477 117.318,140.039 116.108,138.826C 113.687,136.401 111.267,133.975 108.847,131.549C 101.182,123.868 93.5176,116.187 85.853,108.506C 83.0292,105.676 80.2054,102.846 77.3816,100.016C 76.9782,99.612 76.5748,99.2077 76.1714,98.8035C 75.768,98.3992 75.3646,97.9949 74.9612,97.5906C 74.5579,97.1864 74.2658,96.6253 73.7511,96.3778C 73.4532,96.2346 73.0526,96.3627 72.7726,96.5384C 72.2889,96.8418 71.9658,97.3466 71.5624,97.7508C 71.159,98.1549 70.7556,98.559 70.3522,98.9632C 68.3352,100.984 66.3182,103.005 64.3012,105.025C 58.2503,111.087 52.1993,117.149 46.1483,123.211C 41.7109,127.657 37.2736,132.102 32.8362,136.548C 31.626,137.76 30.4158,138.973 29.2056,140.185C 28.8022,140.589 28.3988,140.993 27.9954,141.397C 27.592,141.802 27.2693,142.307 26.7852,142.61C 26.6112,142.719 26.3775,142.561 26.1737,142.537C 25.9698,142.513 25.7301,142.583 25.5621,142.465C 25.105,142.143 24.7739,141.673 24.3798,141.277C 23.9857,140.881 23.5916,140.485 23.1975,140.089C 21.6211,138.505 20.0447,136.921 18.4683,135.338C 13.7391,130.586 9.00994,125.835 4.28074,121.084 Z "/>
    </Canvas>
</Canvas>

Is there any way I can get rid of the extra nested canvases in expression blends outputs?

like image 830
meds Avatar asked May 11 '11 06:05

meds


1 Answers

It makes one for the overall document, essentially the artboard. Then it makes one for each layer you define which is also the same size as the document/artboard. As for getting rid of it, well, there isn't a way to stop Design from adding them to the XAML output. While I am sure this all made perfect sense to the guy that wrote the exporter code, you can usually just delete the outer Canvas and it works better.

like image 162
Mark Ewer Avatar answered Sep 22 '22 01:09

Mark Ewer