Skip to main content

Microsoft Silverlight

Answered Question Paths in UsersControl does not show.RSS Feed

(0)

whooyeah
whooyeah

Member

Member

1 points

3 Posts

Paths in UsersControl does not show.

 I have a number of paths that I have placed in user controls but for some reason they do no show up. Only if I place them in the mainpage.xaml are they showing.

 There is definitly no controls infront of them or hendering their view. In blend they will show up untill I build the project.

 An example of one of the paths is below.

  

	<Grid x:Name="LayoutRoot">
		<Path Stretch="Fill" Data="F1 M 0.0367335,14.335L -4.61936e-007,14.2982C 0.0072698,14.2371 0.0145401,14.1758 0.0218103,14.1146C 0.0290806,14.0534 0.0103635,13.9828 0.0436211,13.9309C 0.214778,13.6637 0.560381,13.562 0.808146,13.3639C 1.17549,13.07 1.54878,12.7834 1.91016,12.4822C 2.29801,12.159 2.69142,11.8425 3.08565,11.5271C 3.24876,11.3966 3.43058,11.1945 3.63666,11.2287C 4.00504,11.2897 4.21096,11.7077 4.51828,11.9198C 5.20616,12.3944 5.83328,12.9519 6.50191,13.4534C 7.60168,14.2782 8.67146,15.1425 9.77123,15.9674C 10.12,16.229 10.451,16.5139 10.7998,16.7755C 10.9975,16.9238 11.2755,17.274 11.461,17.1107C 11.7454,16.8603 11.9471,16.5291 12.198,16.2451C 12.6114,15.7772 13.0385,15.3216 13.4587,14.8598C 15.1026,13.0534 16.7732,11.2496 18.6608,9.69962C 18.7907,9.59299 18.8935,9.45703 19.0098,9.33572C 19.1261,9.21445 19.2308,9.08078 19.3588,8.97183C 19.9798,8.44321 20.5533,7.85825 21.1955,7.35556C 23.1075,5.85898 24.9959,4.33069 26.9505,2.89011C 27.9517,2.1521 28.9643,1.4198 30.0484,0.810028C 30.3608,0.634247 30.6519,0.42276 30.9484,0.2211C 31.1516,0.0828857 31.49,-0.127563 31.6647,0.0455017C 31.9111,0.289673 31.9402,0.68222 32.0779,1.00058C 32.2157,1.31894 32.465,1.60977 32.4912,1.95566C 32.4981,2.04666 32.4521,2.14001 32.397,2.2128C 32.2988,2.34265 32.1606,2.43677 32.0423,2.54874C 31.9241,2.66077 31.8059,2.77274 31.6876,2.88474C 31.5694,2.9967 31.4511,3.10867 31.3329,3.2207C 30.6832,3.83609 30.0892,4.50803 29.4524,5.13681C 27.5314,7.03357 25.7839,9.10458 24.0975,11.2126C 22.2693,13.4978 20.5101,15.8563 19.0213,18.3757C 18.1935,19.7766 17.199,21.081 16.4522,22.5266C 15.8435,23.7052 15.1962,24.8639 14.6086,26.0531C 14.4046,26.4662 14.2443,26.8996 14.0714,27.3266C 14.0301,27.4286 13.9944,27.5332 13.9474,27.6327C 13.894,27.7457 13.8688,27.886 13.7706,27.9633C 13.6943,28.0235 13.5688,28.0426 13.4814,28C 13.3347,27.9287 13.2508,27.7694 13.1354,27.6541C 12.7895,27.3082 12.4436,26.9623 12.0977,26.6164C 11.1296,25.6483 10.1137,24.7202 9.24088,23.6654C 7.9682,22.1274 6.2685,20.979 4.99582,19.441C 4.10623,18.366 3.06531,17.4253 2.07623,16.4411C 1.38353,15.7517 0.741225,15.0123 0.0367335,14.335 Z " Height="19.043" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Top" Width="22.064" UseLayoutRounding="False">
			<Path.Fill>
				<SolidColorBrush Color="{StaticResource SectionColorDesign}"/>
			</Path.Fill>
		</Path>
	</Grid>
 

K2P2
K2P2

Participant

Participant

1028 points

337 Posts

Re: Paths in UsersControl does not show.

