Я хочу иметь два вида статуса ** (SmallPay, Credit) **, но это определяется предыдущим UserControl(ItemDetail.xaml)
ItemDetail.xaml
<Border Background="#fb5106" CornerRadius="8" Cursor="Hand">
<Border.InputBindings>
<MouseBinding MouseAction="LeftClick" Command="{Binding Path=ClickPhoneNumberCommand}" CommandParameter="A"/>
</Border.InputBindings>
<TextBlock Text="SmallPay" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" FontSize="32" />
</Border>
<Border Grid.Column="2" Background="#e7001f" CornerRadius="8" Cursor="Hand">
<Border.InputBindings>
<MouseBinding MouseAction="LeftClick" Command="{Binding Path=ClickPhoneNumberCommand}" CommandParameter="B"/>
</Border.InputBindings>
<TextBlock Text="Credit" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" FontSize="32" />
</Border>
ViewModel.cs
public DelegateCommand ClickItemCommand
{
get
{
return new DelegateCommand(delegate ()
{
SelectedPopupType = PopupTypes.ItemDetail;
IsShowPopup = true;
});
}
}
public DelegateCommand ClickPhoneNumberCommand
{
get
{
return new DelegateCommand(delegate ()
{
SelectedPopupType = PopupTypes.PhoneNumber;
IsShowPopup = true;
});
}
}
Затем я хочу получить commandParameter
в UserControl
, открытом с помощью 'ClickPhoneNumberCommand
'.Но я не знаю как?Есть ли способ без ViewModel
?