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.

Empfohlene Antworten

Veröffentlicht

In folgendem Quellcode, ist bei mir der Teil:  <DataTemplate x:DataType ="local:Kunde"> mit folgender Fehlermeldung unterkringelt: "Der Name "Kunde" ist im Namespace "using:InvoiceCreator" nicht vorhanden.

XAML Code:

<Page
    x:Class="InvoiceCreator.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:InvoiceCreator"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
    Loaded="Page_Loaded">

    <Grid>
        <ListView x:Name="ctlKundenListe" ItemsSource="{Binding Kunden}">
            <ListView.ItemTemplate>
                <DataTemplate x:DataType="local:Kunde">
                    <StackPanel>
                        <TextBlock Text="{Binding IDKunde}"></TextBlock>
                        <TextBlock Text="{Binding Vorname}"></TextBlock>
                        <TextBlock Text="{Binding Nachname}"></TextBlock>
                        <TextBlock Text="{Binding Ort}"></TextBlock>
                    </StackPanel>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>
    </Grid>
</Page>

Klasse Kunde:

namespace InvoiceCreator
{
    public class Kunde
    {
        public string IDKunde { get; set; }
        public string Vorname { get; set; }
        public string Nachname { get; set; }
        public string Ort { get; set; }
    }
}

 

Kann mir einer erklären, wo hier, mein Fehler ist?

  • Autor

Lag wohl dran das 

Loaded="Page_Loaded"

noch nicht implementiert war.

Erst nachdem ich diese Zeile entfernt hatte, und das Projekt neu erstellt hatte, war der Fehler weg. Nachdem ich die Zeile nachträglich hinzugefügt habe, ist der Fehler nicht mehr aufgetaucht.

Das Projekt neu zu erstellen, während die Zeile im Code stand, hat den Fehler nicht behoben.

Paradox.

Bearbeitet von InTheVoid

  • Autor
vor 7 Minuten schrieb KeeperOfCoffee:

Ist die Klasse InvoiceCreator neu? Dann hätte er sie vermutlich nach nem erstellen gefunden.

Eine Klasse InvoiceCreator gibts nicht. Das ist mein Projektname ?

Es gibt die Klasse Kunde und meine MainPage.xaml

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

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.