Just for "us" can you change it to something like this to see what happens:

 

        <Path StrokeThickness="10" Stroke="Black"  Data="F1 M 0.0367335,14.335L -4.61936e-007,14.2982C 0.0072698,14.2371 0.0145401,14.1758 0.0218103,14.1146C 0.0290806,14.0534 0.0103635,13.9828 0.0436211,13.9309C 0.214778,13.6637 0.560381,13.562 0.808146,13.3639C 1.17549,13.07 1.54878,12.7834 1.91016,12.4822C 2.29801,12.159 2.69142,11.8425 3.08565,11.5271C 3.24876,11.3966 3.43058,11.1945 3.63666,11.2287C 4.00504,11.2897 4.21096,11.7077 4.51828,11.9198C 5.20616,12.3944 5.83328,12.9519 6.50191,13.4534C 7.60168,14.2782 8.67146,15.1425 9.77123,15.9674C 10.12,16.229 10.451,16.5139 10.7998,16.7755C 10.9975,16.9238 11.2755,17.274 11.461,17.1107C 11.7454,16.8603 11.9471,16.5291 12.198,16.2451C 12.6114,15.7772 13.0385,15.3216 13.4587,14.8598C 15.1026,13.0534 16.7732,11.2496 18.6608,9.69962C 18.7907,9.59299 18.8935,9.45703 19.0098,9.33572C 19.1261,9.21445 19.2308,9.08078 19.3588,8.97183C 19.9798,8.44321 20.5533,7.85825 21.1955,7.35556C 23.1075,5.85898 24.9959,4.33069 26.9505,2.89011C 27.9517,2.1521 28.9643,1.4198 30.0484,0.810028C 30.3608,0.634247 30.6519,0.42276 30.9484,0.2211C 31.1516,0.0828857 31.49,-0.127563 31.6647,0.0455017C 31.9111,0.289673 31.9402,0.68222 32.0779,1.00058C 32.2157,1.31894 32.465,1.60977 32.4912,1.95566C 32.4981,2.04666 32.4521,2.14001 32.397,2.2128C 32.2988,2.34265 32.1606,2.43677 32.0423,2.54874C 31.9241,2.66077 31.8059,2.77274 31.6876,2.88474C 31.5694,2.9967 31.4511,3.10867 31.3329,3.2207C 30.6832,3.83609 30.0892,4.50803 29.4524,5.13681C 27.5314,7.03357 25.7839,9.10458 24.0975,11.2126C 22.2693,13.4978 20.5101,15.8563 19.0213,18.3757C 18.1935,19.7766 17.199,21.081 16.4522,22.5266C 15.8435,23.7052 15.1962,24.8639 14.6086,26.0531C 14.4046,26.4662 14.2443,26.8996 14.0714,27.3266C 14.0301,27.4286 13.9944,27.5332 13.9474,27.6327C 13.894,27.7457 13.8688,27.886 13.7706,27.9633C 13.6943,28.0235 13.5688,28.0426 13.4814,28C 13.3347,27.9287 13.2508,27.7694 13.1354,27.6541C 12.7895,27.3082 12.4436,26.9623 12.0977,26.6164C 11.1296,25.6483 10.1137,24.7202 9.24088,23.6654C 7.9682,22.1274 6.2685,20.979 4.99582,19.441C 4.10623,18.366 3.06531,17.4253 2.07623,16.4411C 1.38353,15.7517 0.741225,15.0123 0.0367335,14.335 Z " Height="19.043" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Top" Width="22.064" UseLayoutRounding="False">
                <!--<Path.Fill>
                    <SolidColorBrush Color="{StaticResource SectionColorDesign}"/>
                </Path.Fill>-->
        </Path>
 

 

Min-Hong Tang - MSFT
Min-Hong...

Contributor

Contributor

3375 points

377 Posts

Answered Question

Re: Paths in UsersControl does not show.

Hi,

   I tested your Path , i copied your path code block and put it in a usercontrol. Then nested this usercontrol in a MainPage. It displays fine. Of course, i changed the color solidcolorbursh value to a normal one(say Red), cause i do not know what is SectionColorDesign.

  But i think the problem is narrowed now, it has nothing to do with the Path it self.

  Either there is something wrong with your usercontrol's display settings or there is something wrong with the SolidColorBrush resource you are using.

Best Regards

Min-Hong Tang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities