Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[WPF 4.0] Relevanz der Reihenfolge von lokalen Resourcen

Empfohlene Antworten

Veröffentlicht

Hallo Community,

ich verstehe es einfach nicht.

Ich erstelle ein neues WPF Projekt.

füge anschließend folgende Namespaces hinzu:


xmlns:local="clr-namespace:TestApplication"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
[/PHP]

und eine eigene leere Klasse Class1.

Folgende Resourcen implementier ich im Window-Objekt

[PHP]
<Window.Resources>
<local:Class1 x:Key="TestClass"></local:Class1>
<x:Array x:Key="TestArray" Type="sys:String">
<sys:String>Hallo</sys:String>
<sys:String>Welt</sys:String>
</x:Array>
</Window.Resources>

Beim Kompilieren erscheint folgende Meldung:

Fehler 1 Der Name "InitializeComponent" ist im aktuellen Kontext nicht vorhanden. C:\...\Visual Studio 2010\Projects\TestApplication\TestApplication\MainWindow.xaml.cs 24 13 TestApplication

Wenn ich jedoch die Resourcen andersum implementiere:

 
<Window.Resources>
<x:Array x:Key="TestArray" Type="sys:String">
<sys:String>Hallo</sys:String>
<sys:String>Welt</sys:String>
</x:Array>
<local:Class1 x:Key="TestClass"></local:Class1>
</Window.Resources>
[/PHP]

lässt sich das Programm fehlerfrei kompilieren.

Woran liegt das ?

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.