Search found 62 matches

by UE4
13 Mar 2018, 14:25
Forum: General Discussion
Replies: 1
Views: 679

Different on set UserControl's background

<DataTemplate> <local:TouchButton x:Name="TouchButtonInst" Width="{Binding DrawSize.X}" Height="{Binding DrawSize.Y}" noesis:EventToCommand.Event="ButtonAction" noesis:EventToCommand.Command="{Binding DataContext.HandleButtonAction, ElementName=SpellPanelControl}" noesis:EventToCommand.CommandParam...
by UE4
13 Mar 2018, 13:01
Forum: General Discussion
Replies: 5
Views: 1019

Re: How binding a element of TArray?

seems can not directly pass int 0 to ConverterParameter, the result of unbox is not a valid value.
And, how to binding the elememnt's member?
<Button Name="{Binding SpellList[0].DisplayName}"/>

unbox it to IList, may be hard to convert to UStruct?
by UE4
13 Mar 2018, 02:01
Forum: General Discussion
Replies: 13
Views: 2010

Re: How to send event from view to VM?

My game logic will process TouchDown/TouchUp event, so I think there should be both two commands for MVVM, am I wrong? At present, then EventToCommand can be used only once, so I implement a UserControl, and treat both TouchDown and TouchUp as ButtonAction event, but pass deffirent param, then conve...
by UE4
12 Mar 2018, 04:42
Forum: General Discussion
Replies: 13
Views: 2010

Re: How to send event from view to VM?

the Command can be set only once?
by UE4
12 Mar 2018, 04:41
Forum: General Discussion
Replies: 13
Views: 2010

Re: How to send event from view to VM?

solved it by: <ItemsControl.ItemContainerStyle> <Style> <Setter Property="Canvas.Left" Value="{Binding Offset.X}" /> <Setter Property="Canvas.Top" Value="{Binding Offset.Y}"/> <Setter Property="Canvas.Width" Value="{Binding DrawSize.X}"/> <Setter Property="Canvas.Height" Value="{Binding DrawSize.Y}"...
by UE4
12 Mar 2018, 03:04
Forum: General Discussion
Replies: 5
Views: 1019

How binding a element of TArray?

I want to binding to TArray[0], so is there a way to get TArray[0], I find a class NoesisArrayWrapper, but in Private directory. may be I need a fucntion such as NoesisCreateTArrayForComponent? <Button Content="{Binding SpellList, Converter={StaticResource SpellIndexConverter}, ConverterParameter=0}...
by UE4
07 Mar 2018, 11:40
Forum: General Discussion
Replies: 13
Views: 2010

Re: How to send event from view to VM?

how to convert event's param to command's param? Command's param in Ueral is a UObject, NoesisCreateBaseComponentForUObject(BaseComponent); if there is a JoystickControl, evenry time I TouchMove on joystick, a command fired. and a UObject created? or reuse the UObject? I find the these Uobject's nam...
by UE4
07 Mar 2018, 09:59
Forum: General Discussion
Replies: 7
Views: 1276

Re: UE4 Storyboard Completed Event

In Commands sample you can see how it is done in C++. In that example we created a DelegateCommand class that exposes a function delegate as a command. And here is how ViewModel uses it. The sample shows hoe to process Command in ViewModel, but is use an existed Command(Button.Click), and seems no ...
by UE4
07 Mar 2018, 07:48
Forum: General Discussion
Replies: 3
Views: 768

Re: Question about RaiseEVent(Args) and sample UserControl

Hi, As you figured out, if you want to create multiple custom events, you need multiple static const Noesis::RoutedEvent* members in your class. This RoutedEvent is passed as part of the RoutedEventArgs when you call RaiseEvent. As for the type of the event arguments, it depends. The code you've ad...
by UE4
07 Mar 2018, 06:27
Forum: General Discussion
Replies: 13
Views: 2010

Re: How to send event from view to VM?

Hi, I've tried this modified version of your xaml that doesn't use your custom TouchButton: I have a Spell class that exposes a property of type ICommand called SpellTouchDown and the data context has a property that is a collection of spells named SpellList. When I click the button SpellTouchDown ...