Posts mit dem Label XAML werden angezeigt. Alle Posts anzeigen
Posts mit dem Label XAML werden angezeigt. Alle Posts anzeigen

1.14.2016

WPF Listbox mit bleibender Markierung

Auch wenn ein anderes Element den Focus bekommt, bleibt der Eintrag "aktiv" markiert.

Events als Behaviors / Events in MVVM

Für WPF:
Verweis auf Microsoft.XAML.Interactions notwendig
...
xmlns:i=http://schemas.microsoft.com/expression/2010/interactivity
...
<i:Interaction.Triggers>


<i:EventTrigger EventName="Loaded">


<i:InvokeCommandAction Command="{Binding LoadedCommand}" />


</i:EventTrigger>


</i:Interaction.Triggers>


Für WinPhone 8.1:
Verweis auf Behaviors SDK (XAML)
...
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"


xmlns:core="using:Microsoft.Xaml.Interactions.Core"
...
<interactivity:Interaction.Behaviors>


<core:EventTriggerBehavior EventName="Tapped">


<core:InvokeCommandAction Command="{Binding RufeNummerAnCommand, Mode=OneWay}"/>


</core:EventTriggerBehavior>


</interactivity:Interaction.Behaviors>