Click here to Skip to main content
15,894,825 members
Home / Discussions / C#
   

C#

 
GeneralRe: OT Pin
DaveyM6923-Oct-10 13:03
professionalDaveyM6923-Oct-10 13:03 
GeneralRe: OT Pin
Luc Pattyn23-Oct-10 13:23
sitebuilderLuc Pattyn23-Oct-10 13:23 
GeneralRe: OT Pin
Luc Pattyn23-Oct-10 13:27
sitebuilderLuc Pattyn23-Oct-10 13:27 
GeneralRe: OT Pin
Keith Barrow23-Oct-10 21:38
professionalKeith Barrow23-Oct-10 21:38 
GeneralRe: OT Pin
Pete O'Hanlon25-Oct-10 5:17
mvePete O'Hanlon25-Oct-10 5:17 
GeneralRe: OT Pin
DaveyM6925-Oct-10 10:04
professionalDaveyM6925-Oct-10 10:04 
GeneralRe: OT Pin
Pete O'Hanlon25-Oct-10 22:00
mvePete O'Hanlon25-Oct-10 22:00 
QuestionWPF GIF Animation on a Window Pin
SunnyChris8323-Oct-10 3:02
SunnyChris8323-Oct-10 3:02 
Source Code:
WPF GIF Animation


Current situation:
The animation is run in a list but I want that the animation run without a list.

My current code:
using System;
using System.Windows;
using System.Drawing;
using System.Diagnostics;
using WpfAnimatedControl;
using System.Windows.Documents;
using System.Collections.Generic;

namespace AnimatedControlTester
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
    {
        public Window1()
        {
            InitializeComponent();
            rich.Document = new System.Windows.Documents.FlowDocument();

            Paragraph p = new Paragraph();
            AnimatedImage aimg = new AnimatedImage();
            aimg.Stretch = System.Windows.Media.Stretch.None;
            System.Drawing.Image img;
            img = AnimatedControlTester.Resources.Hexe;
            aimg.LoadSmile((System.Drawing.Bitmap)img);
            p.Inlines.Add(aimg);
            rich.Document.Blocks.Add(p);

            image1.Source = p;
        }

        private void aimg_AnimatedBitmapChanged(object sender, RoutedPropertyChangedEventArgs<Bitmap> e)
        {
            Debug.WriteLine("AnimatedBitmapChanged event occured, add extra code here if necessary.");
        }
        
    }
}


Error on line:
image1.Source = p;

Error:
Cannot implicitly convert type 'System.Windows.Documents.Paragraph' to 'System.Windows.Media.ImageSource'
AnswerRe: WPF GIF Animation on a Window Pin
SunnyChris8323-Oct-10 7:52
SunnyChris8323-Oct-10 7:52 
QuestionMdiParent-Child problem Pin
Erdinc2722-Oct-10 22:48
Erdinc2722-Oct-10 22:48 
AnswerRe: MdiParent-Child problem Pin
_Erik_22-Oct-10 23:11
_Erik_22-Oct-10 23:11 
GeneralRe: MdiParent-Child problem Pin
Erdinc2722-Oct-10 23:19
Erdinc2722-Oct-10 23:19 
GeneralRe: MdiParent-Child problem Pin
_Erik_23-Oct-10 0:11
_Erik_23-Oct-10 0:11 
GeneralRe: MdiParent-Child problem [modified] Pin
Erdinc2723-Oct-10 0:40
Erdinc2723-Oct-10 0:40 
GeneralRe: MdiParent-Child problem Pin
DaveyM6923-Oct-10 3:09
professionalDaveyM6923-Oct-10 3:09 
GeneralRe: MdiParent-Child problem Pin
Erdinc2723-Oct-10 3:26
Erdinc2723-Oct-10 3:26 
GeneralRe: MdiParent-Child problem Pin
_Erik_25-Oct-10 3:36
_Erik_25-Oct-10 3:36 
GeneralRe: MdiParent-Child problem Pin
Erdinc2725-Oct-10 3:53
Erdinc2725-Oct-10 3:53 
QuestionOptional Argument Pin
Anubhava Dimri22-Oct-10 21:09
Anubhava Dimri22-Oct-10 21:09 
AnswerRe: Optional Argument Pin
JF201522-Oct-10 21:33
JF201522-Oct-10 21:33 
AnswerRe: Optional Argument Pin
Abhinav S22-Oct-10 22:53
Abhinav S22-Oct-10 22:53 
AnswerShameless Plug Pin
Keith Barrow23-Oct-10 3:05
professionalKeith Barrow23-Oct-10 3:05 
GeneralRe: Shameless Plug Pin
Anubhava Dimri24-Oct-10 18:09
Anubhava Dimri24-Oct-10 18:09 
QuestionChars received Pin
Tichaona J22-Oct-10 10:26
Tichaona J22-Oct-10 10:26 
AnswerRe: Chars received Pin
dbrenth22-Oct-10 10:49
dbrenth22-Oct-10 10:49 

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.