TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mahesh Jaiswal
NA
2
10.6k
WPF- TextBox Control
Jul 28 2015 6:04 AM
How can we calculate the width from the text of textbox control in WPF?
DoubleAnimation doubleAnimation = new DoubleAnimation();
doubleAnimation.From = -tbmarquee.ActualWidth;
doubleAnimation.To = canMain.ActualWidth;
doubleAnimation.RepeatBehavior = RepeatBehavior.Forever;
doubleAnimation.Duration = new Duration(TimeSpan.Parse("0:0:20"));
tbmarquee.BeginAnimation(Canvas.LeftProperty, doubleAnimation);
<Canvas ClipToBounds="True" Name="canMain" Grid.Column="0" Grid.Row="0">
<TextBlock FontSize="35" FontWeight="Bold" Foreground="#ffffe400" Margin="0,0,0,0" Name="tbmarquee"></TextBlock>
</Canvas>
tbmarquee.actualwidth giving 0 value
please give me solution to find out the width of tbmarquee according to text
Reply
Answers (
1
)
Multi Segment Progress Bar in WPF
implement show password functionality in wpf Passwordbox