Skip to content

Commit 7bdf6ad

Browse files
authored
Correct typo and formatting (#10877)
1 parent 29242e3 commit 7bdf6ad

File tree

7 files changed

+16
-25
lines changed

7 files changed

+16
-25
lines changed

snippets/csharp/System.Windows/Rect/Overview/MyApp.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
32
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
43
xmlns:my="clr-namespace:SDKSample"

snippets/csharp/System.Windows/Rect/Overview/MyApp.xaml.cs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
using System;
22
using System.Windows;
3-
using System.Windows.Navigation;
4-
using System.Windows.Controls;
5-
using System.Windows.Media;
6-
using System.Windows.Media.Animation;
73
using System.IO;
84

95
namespace SDKSample
106
{
117
public partial class MyApp : Application
128
{
9+
[STAThread]
10+
public static void Main()
11+
{
12+
MyApp app = new MyApp();
13+
app.InitializeComponent();
14+
app.Run();
15+
}
1316

1417
public MyApp()
1518
{
@@ -30,9 +33,10 @@ private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionE
3033
StreamWriter wr = new StreamWriter("error.txt");
3134
wr.Write(args.ExceptionObject.ToString());
3235
wr.Close();
33-
}catch( Exception e)
36+
}
37+
catch(Exception)
3438
{
35-
throw e;
39+
throw;
3640
}
3741
MessageBox.Show("Unhandled exception: " + args.ExceptionObject.ToString());
3842
}

snippets/csharp/System.Windows/Rect/Overview/MyApp1.xaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,4 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
x:Class="Microsoft.Samples.RectExamples.MyApp"
55
Startup="myAppStartup">
6-
7-
86
</Application>

snippets/csharp/System.Windows/Rect/Overview/MyApp1.xaml.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
using System;
1+
using SDKSample;
2+
using System;
23
using System.Windows;
3-
using System.Data;
4-
using System.Xml;
5-
using System.Configuration;
6-
using System.Windows.Media;
7-
using System.Windows.Media.Animation;
8-
using System.Windows.Navigation;
94

105
namespace Microsoft.Samples.RectExamples
116
{
@@ -33,4 +28,4 @@ private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionE
3328
MessageBox.Show("Unhandled exception: " + args.ExceptionObject.ToString());
3429
}
3530
}
36-
}
31+
}

snippets/csharp/System.Windows/Rect/Overview/RectExample.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// <SnippetRectExampleWholePage>
2-
using System;
32
using System.Windows;
43
using System.Windows.Controls;
54
using System.Windows.Media;
@@ -23,7 +22,7 @@ public RectExample()
2322
// 150 wide. The left side of the rectangle is 10 pixels from the left of the
2423
// Canvas and the top side of the rectangle is 100 pixels from the top of the Canvas.
2524
// Note: You could alternatively use the Rect Constructor to create this:
26-
// Rect my Rect1 = new Rect(10,100,150,100");
25+
// Rect myRect1 = new Rect(10, 100, 150, 100);
2726
Rect myRect1 = new Rect();
2827
myRect1.X = 10;
2928
myRect1.Y = 100;

snippets/csharp/System.Windows/Rect/Overview/RectExample1.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
using System;
22
using System.Windows;
33
using System.Windows.Controls;
4-
using System.Windows.Documents;
5-
using System.Windows.Navigation;
64
using System.Windows.Shapes;
7-
using System.Windows.Data;
85
using System.Windows.Media;
9-
using System.Windows.Media.Animation;
106

117
namespace Microsoft.Samples.RectExamples
128
{

snippets/csharp/System.Windows/Rect/Overview/Snippets.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net6.0-windows</TargetFrameworks>
4+
<OutputType>WinExe</OutputType>
5+
<TargetFramework>net6.0-windows</TargetFramework>
66
<UseWPF>true</UseWPF>
77
</PropertyGroup>
88

0 commit comments

Comments
 (0)