Click here to Skip to main content
15,900,325 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Silverlight application does not run Pin
jonatan_55612-Feb-10 3:18
jonatan_55612-Feb-10 3:18 
GeneralRe: Silverlight application does not run Pin
Abhinav S12-Feb-10 8:04
Abhinav S12-Feb-10 8:04 
QuestionPartial-trust on-screen keyboard? Pin
Richard Dutton11-Feb-10 0:01
Richard Dutton11-Feb-10 0:01 
QuestionAnimation problem Pin
fjparisIII10-Feb-10 20:08
fjparisIII10-Feb-10 20:08 
AnswerRe: Animation problem Pin
Abhinav S10-Feb-10 22:18
Abhinav S10-Feb-10 22:18 
GeneralRe: Animation problem Pin
fjparisIII11-Feb-10 5:11
fjparisIII11-Feb-10 5:11 
GeneralRe: Animation problem Pin
Abhinav S11-Feb-10 6:21
Abhinav S11-Feb-10 6:21 
GeneralRe: Animation problem Pin
fjparisIII11-Feb-10 6:41
fjparisIII11-Feb-10 6:41 
Exactly. Just after I posted my reply, I woke up and banged the side of my head with the palm of my hand. I work too many hours in the day and my brain stops working after about 12 hours of headscratching at my desk. My original post was written after 16 hours at the keyboard. Then when I woke up this morning I was still thinking I didn't have a clue. But my brain started waking up at the very end to my reply to your first answer. Then I sat down and wrote the following code (amazingly similar to yours):

ImageBeingDisplayed.Source = BitmapImage;
DoubleAnimation fadeInAnimation = new DoubleAnimation();
fadeInAnimation.From = 0;
fadeInAnimation.To = 1;
fadeInAnimation.Duration = TimeSpan.FromSeconds(.5);
fadeInAnimation.Completed += new EventHandler(fadeInAnimation_Completed);
Storyboard storyboard = new Storyboard();
Storyboard.SetTarget(fadeInAnimation, ImageBeingDisplayed);
Storyboard.SetTargetProperty(fadeInAnimation, new PropertyPath("Image.Opacity"));
storyboard.Children.Add(fadeInAnimation);
storyboard.Begin();

Then I wrote the fadeInAnimation_Completed event as follows:
void fadeInAnimation_Completed(object sender, EventArgs e)
{
    Storyboard storyboard = (Storyboard)sender;
    storyboard.Stop();
    string imageName = Storyboard.GetTargetName(storyboard);
    Image image = FindName(imageName) as Image;
    if (image != null)
    {
        image.Opacity = 1;
    }
}

I don't know whether all this will work because the first block of code is in a WebClient.DownloadDataCompleted event handler, which inexplicably does not exist in Silverlight (I'm trying to port my WPF application to Silverlight), so my Silverlight code does not compile. I asked how to solve that problem in a post immediately preceding the post that started this thread.
QuestionHow to send key Pin
AksharRoop10-Feb-10 1:38
AksharRoop10-Feb-10 1:38 
AnswerRe: How to send key Pin
rhuiden10-Feb-10 2:17
rhuiden10-Feb-10 2:17 
GeneralRe: How to send key Pin
AksharRoop10-Feb-10 2:38
AksharRoop10-Feb-10 2:38 
GeneralRe: How to send key Pin
rhuiden10-Feb-10 3:29
rhuiden10-Feb-10 3:29 
QuestionReading Web Servers File System Pin
Jammer9-Feb-10 10:42
Jammer9-Feb-10 10:42 
AnswerRe: Reading Web Servers File System Pin
wolfbinary9-Feb-10 10:52
wolfbinary9-Feb-10 10:52 
GeneralRe: Reading Web Servers File System Pin
Jammer10-Feb-10 4:06
Jammer10-Feb-10 4:06 
GeneralRe: Reading Web Servers File System Pin
wolfbinary10-Feb-10 9:15
wolfbinary10-Feb-10 9:15 
QuestionMenu links are sometimes non-responsive to the Click Event???!!! Pin
Michael Eber8-Feb-10 11:51
Michael Eber8-Feb-10 11:51 
AnswerRe: Menu links are sometimes non-responsive to the Click Event???!!! Pin
Abhinav S8-Feb-10 23:46
Abhinav S8-Feb-10 23:46 
QuestionImage on form Pin
Syed Shahid Hussain8-Feb-10 11:11
Syed Shahid Hussain8-Feb-10 11:11 
AnswerRe: Image on form Pin
Not Active8-Feb-10 11:16
mentorNot Active8-Feb-10 11:16 
GeneralRe: Image on form Pin
Syed Shahid Hussain8-Feb-10 21:43
Syed Shahid Hussain8-Feb-10 21:43 
GeneralRe: Image on form Pin
Pete O'Hanlon8-Feb-10 21:52
mvePete O'Hanlon8-Feb-10 21:52 
QuestionWPF Pin
Syed Shahid Hussain8-Feb-10 11:08
Syed Shahid Hussain8-Feb-10 11:08 
AnswerRe: WPF Pin
Not Active8-Feb-10 11:17
mentorNot Active8-Feb-10 11:17 
AnswerRe: WPF Pin
V.8-Feb-10 21:25
professionalV.8-Feb-10 21:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.