Parse command line arguments and make them available to an application. : Command « Windows Presentation Foundation « C# / C Sharp

Home
C# / C Sharp
1.2D Graphics
2.Class Interface
3.Collections Data Structure
4.Components
5.Data Types
6.Database ADO.net
7.Design Patterns
8.Development Class
9.Event
10.File Stream
11.Generics
12.GUI Windows Form
13.Language Basics
14.LINQ
15.Network
16.Office
17.Reflection
18.Regular Expressions
19.Security
20.Services Event
21.Thread
22.Web Services
23.Windows
24.Windows Presentation Foundation
25.XML
26.XML LINQ
C# / C Sharp by API
C# / CSharp Tutorial
C# / CSharp Open Source
C# / C Sharp » Windows Presentation Foundation » CommandScreenshots 
Parse command line arguments and make them available to an application.
  


<Application
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    x:Class="CommandLineArgumentSample.App"
    StartupUri="MainWindow.xaml"
    Startup="app_Startup" />

//File:App.xaml.cs
namespace CommandLineArgumentSample
{
    using System;
    using System.Collections;
    using System.Text.RegularExpressions;
    using System.Windows;

    public partial class App : Application
    {
        void app_Startup(object sender, StartupEventArgs e)
        {
            if (e.Args.Length == 0return;
            foreach (string arg in e.Args)
            {
                Console.WriteLine(arg);
            }
        }
    }
}

   
    
  
Related examples in the same category
1.Built-In Command BindingsBuilt-In Command Bindings
2.Help commandHelp command
3.Button CommandTarget BindingButton CommandTarget Binding
4.Creating CommandBinding and attaching an Executed and CanExecute handlerCreating CommandBinding and attaching an Executed and CanExecute handler
5.Creating a KeyBinding between the Open command and Ctrl-RCreating a KeyBinding between the Open command and Ctrl-R
6.Command Handler Command Binding in XamlCommand Handler Command Binding in Xaml
7.Command Handler Key BindingCommand Handler Key Binding
8.Bind the Button to a CommandBind the Button to a Command
9.Command EnablingCommand Enabling
10.Using CommandBinding and ExecutedRoutedEventHandler to bind Application event to an event handler methodUsing CommandBinding and ExecutedRoutedEventHandler to bind Application event to an event handler method
11.Create CommandBindings in Xaml and bind to ButtonCreate CommandBindings in Xaml and bind to Button
12.Bind TextBox save command to CommandBindingBind TextBox save command to CommandBinding
13.Use TextBox.CommandBindingst to bind commandUse TextBox.CommandBindingst to bind command
14.Handle a Button Click with Shared button click handlerHandle a Button Click with Shared button click handler
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.