Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

VB -> C#: Basic WPF Transformations

Offen
#995 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
38/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
csharp
Bereich
desktop, tooling

Rechercherichtung

Reproduziere den Bericht mit einem unveränderten VB WPF (.NET 7)-Projekt, einem Hello World-Textblock und der CodeConverter-Erweiterung. Verfolge den Konvertierungspfad für XAML x:Class-Namespaces, die Benennung von Application.xaml und die Sichtbarkeit von x:ClassModifier; abgeschlossen ist die Aufgabe, wenn das konvertierte C#-Projekt alle drei Fälle ohne manuelle Änderungen verarbeitet.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

help wanted VB -> C#

I just converted a WPF project from VB.NET to C#. There were a few basic transformations that had to be done manually. I want to describe them in this issue to (a) aid other people doing the same and (b) provide a TODO list in case anyone wants to add these transformations to CodeConverter.

These "issues" can be reproduced by creating a vanilla VB WPF (.NET 7) project with the Visual Studio default template, adding a "Hello World" text block to the main window and converting it to C# with the CodeConverter extension (I used 9.1.3.0).

  • You need to add the default namespace to all x:Class attributes in the root element of your XAML files. The VB compiler adds the default namespace automatically, but the C# compiler doesn't.
  • If no Sub Main() exists, you need to rename Application.xaml(.cs) to App.xaml(.cs). Apparently, C# only auto-generates a void Main for an App.xaml, not for an Application.xaml.
  • If your XAML files have non-default visibility (e.g. x:ClassModifier="Friend"), this value needs to be converted to the corresponding C# value (in this case x:ClassModifier="internal").
Vorherrschende Sprache
C#
Sterne
916
Forks
242
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus icsharpcode/CodeConverter

Alle Issues in icsharpcode/CodeConverter

Ähnliche Issues

Weitere Issues zu C#

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.