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.

Routet Command / Event - Problem

Empfohlene Antworten

Veröffentlicht

Hi zusammen,

versuche mich gerade in WPF und dem Modell von Routed Commands.

Ich habe mehrere UserControls für die jeweiligen Entitys erstellt.

Als Beispiel eine Person und mehrere zugeordnete Telefonnummern.

Es gibt ein PersonShape, innerhalb dessen ein ContactShape und innerhalb dessen drei PhoneNumberShapes, die per DataBinding an die Properties des Person-Objekts gebunden sind.

Also <myns:PhoneNumberShape Binding="{Binding Path=HomePhone}"></...>

Anzeigen klappt wunderbar.

Wenn dem PhoneNumber-Objekt noch keine Dataset-Row zugeordnet ist, dann hat es eine Property "IsEmpty", die entsprechend "True" zurückgibt.

In diesem Fall wird ein Button eingeblendet, dem ich gerne ein RoutedCommand zuordnen möchte.

Problem: Innerhalb des PhoneNumberShape weiß ich nicht, welcher Eigenschaft des Person-Objekts von Typ PhoneNumber ich die neu erzeugte ID zuordnen soll.

Ist es sinnvoll, innerhalb des Contactshape alle "New"-Events abzufangen und dann per select-case im Code zu sehen, welches das Event geschmissen hat?

Das ist in meinen Augen sehr "unsauber". Was meint Ihr?

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.