Invoke-WebRequest http://yourwebapp/BackgroundTask/Run
<Grid>
<Grid.RowDefenitions>
<RowDefenition height='*' />
<RowDefenition height='auto' />
<RowDefenition height='*' />
</Grid.RowDefenitions>
<Grid.ColumnDefenitions>
<ColumnDefenition width='*' />
<ColumnDefenition width='auto' />
<ColumnDefenition width='*' />
</Grid.ColumnDefenitions>
<Frame Grid.Row="1" Grid.Column="1" Content="{Binding CurrentPage}"
NavigationUIVisibility="Hidden"
Opacity="{Binding Opacity}"/>
</Grid>
using (var stream = new StreamReader(fileName, Encoding.GetEncoding(1251)))
{
while (stream.Peek() >= 0)
{
var line = stream.ReadLine();
}
}
using (var stream = webRequest.GetRequestStream())
using (var writer = new StreamWriter(stream, Encoding.UTF8))
writer.Write(yourstring);
<Window.Resources>
<DataGrid x:Key="PersonDataGrid" AutoGenerateColumns="False" ItemsSource="{Binding .}" x:Shared="False">
<DataGrid.Columns>
<DataGridTextColumn Header="First Name" Binding="{Binding Path=FirstName}" IsReadOnly="True"/>
<DataGridTextColumn Header="Last Name" Binding="{Binding Path=LastName}" IsReadOnly="True"/>
</DataGrid.Columns>
</DataGrid>
</Window.Resources>
<StackPanel>
<ContentControl Content="{StaticResource PersonDataGrid}" DataContext="{Binding Path=Customers}" />
<ContentControl Content="{StaticResource PersonDataGrid}" DataContext="{Binding Path=Employees}" />
</StackPanel>
var serviceHost = new ServiceHost(typeof(MessageService));
var uri = new Uri("http://localhost:8000/WCFDuplexServiceTest/MessageService")
serviceHost.AddServiceEndpoint(typeof(IMessageService), new WSDualHttpBinding(), uri);