Click here to Skip to main content
15,884,099 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: how to use List as a parameter in a call to a web service? Pin
Mark Salsbery7-Oct-09 7:31
Mark Salsbery7-Oct-09 7:31 
GeneralRe: how to use List as a parameter in a call to a web service? Pin
CBenac7-Oct-09 14:10
CBenac7-Oct-09 14:10 
GeneralRe: how to use List as a parameter in a call to a web service? Pin
Mark Salsbery7-Oct-09 15:22
Mark Salsbery7-Oct-09 15:22 
GeneralRe: how to use List as a parameter in a call to a web service? Pin
CBenac8-Oct-09 6:02
CBenac8-Oct-09 6:02 
GeneralRe: how to use List as a parameter in a call to a web service? Pin
Mark Salsbery8-Oct-09 10:14
Mark Salsbery8-Oct-09 10:14 
GeneralRe: how to use List as a parameter in a call to a web service? Pin
CBenac15-Oct-09 14:15
CBenac15-Oct-09 14:15 
GeneralRe: how to use List as a parameter in a call to a web service? Pin
Mark Salsbery15-Oct-09 14:33
Mark Salsbery15-Oct-09 14:33 
Questionscreen saver issue. It will only disply the last image for some reason [modified] Pin
havegunwilltravel6-Oct-09 1:26
havegunwilltravel6-Oct-09 1:26 
I have the following code that is suposed to loop through a number of images but sends out a blank page for the first images and only displays the last one in the list.
namespace WpfApplication5
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : System.Windows.Application
    {
        void OnStartup(Object sender, StartupEventArgs e)
        {

            //creates window on primary screen
            Window1 primaryWindow = new Window1();
            primaryWindow.WindowStartupLocation = WindowStartupLocation.Manual;
            System.Drawing.Rectangle location = System.Windows.Forms.Screen.PrimaryScreen.Bounds;
            primaryWindow.WindowState = WindowState.Maximized;
            string Path = Environment.CurrentDirectory + "\\images";

            //creates window on other screens
            foreach (System.Windows.Forms.Screen screen in System.Windows.Forms.Screen.AllScreens)
            {
                if (screen == System.Windows.Forms.Screen.PrimaryScreen)
                {
                    Window1 window = new Window1();
                    window.Photos = (PhotoCollection)(this.Resources["Photos"] as ObjectDataProvider).Data;
                    window.Photos.Path = Environment.CurrentDirectory + "\\Images";

                    for (int i = 0; i < window.Photos.Count; ++i)
                    {  
                        window.WindowStartupLocation = WindowStartupLocation.Manual;
                        location = screen.Bounds;
                        //covers entire monitor
                        window.Left = location.X - 7;
                        window.Top = location.Y - 7;
                        window.Width = location.Width + 14;
                        window.Height = location.Height + 14;
                        
            
                        if (i > 0)
                            System.Threading.Thread.Sleep(40);
                        window.ScreenSaver(window.Photos[i].Source);

                        window.Show();
                        
                    }
                }
            }

        }

    }
}
    public partial class Window1 : System.Windows.Window
    {
        public PhotoCollection Photos;
        public Window1()
        {
            InitializeComponent();
        }

        void OnLoaded(object sender, EventArgs e)
        {
            //Initialize background color with BackgroundColor application setting
            TypeConverter colorTypeConverter = TypeDescriptor.GetConverter(typeof(Color));
            Background = new SolidColorBrush((Color)colorTypeConverter.ConvertFrom(Properties.Settings.Default.BackgroundColor));
        }
       
       
        public void ScreenSaver(string imagepath)
        {
            StackPanel mainPanel = new StackPanel();

            Window1 window = new Window1();
            ImageBrush picturebrush = new ImageBrush();
            picturebrush.ImageSource =
                new BitmapImage(
                    new Uri(imagepath, UriKind.Relative)
                );

            Canvas myCanvas = new Canvas();
            System.Drawing.Rectangle location = System.Windows.Forms.Screen.PrimaryScreen.Bounds;
   
            //covers entire monitor
            window.Left = location.X - 7;
            window.Top = location.Y - 7;
            myCanvas.Width = location.Width + 14;
            myCanvas.Height = location.Height + 14;
            //myCanvas.Width = 300;
            //myCanvas.Height = 200;
            myCanvas.Background = picturebrush;
           
            mainPanel.Children.Add(myCanvas);
            this.Content = mainPanel;


modified on Tuesday, October 6, 2009 10:11 AM

AnswerRe: screen saver issue. It will only disply the last image for some reason Pin
Richard MacCutchan6-Oct-09 3:28
mveRichard MacCutchan6-Oct-09 3:28 
AnswerRe: screen saver issue. It will only disply the last image for some reason Pin
Christian Graus6-Oct-09 10:54
protectorChristian Graus6-Oct-09 10:54 
Questionscreen saver issue. It will only disply the last image for some reason Pin
havegunwilltravel6-Oct-09 1:14
havegunwilltravel6-Oct-09 1:14 
QuestionIs it possible to dynamically change font color on a cell by cell basis on the same row? Pin
Jon_Boy5-Oct-09 8:45
Jon_Boy5-Oct-09 8:45 
AnswerRe: Is it possible to dynamically change font color on a cell by cell basis on the same row? Pin
Pete O'Hanlon5-Oct-09 10:50
mvePete O'Hanlon5-Oct-09 10:50 
GeneralRe: Is it possible to dynamically change font color on a cell by cell basis on the same row? Pin
Jon_Boy6-Oct-09 1:19
Jon_Boy6-Oct-09 1:19 
QuestionSilverlight Vertigo.Slideshow problem Pin
Richard Hudson5-Oct-09 8:34
Richard Hudson5-Oct-09 8:34 
AnswerRe: Silverlight Vertigo.Slideshow problem Pin
Mark Salsbery6-Oct-09 8:21
Mark Salsbery6-Oct-09 8:21 
GeneralRe: Silverlight Vertigo.Slideshow problem Pin
Richard Hudson13-Oct-09 0:25
Richard Hudson13-Oct-09 0:25 
QuestionSpecify path to Icon file in XAML Pin
Etienne_1235-Oct-09 7:24
Etienne_1235-Oct-09 7:24 
AnswerRe: Specify path to Icon file in XAML Pin
Pete O'Hanlon5-Oct-09 10:49
mvePete O'Hanlon5-Oct-09 10:49 
GeneralRe: Specify path to Icon file in XAML Pin
Etienne_1236-Oct-09 3:42
Etienne_1236-Oct-09 3:42 
GeneralRe: Specify path to Icon file in XAML Pin
Pete O'Hanlon6-Oct-09 4:41
mvePete O'Hanlon6-Oct-09 4:41 
GeneralRe: Specify path to Icon file in XAML Pin
Etienne_1236-Oct-09 5:34
Etienne_1236-Oct-09 5:34 
GeneralRe: Specify path to Icon file in XAML Pin
Pete O'Hanlon6-Oct-09 11:11
mvePete O'Hanlon6-Oct-09 11:11 
GeneralRe: Specify path to Icon file in XAML Pin
Etienne_1236-Oct-09 11:33
Etienne_1236-Oct-09 11:33 
GeneralRe: Specify path to Icon file in XAML Pin
Pete O'Hanlon6-Oct-09 11:38
mvePete O'Hanlon6-Oct-09 11:38 

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.