XAML-Code wird oft für das Design der eigenen Windows Phone-Applikation verwendet. Wer bestimmte Design-Elemente wiederverwenden möchte, der kann XAML-Code auch auslagern und in mehreren Pages wiederverwenden. Wie das funktioniert, möchte ich an einem kurzen Beispiel erläutern.
- Ordner für XAML-Dateien erstellen (bei mir
formulas
genannt) - Dem Projekt ein neues Element hinzufügen
- Als Vorlage ein Windows Phone-Benutzersteuerelement (User Control) auswählen
- Das Benutzersteuerelement mit Leben füllen, Beispiel:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<UserControl x:Class="PhoneApp3.formulas.WindowsPhoneControl1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeNormal}" Foreground="{StaticResource PhoneForegroundBrush}" d:DesignHeight="480" d:DesignWidth="480"> <Grid x:Name="LayoutRoot"> <Canvas x:Name="Layer_3" Height="43" Margin="8,52,8,0" VerticalAlignment="Top"> <Path x:Name="Path_19" Data="M101.56977,11.968881 C101.36079,11.96888 100.94484,12.093879 100.56989,12.739674 C100.4029,13.05217 100.17393,13.927163 100.17393,14.36466 C100.17393,14.927155 100.4449,15.135452 100.75687,15.135453 C101.09083,15.135452 101.40279,14.885454 101.48578,14.822956 C101.65276,14.656357 101.84074,14.510458 101.88174,14.281362 L102.27769,12.781374 L102.29869,12.677174 C102.29869,12.593874 102.13171,11.96888 101.56977,11.968881 z M101.56977,11.76048 C101.96573,11.760481 102.23569,11.96888 102.40268,12.218878 C102.44467,12.010479 102.63165,11.90638 102.77763,11.906381 C102.90262,11.90638 103.04861,11.989679 103.04861,12.156378 C103.04861,12.197977 102.94462,12.572974 102.90262,12.781374 L102.73564,13.385467 C102.69464,13.572966 102.61066,13.906363 102.56966,14.11466 C102.50667,14.322959 102.44467,14.614657 102.44467,14.739657 C102.44467,14.968854 102.50667,15.135452 102.71564,15.135453 C103.04861,15.135452 103.19459,14.656357 103.29858,14.281362 C103.34058,14.072961 103.36057,14.031363 103.46556,14.031362 C103.48556,14.031363 103.59055,14.031363 103.59055,14.13546 C103.59055,14.17716 103.48556,14.635456 103.31957,14.927155 C103.17359,15.177153 102.96561,15.364651 102.67365,15.364651 C102.48567,15.364651 102.00673,15.281352 101.86074,14.802155 C101.54877,15.114653 101.15282,15.364651 100.71587,15.364651 C100.02795,15.364651 99.50721,14.802155 99.50721,14.031362 C99.50721,12.885471 100.54889,11.760481 101.56977,11.76048 z M84.496704,8.6180038 L91.663277,8.6180038 C91.829979,8.6180038 92.059166,8.6180038 92.059166,8.8680038 C92.059166,9.0971737 91.829979,9.0971737 91.663277,9.0971727 L84.475807,9.0971727 C84.309204,9.0971737 84.080009,9.0971737 84.080009,8.8680038 C84.080009,8.6180038 84.309204,8.6180038 84.496704,8.6180038 z M111.00342,7.0555038 C111.35765,7.0555038 111.64884,7.3471737 111.64884,7.7013431 C111.64884,8.0555038 111.35765,8.3471737 111.00342,8.3471746 C110.64819,8.3471737 110.37801,8.0555038 110.37801,7.7013431 C110.37801,7.3471737 110.64819,7.0555038 111.00342,7.0555038 z M84.475807,6.3055029 L91.663277,6.3055029 C91.829979,6.3055038 92.059166,6.3055038 92.059166,6.5346723 C92.059166,6.7846737 91.829979,6.7846737 91.663277,6.7846718 L84.496704,6.7846718 C84.309204,6.7846737 84.080009,6.7846737 84.080009,6.5346723 C84.080009,6.3055038 84.309204,6.3055038 84.475807,6.3055029 z M134.90604,5.6596665 C134.42603,5.6596661 133.88503,6.0971637 133.53104,6.8054891 C133.23903,7.3679867 132.86403,8.8471489 132.86403,9.4513454 C132.86403,9.9096422 133.03104,10.576339 133.63503,10.576338 C133.96803,10.576339 134.46803,10.367939 134.98903,9.7221441 C135.17603,9.5138454 135.17603,9.4929447 135.21803,9.2638178 L135.82204,6.9304886 C135.84303,6.8679895 135.86403,6.7846599 135.86403,6.7221594 C135.86403,6.6388307 135.69704,5.6596661 134.90604,5.6596665 z M26.876297,5.6596665 C26.397202,5.6596661 25.855499,6.0971637 25.501297,6.8054891 C25.209702,7.3679867 24.834702,8.8471489 24.834702,9.4513454 C24.834702,9.9096422 25.001297,10.576339 25.605499,10.576338 C25.938797,10.576339 26.438797,10.367939 26.959702,9.7221441 C27.147202,9.5138454 27.147202,9.4929447 27.188797,9.2638149 L27.792999,6.9304886 C27.813797,6.8679895 27.834702,6.7846599 27.834702,6.7221594 C27.834702,6.6388307 27.667999,5.6596661 26.876297,5.6596665 z M165.73444,5.6596589 C165.42239,5.6596584 164.88031,5.8471575 164.29721,6.6179843 C164.19319,6.7429833 164.19319,6.7846532 164.1302,7.0346508 L163.85915,8.1388168 C163.67212,8.9096432 163.67212,9.1388121 163.67212,9.3471422 C163.67212,10.242936 164.06818,10.576336 164.46324,10.576335 C164.94331,10.576336 165.48439,10.138838 165.88046,9.3263121 C166.10948,8.8679733 166.50555,7.49298 166.50555,6.7846541 C166.50555,6.0138264 166.1725,5.6596584 165.73444,5.6596589 z M68.592323,5.6596589 C68.11322,5.6596584 67.571518,6.0971565 67.217316,6.8054838 C66.925713,7.3679805 66.550705,8.8471432 66.550705,9.4513397 C66.550705,9.9096384 66.717316,10.576336 67.321518,10.576335 C67.654823,10.576336 68.154823,10.367936 68.675728,9.7221384 C68.863228,9.5138407 68.863228,9.4929399 68.904831,9.2638092 L69.509033,6.930481 C69.529831,6.8679829 69.550728,6.7846532 69.550728,6.7221518 C69.550728,6.6388235 69.384033,5.6596584 68.592323,5.6596589 z M57.704857,5.6596589 C57.392357,5.6596584 56.850746,5.8471575 56.267334,6.6179843 C56.163239,6.7429833 56.163239,6.7846532 56.100731,7.0346508 L55.829826,8.1388168 C55.642326,8.9096432 55.642326,9.1388121 55.642326,9.3471422 C55.642326,10.242936 56.038231,10.576336 56.434036,10.576335 C56.913246,10.576336 57.454857,10.138838 57.850761,9.3263092 C58.079865,8.8679733 58.475769,7.49298 58.475769,6.7846513 C58.475769,6.0138264 58.142365,5.6596584 57.704857,5.6596589 z M141.19768,5.3888369 C141.55164,5.3888373 142.19754,5.5138369 142.5105,6.3054924 C142.63548,6.0346642 143.07242,5.3888373 143.76033,5.3888369 C144.17627,5.3888373 144.88518,5.5554972 144.88516,6.1804929 C144.88518,6.6596603 144.48923,6.8888292 144.21826,6.8888292 C143.9053,6.8888292 143.78033,6.6596603 143.78033,6.4721622 C143.78033,6.1804934 144.0103,5.8679953 144.34323,5.8263359 C144.09328,5.6596661 143.80133,5.6596661 143.73933,5.6596665 C142.90546,5.6596661 142.63548,6.7638297 142.5515,7.0763288 L142.15556,8.7221479 C142.01057,9.2429762 141.94757,9.5138454 141.94757,9.7846432 C141.94757,10.18044 142.13556,10.576339 142.61449,10.576338 C142.98944,10.576339 143.80133,10.28464 144.19727,8.9929781 C144.21826,8.9096479 144.26025,8.8679781 144.36424,8.8679781 C144.40524,8.8679781 144.51022,8.8679781 144.51022,8.9929781 C144.51022,9.284646 143.82231,10.826338 142.59349,10.826337 C141.86459,10.826338 141.42665,10.367939 141.28069,9.9304428 C141.26068,9.9929419 140.82274,10.826338 140.03085,10.826337 C139.51093,10.826338 138.90601,10.597138 138.90601,10.03464 C138.90601,9.6596441 139.19797,9.347146 139.55191,9.3471441 C139.7399,9.347146 140.01085,9.4513454 140.01085,9.7638445 C140.01085,10.097141 139.7399,10.347139 139.44792,10.40964 C139.69789,10.576339 139.96886,10.576339 140.03085,10.576338 C140.57277,10.576339 140.98972,10.055441 141.1767,9.3263149 C141.61462,7.6388249 141.8226,6.8471594 141.8226,6.4721622 C141.8226,5.7638354 141.40567,5.6596661 141.1767,5.6596665 C140.78075,5.6596661 139.98985,5.9513345 139.57291,7.2429881 C139.55191,7.3471565 139.51093,7.3679867 139.40594,7.3679852 C139.38594,7.3679867 139.28096,7.3679867 139.28096,7.2429881 C139.28096,6.9513288 139.94786,5.3888373 141.19768,5.3888369 z M134.90604,5.3888369 C135.44704,5.3888373 135.78104,5.7221656 136.01003,6.1596627 C136.05103,5.9096646 136.21803,5.6388364 136.51003,5.6388364 C136.71803,5.6388364 136.86403,5.7638354 136.86403,5.951333 C136.86403,6.013834 136.86403,6.0346642 136.78104,6.3679924 L136.34303,8.0554819 C136.23903,8.5138197 136.21803,8.61798 136.07204,9.1388178 C135.94704,9.6596441 135.92603,9.7429428 135.92603,10.013842 C135.92603,10.263841 135.96803,10.576339 136.28104,10.576338 C136.78104,10.576339 136.98903,9.8679419 137.19704,9.0763178 C137.23903,8.9096479 137.23903,8.8679781 137.36403,8.8679781 C137.40604,8.8679781 137.51003,8.8679781 137.51003,8.9929781 C137.51003,9.0138178 137.34303,9.7429428 137.15604,10.18044 C136.94704,10.555438 136.67603,10.826338 136.26003,10.826337 C135.67603,10.826338 135.26003,10.430439 135.17603,9.9304428 C134.44704,10.784637 133.84303,10.826338 133.61403,10.826337 C132.67603,10.826338 132.01003,10.034641 132.01003,8.9096479 C132.01003,7.1596575 133.48903,5.3888373 134.90604,5.3888369 z M74.777206,5.3888369 C75.131409,5.3888373 75.777199,5.5138369 76.089699,6.3054924 C76.214699,6.0346642 76.652199,5.3888373 77.339691,5.3888369 C77.756393,5.3888373 78.464684,5.5554972 78.464684,6.1804929 C78.464684,6.6596603 78.068886,6.8888292 77.797989,6.8888292 C77.485489,6.8888292 77.360489,6.6596603 77.360489,6.4721599 C77.360489,6.1804934 77.589691,5.8679953 77.922989,5.8263335 C77.672989,5.6596661 77.381393,5.6596661 77.318893,5.6596665 C76.485497,5.6596661 76.214699,6.7638297 76.131401,7.0763259 L75.735497,8.7221479 C75.589699,9.2429762 75.527199,9.5138454 75.527199,9.7846432 C75.527199,10.18044 75.714699,10.576339 76.193901,10.576338 C76.568901,10.576339 77.381393,10.28464 77.777191,8.9929781 C77.797989,8.9096479 77.839691,8.8679781 77.943893,8.8679781 C77.985489,8.8679781 78.089684,8.8679781 78.089684,8.9929781 C78.089684,9.284646 77.402191,10.826338 76.172997,10.826337 C75.443901,10.826338 75.006409,10.367939 74.860504,9.9304428 C74.839706,9.9929419 74.402206,10.826338 73.610512,10.826337 C73.089714,10.826338 72.485512,10.597138 72.485512,10.03464 C72.485512,9.6596441 72.777214,9.347146 73.131416,9.3471441 C73.318916,9.347146 73.589714,9.4513454 73.589714,9.7638416 C73.589714,10.097141 73.318916,10.347139 73.027214,10.40964 C73.277214,10.576339 73.548012,10.576339 73.610512,10.576338 C74.152206,10.576339 74.568909,10.055441 74.756409,9.3263149 C75.193909,7.6388249 75.402199,6.8471594 75.402199,6.4721599 C75.402199,5.7638354 74.985504,5.6596661 74.756409,5.6596665 C74.360504,5.6596661 73.568916,5.9513345 73.152214,7.2429857 C73.131416,7.3471565 73.089714,7.3679867 72.985512,7.3679852 C72.964714,7.3679867 72.860512,7.3679867 72.860512,7.2429857 C72.860512,6.9513288 73.527214,5.3888373 74.777206,5.3888369 z M33.168808,5.3888369 C33.52301,5.3888373 34.168808,5.5138369 34.481308,6.3054924 C34.606308,6.0346642 35.043793,5.3888373 35.731293,5.3888369 C36.147995,5.3888373 36.856293,5.5554972 36.856293,6.1804929 C36.856293,6.6596603 36.460495,6.8888292 36.18959,6.8888292 C35.87709,6.8888292 35.75209,6.6596603 35.75209,6.4721599 C35.75209,6.1804934 35.981293,5.8679953 36.31459,5.8263335 C36.06459,5.6596661 35.772995,5.6596661 35.710495,5.6596665 C34.877106,5.6596661 34.606308,6.7638297 34.522995,7.0763259 L34.127106,8.7221479 C33.981308,9.2429762 33.918808,9.5138454 33.918808,9.7846432 C33.918808,10.18044 34.106308,10.576339 34.585495,10.576338 C34.960495,10.576339 35.772995,10.28464 36.168793,8.9929781 C36.18959,8.9096479 36.231293,8.8679781 36.335495,8.8679781 C36.37709,8.8679781 36.481293,8.8679781 36.481293,8.9929781 C36.481293,9.284646 35.793793,10.826338 34.564606,10.826337 C33.83551,10.826338 33.39801,10.367939 33.252106,9.9304428 C33.231308,9.9929419 32.793808,10.826338 32.002121,10.826337 C31.481323,10.826338 30.877121,10.597138 30.877121,10.03464 C30.877121,9.6596441 31.168823,9.347146 31.523026,9.3471441 C31.71051,9.347146 31.981323,9.4513454 31.981323,9.7638416 C31.981323,10.097141 31.71051,10.347139 31.418823,10.40964 C31.668823,10.576339 31.939621,10.576339 32.002121,10.576338 C32.543808,10.576339 32.96051,10.055441 33.14801,9.3263149 C33.58551,7.6388249 33.793808,6.8471594 33.793808,6.4721599 C33.793808,5.7638354 33.377106,5.6596661 33.14801,5.6596665 C32.752106,5.6596661 31.96051,5.9513345 31.543823,7.2429857 C31.523026,7.3471565 31.481323,7.3679867 31.377121,7.3679852 C31.356323,7.3679867 31.252121,7.3679867 31.252121,7.2429857 C31.252121,6.9513288 31.918823,5.3888373 33.168808,5.3888369 z M26.876297,5.3888369 C27.417999,5.3888373 27.751297,5.7221656 27.980499,6.1596627 C28.022202,5.9096646 28.188797,5.6388364 28.480499,5.6388364 C28.688797,5.6388364 28.834702,5.7638354 28.834702,5.951333 C28.834702,6.013834 28.834702,6.0346642 28.751297,6.3679924 L28.313797,8.0554819 C28.209702,8.5138197 28.188797,8.61798 28.042999,9.1388149 C27.917999,9.6596441 27.897202,9.7429428 27.897202,10.013842 C27.897202,10.263841 27.938797,10.576339 28.251297,10.576338 C28.751297,10.576339 28.959702,9.8679419 29.167999,9.0763178 C29.209702,8.9096479 29.209702,8.8679781 29.334702,8.8679781 C29.376297,8.8679781 29.480499,8.8679781 29.480499,8.9929781 C29.480499,9.0138178 29.313797,9.7429428 29.126297,10.18044 C28.917999,10.555438 28.647202,10.826338 28.230499,10.826337 C27.647202,10.826338 27.230499,10.430439 27.147202,9.9304399 C26.417999,10.784637 25.813797,10.826338 25.584702,10.826337 C24.647202,10.826338 23.980499,10.034641 23.980499,8.9096479 C23.980499,7.1596575 25.459702,5.3888373 26.876297,5.3888369 z M153.76309,3.7013373 C154.01309,3.7013378 154.01309,3.9304972 154.01309,4.0971665 L154.01309,7.451323 L157.34616,7.451323 C157.51317,7.451323 157.74217,7.451323 157.74217,7.7013226 C157.74217,7.9513211 157.51317,7.9513211 157.34616,7.9513221 L154.01309,7.9513221 L154.01309,11.305437 C154.01309,11.472138 154.01309,11.701338 153.76309,11.701339 C153.53308,11.701338 153.53308,11.472138 153.53308,11.305437 L153.53308,7.9513221 L150.15802,7.9513221 C149.99202,7.9513211 149.763,7.9513211 149.763,7.7013226 C149.763,7.451323 149.99202,7.451323 150.15802,7.451323 L153.53308,7.451323 L153.53308,4.0971665 C153.53308,3.9304972 153.53308,3.7013378 153.76309,3.7013373 z M45.733292,3.7013373 C45.983292,3.7013378 45.983292,3.9304972 45.983292,4.0971665 L45.983292,7.451323 L49.316673,7.451323 C49.483276,7.451323 49.712471,7.451323 49.712471,7.7013226 C49.712471,7.9513211 49.483276,7.9513211 49.316673,7.9513192 L45.983292,7.9513192 L45.983292,11.305437 C45.983292,11.472138 45.983292,11.701338 45.733292,11.701339 C45.504196,11.701338 45.504196,11.472138 45.504196,11.305437 L45.504196,7.9513192 L42.129211,7.9513192 C41.962517,7.9513211 41.733315,7.9513211 41.733315,7.7013226 C41.733315,7.451323 41.962517,7.451323 42.129211,7.451323 L45.504196,7.451323 L45.504196,4.0971665 C45.504196,3.9304972 45.504196,3.7013378 45.733292,3.7013373 z M118.74803,2.5346718 L124.6231,2.5346718 C124.9361,2.5346708 124.99811,2.5346708 124.95711,2.8679986 L124.7071,4.9513326 C124.6861,5.1596608 124.6861,5.2429905 124.5401,5.2429895 C124.4361,5.2429905 124.39409,5.1596608 124.39409,5.0971622 L124.4361,4.8888326 C124.4571,4.5554934 124.4571,4.513833 124.4571,4.2429938 C124.4571,3.3054976 124.1861,2.9096694 122.70708,2.9096687 L121.12306,2.9096687 C120.60205,2.9096694 120.58205,2.951339 120.47705,3.3888378 L119.70705,6.4304872 L120.81105,6.4304872 C121.83207,6.4304862 122.10207,6.2221565 122.35207,5.2846594 C122.39407,5.0763311 122.41508,5.0346613 122.51907,5.0346622 C122.64407,5.0346613 122.66508,5.1388307 122.66508,5.1596622 L122.64407,5.3471594 L121.97707,7.9513192 C121.91507,8.1596498 121.91507,8.2013197 121.79007,8.2013197 C121.72707,8.2013197 121.64406,8.1596498 121.64406,8.055479 L121.68607,7.9304795 C121.76907,7.5763216 121.76907,7.4304824 121.76907,7.3471532 C121.76907,6.9929838 121.68607,6.8054848 120.76906,6.8054838 L119.62305,6.8054838 L118.87303,9.7846432 C118.83203,9.9721422 118.83203,10.034642 118.83203,10.055442 C118.83203,10.222141 118.85204,10.263842 119.20704,10.305442 C119.49805,10.326342 119.56104,10.326342 119.83205,10.326341 L120.16505,10.34714 C120.16505,10.347141 120.22705,10.367941 120.22705,10.472142 C120.22705,10.701341 120.10205,10.701341 119.97704,10.70134 C119.58205,10.701341 118.60203,10.65964 118.20703,10.659639 C117.85202,10.65964 116.95702,10.701341 116.62302,10.70134 C116.58201,10.701341 116.436,10.701341 116.436,10.555439 C116.436,10.326342 116.561,10.326342 116.76901,10.326341 C117.72702,10.326342 117.74802,10.242941 117.85202,9.7638445 L119.43604,3.409668 L119.49805,3.1388383 C119.49805,2.9096694 119.16504,2.9096694 118.72704,2.9096687 C118.49803,2.9096694 118.39403,2.9096694 118.39403,2.7846689 C118.39403,2.5346708 118.51903,2.5346708 118.74803,2.5346718 z M165.08833,2.3680048 C165.25537,2.3680038 165.25537,2.4930034 165.25537,2.5138421 L164.35922,6.1179852 C164.71329,5.7429881 165.21336,5.3888297 165.75545,5.3888292 C166.73459,5.3888297 167.35968,6.2221556 167.35968,7.3263206 C167.35968,9.0554724 165.88046,10.826334 164.46324,10.826335 C163.5881,10.826334 162.94301,10.097137 162.94301,8.951313 C162.94301,8.5346451 162.98401,8.347146 163.13005,7.7429795 L164.1302,3.8263373 C164.1722,3.5763383 164.29721,3.1596704 164.29721,3.0763412 C164.29721,2.9513412 164.25522,2.8680015 163.69312,2.8680012 C163.50511,2.8680015 163.40109,2.8680015 163.40109,2.7430015 C163.40109,2.5138431 163.52611,2.5138431 163.63013,2.4930046 C163.94316,2.4721737 164.8183,2.3680038 165.08833,2.3680048 z M71.259048,2.3680048 C71.404846,2.3680038 71.404846,2.4930034 71.404846,2.5138421 L69.675728,9.4513397 C69.634033,9.6388407 69.613228,9.7221394 69.613228,10.013836 C69.613228,10.263837 69.654831,10.576336 69.967339,10.576335 C70.467339,10.576336 70.675735,9.867938 70.884048,9.076313 C70.925743,8.9096432 70.925743,8.8679733 71.050743,8.8679724 C71.092346,8.8679733 71.196548,8.8679733 71.196548,8.9929724 C71.196548,9.013813 71.029846,9.742939 70.842346,10.180437 C70.634041,10.555435 70.363235,10.826334 69.946541,10.826332 C69.363228,10.826334 68.946533,10.430435 68.863228,9.9304371 C68.134026,10.784635 67.529816,10.826334 67.300713,10.826332 C66.363205,10.826334 65.69651,10.034637 65.69651,8.9096432 C65.69651,7.1596513 67.175713,5.3888297 68.592323,5.3888292 C69.134033,5.3888297 69.467331,5.722158 69.696541,6.1596551 L70.404839,3.3263381 L70.446541,3.0763412 C70.446541,2.9513412 70.425735,2.8680015 69.842339,2.8680012 C69.675728,2.8680015 69.571533,2.8680015 69.571533,2.7430015 C69.571533,2.5763428 69.634033,2.5138431 69.738235,2.5138421 C69.925735,2.4721737 71.071548,2.3680038 71.259048,2.3680048 z M57.059044,2.3680048 C57.225754,2.3680038 57.225754,2.4930034 57.225754,2.5138421 L56.329834,6.1179852 C56.684044,5.7429881 57.184052,5.3888297 57.725761,5.3888292 C58.704872,5.3888297 59.329887,6.2221556 59.329887,7.3263206 C59.329887,9.0554724 57.850761,10.826334 56.434036,10.826332 C55.559021,10.826334 54.913216,10.097137 54.913216,8.951313 C54.913216,8.5346451 54.954819,8.347146 55.100716,7.7429771 L56.100731,3.8263373 C56.142334,3.5763383 56.267334,3.1596704 56.267334,3.0763412 C56.267334,2.9513412 56.225739,2.8680015 55.663231,2.8680012 C55.475723,2.8680015 55.371521,2.8680015 55.371521,2.7430015 C55.371521,2.5138431 55.496521,2.5138431 55.600723,2.4930019 C55.913231,2.4721737 56.788246,2.3680038 57.059044,2.3680048 z M15.985962,2.2430024 C16.465164,2.2430041 17.027664,2.5138447 17.027664,3.0763435 C17.027664,3.5346775 16.673462,3.7846785 16.360962,3.7846799 C16.13176,3.7846785 15.923462,3.6388478 15.923462,3.3680055 C15.923462,3.1805067 16.048462,2.7638454 16.56926,2.7221742 C16.340164,2.5138447 16.027664,2.5138447 15.985962,2.5138421 C15.735962,2.5138447 15.527664,2.6805053 15.423477,2.9096737 C15.340164,3.0555062 15.173477,3.9096789 15.131775,4.1596794 L14.881775,5.5346847 L15.88176,5.5346847 C16.06926,5.5346832 16.19426,5.5346832 16.19426,5.6596842 C16.19426,5.9096842 16.06926,5.9096842 15.840164,5.9096837 L14.798477,5.9096837 L14.090179,9.7013931 C14.069275,9.7846947 13.798477,11.242998 13.423477,11.993 C13.194275,12.451403 12.715179,13.159704 12.048492,13.159701 C11.56929,13.159704 11.048492,12.868003 11.048492,12.326401 C11.048492,11.868 11.38179,11.617999 11.69429,11.617998 C11.923492,11.617999 12.152679,11.763901 12.152679,12.034698 C12.152679,12.222201 12.027695,12.638903 11.485992,12.680499 C11.715195,12.888904 12.00679,12.888904 12.048492,12.888903 C12.673477,12.888904 12.881775,11.8055 13.110977,10.638896 L14.006775,5.9096837 L13.215179,5.9096837 C12.985977,5.9096842 12.881775,5.9096842 12.881775,5.7638516 C12.881775,5.5346832 13.006775,5.5346832 13.235977,5.5346847 L14.069275,5.5346847 C14.360977,4.0138488 14.381775,3.8888483 14.465179,3.6388452 C14.819275,2.4513445 15.569275,2.2430041 15.985962,2.2430024 z M130.21967,1.7013384 C130.28268,1.7013373 130.3447,1.7429973 130.3447,1.8263382 L130.17865,2.0346677 C128.69931,3.5346627 128.2402,5.6179876 128.2402,7.7013226 C128.2402,9.5346479 128.63629,11.805441 130.13664,13.326338 L130.3447,13.576338 C130.3447,13.659636 130.28268,13.701337 130.21967,13.701337 C130.09464,13.701337 129.0744,12.930438 128.34421,11.451342 C127.67805,10.097146 127.55302,8.6388197 127.55302,7.7013226 C127.55302,6.7013245 127.69906,5.3679881 128.30319,4.0346618 C129.01138,2.5138352 130.09464,1.7013373 130.21967,1.7013384 z M60.86451,1.7013358 C60.968712,1.7013373 62.010323,2.4721656 62.718735,3.9513316 C63.385338,5.3054886 63.510338,6.7638245 63.510338,7.7013197 C63.510338,8.7013197 63.385338,10.034646 62.76033,11.367943 C62.052025,12.888839 60.968712,13.701337 60.86451,13.701337 C60.781212,13.701337 60.73951,13.659636 60.73951,13.576338 L60.885315,13.367936 C62.38533,11.867941 62.82283,9.7429466 62.82283,7.7013197 C62.82283,5.2013283 62.135323,3.2846634 60.968712,2.0971651 L60.73951,1.8263355 C60.73951,1.7429973 60.781212,1.7013373 60.86451,1.7013358 z M22.19017,1.7013358 C22.25267,1.7013373 22.31517,1.7429973 22.31517,1.8263355 L22.148468,2.0346651 C20.669281,3.5346627 20.210999,5.6179876 20.210999,7.7013197 C20.210999,9.5346479 20.606781,11.805441 22.106766,13.326338 L22.31517,13.576335 C22.31517,13.659636 22.25267,13.701337 22.19017,13.701337 C22.06517,13.701337 21.044281,12.930438 20.315186,11.451342 C19.648499,10.097146 19.523499,8.6388197 19.523499,7.7013197 C19.523499,6.7013245 19.669296,5.3679881 20.273483,4.0346618 C20.981781,2.5138352 22.06517,1.7013373 22.19017,1.7013358 z M168.89307,1.7013257 C168.99709,1.7013284 170.03839,2.4721565 170.74762,3.9513216 C171.41382,5.3054795 171.53885,6.7638154 171.53885,7.7013149 C171.53885,8.7013102 171.41382,10.034637 170.78862,11.367932 C170.08041,12.88883 168.99709,13.701328 168.89307,13.701329 C168.80904,13.701328 168.76802,13.659628 168.76802,13.576327 L168.91306,13.367929 C170.41351,11.867932 170.85165,9.7429371 170.85165,7.7013149 C170.85165,5.2013192 170.16344,3.2846546 168.99709,2.0971549 L168.76802,1.8263254 C168.76802,1.7429883 168.80904,1.7013284 168.89307,1.7013257 z M101.69881,0.15816545 C101.92779,0.1581651 101.94878,0.1581651 101.94878,0.38733518 L101.94878,4.8248348 C101.94878,5.0748348 101.94878,5.1789951 102.74069,5.1789942 L103.05267,5.1789942 L103.05267,5.4706635 C102.86568,5.470665 101.86579,5.4289951 101.61582,5.4289937 C101.32385,5.4289951 100.32397,5.470665 100.19898,5.4706635 L100.19898,5.1789942 L100.49094,5.1789942 C101.30286,5.1789951 101.30286,5.0748348 101.30286,4.8248348 L101.30286,0.74149436 C100.84491,0.94983596 100.32397,0.94983596 100.13599,0.94983673 L100.13599,0.67899454 C100.46996,0.67899597 101.19887,0.65816593 101.69881,0.15816545 z M5.3125,0 C6.0416718,2.6226044E-06 6.6458282,0.41666758 6.6458282,0.99999303 C6.6458282,1.3541628 6.375,1.5208318 6.1458282,1.5208297 C5.9166718,1.5208318 5.6458282,1.3541628 5.6458282,0.99999303 C5.6458282,0.8333354 5.75,0.56249678 6.0833282,0.52083409 C5.8333282,0.2916671 5.4583282,0.27083421 5.3333282,0.27083194 C4.7916718,0.27083421 4.375,0.56249678 4.2083282,2.7708225 L3.9791718,5.7499719 C3.8958282,7.0833035 3.4583282,10.583316 3.3125,11.208312 C3.0416718,12.291607 2.4583282,13.333302 1.3333282,13.333301 C0.60417175,13.333302 0,12.916604 0,12.333305 C0,11.979109 0.27082825,11.812409 0.5,11.812409 C0.72917175,11.812409 1,11.979109 1,12.333305 C1,12.499906 0.89582825,12.770805 0.5625,12.812403 C0.8125,13.041603 1.1666718,13.062403 1.3333282,13.0624 C2,13.062403 2.4375,12.520806 2.6041718,10.562417 L2.8333282,7.5624609 C2.9375,6.1249685 3.375,2.729156 3.5,2.0833261 C3.7083282,1.1666638 4.1875,2.6226044E-06 5.3125,0 z" Fill="#FF000000" Height="43" Stretch="Fill" UseLayoutRounding="False" Width="464" RenderTransformOrigin="0.266,-2.637"/> </Canvas> </Grid> </UserControl>
- Im Projekt sollte das User Control dann so aussehen:
- Benutzt werden kann das User Control dann im Code Behind wie folgt:
1 2 3 4 5 6
public MainPage() { InitializeComponent(); MyGrid.Children.Add(new formulas.WindowsPhoneControl1()); ... }
- Das Grid (
MyGrid
) sieht in XAML übrigens so aus:1 2
<Grid x:Name="MyGrid" Background="{StaticResource PhoneContrastBackgroundBrush}"> </Grid>