473,379 Members | 1,255 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Silverlight: Line does not appear.

344 100+
Hello,

I'm posting my Silverlight question to .NET section because I didn't find a Silverlight section in Bytes. I was planning to post in the feedback section about that but I can not get to that section now! I don't know where the links hide :) I'll try again.

I'm too new to Silverlight and I'm doing a basic layout. What I'm trying to solve from beginning is to add a strike through TextDecorations to my TextBlock Text. I searched for that and found that adding a Line control is the solution.

I did but it does not appear!!

Here is my XAML for MainPage:
Expand|Select|Wrap|Line Numbers
  1.     <Grid x:Name="LayoutRoot" Width="250" Height="90" Loaded="LayoutRoot_Loaded">
  2.         <Line HorizontalAlignment="Stretch" Grid.Row="1" Grid.ColumnSpan="11" Stroke="White" StrokeThickness="3" X1="1" X2="1" Y1="1" Y2="1" />
  3.         <Grid Grid.Row="1" Grid.Column="0">
  4.             <Border Style="{StaticResource DaysLeftBorder}"/>
  5.             <TextBlock x:Name="DaysPart1" Style="{StaticResource DaysLeftTextBlock}"/>
  6.         </Grid>
  7.         <Grid Grid.Row="1" Grid.Column="1">
  8.             <Border Style="{StaticResource DaysLeftBorder}"/>
  9.             <TextBlock x:Name="DaysPart2" Style="{StaticResource DaysLeftTextBlock}"/>
  10.         </Grid>
  11.         <Border Grid.Row="1" Grid.Column="2" Style="{StaticResource DaysLeftBorder}"/>
  12. ...
  13.         </Grid>
  14.     </Grid>
And for App:
Expand|Select|Wrap|Line Numbers
  1.         <Style x:Key="DaysLeftTextBlock" TargetType="TextBlock">
  2.             <Setter Property="Foreground" Value="#FFF"/>
  3.             <Setter Property="FontSize" Value="36"/>
  4.             <Setter Property="VerticalAlignment" Value="Center"/>
  5.             <Setter Property="HorizontalAlignment" Value="Center"/>
  6.             <Setter Property="FontFamily" Value="Arial"/>
  7.             <Setter Property="FontWeight" Value="Bold"/>
  8.         </Style>
  9.         <Style x:Key="DaysLeftBorder" TargetType="Border">
  10.             <Setter Property="BorderThickness" Value=".1"/>
  11.             <Setter Property="Background" Value="#000"/>
  12.             <Setter Property="Margin" Value="0,0,1,0"/>
  13.         </Style>
Note: I use Silverlight 3, because I use the VWD Express 2010, and I couldn't find Silverlight 4 for this version by searching! Anyone has information about that?!

I really appreciate your time for help!

Thanks a lot,
Bassem
Sep 25 '10 #1

✓ answered by Bassem

Hi,

Sorry I found that there is a WPF/Silverlight section, I hope you can move my question there.

I found the problem: I didn't draw a line, it was a point where X1 = X2, and Y1 = Y2! And the Canvas.ZIndex should be higher than the TextBlock.

Thank you.

1 1714
Bassem
344 100+
Hi,

Sorry I found that there is a WPF/Silverlight section, I hope you can move my question there.

I found the problem: I didn't draw a line, it was a point where X1 = X2, and Y1 = Y2! And the Canvas.ZIndex should be higher than the TextBlock.

Thank you.
Sep 25 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Jay | last post by:
Not sure who is familiar with the blat program, but I would like to send an email using blat by executing a commmand line using the Shell method. here's my code: /================ Dim RetVal...
20
by: TTroy | last post by:
Hello, I have found some peculiar behaviour in the fgets runtime library function for my compiler/OS/platform (Dev C++/XP/P4) - making a C console program (which runs in a CMD.exe shell). The...
0
by: Bruno van Dooren | last post by:
Hi all, i have a problem that i never experienced with VC6 or VC .NET 2002. i try to debug a dll by using a 3party app to load and use the dll, and then placing breakpoints in the code so that i...
0
by: Kieran Toon | last post by:
I'm using Visual Studio 2005 and have an ASP.NET web application written in Visual Basic. When the application runs on my local webserver and hits an error, my errorhandler writes out debug...
11
by: Jim | last post by:
Hi, I want to schedule a Python program that reads the command line for input. However, when adding an argument to the command line Python will not pick it up when using Windows scheduled...
4
by: bustBuddy | last post by:
And it's not me. This is taken verbatim from Mark Lutz's book "Programming Python" you have data.txt: 123 000 999 042 You have adder.py:
18
by: Artificer | last post by:
Any idea if MS will try to promote Silverlight over ASP.NET for web development or will silverlight remain just as a adobe's flash like tecnology?
0
by: John G | last post by:
I tried creating a app with Silverlight. The app works great when I run it in vs.net 2008. But when I publish the app I get the following error: Assembly does not allow partially trusted callers ...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.