Search found 2099 matches

by sfernandez
Yesterday, 14:09
Forum: General Discussion
Replies: 3
Views: 25

Re: Setting IsFocused without setting IsFocusEngaged

Thinking a bit more about this we are going to expose a new Focus() method in the UIElement to indicate if control should be engaged or not when getting the focus, this way the code will be clearer: void SetFocusAction::Invoke(Noesis::BaseComponent*) { Noesis::UIElement* element = GetTarget(); if (e...
by sfernandez
Yesterday, 10:34
Forum: General Discussion
Replies: 3
Views: 25

Re: Setting IsFocused without setting IsFocusEngaged

By default controls that get focus are automatically engaged unless they are focused from a gamepad directional input. To disable that behavior you can call in a control SetUsingFocusEngagement(true) before setting the focus. I think we can extend our SetFocusAction to include an extra property to i...
by sfernandez
09 Apr 2021, 18:32
Forum: General Discussion
Replies: 2
Views: 34

Re: html formatting in dynamic text

Hi, A TextBlock doesn't directly understand that formatted text. What other clients are doing is creating an attached property or behavior that generates the inlines for the TextBlock. Something like this: <TextBlock local:FormattedTextParser.Text="{Binding SomeFormattedText}"/> The parsing process ...
by sfernandez
09 Apr 2021, 16:50
Forum: General Discussion
Replies: 1
Views: 31

Re: i:Interaction.Triggers on Templates and Custom Controls are not instanced

Hi Justen, The correct way of doing this in WPF is by defining the Storyboards as part of the resources of an element of the template VisualTree: <Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:i="http://schemas.mic...
by sfernandez
09 Apr 2021, 13:13
Forum: General Discussion
Replies: 4
Views: 31

Re: DataTemplate creation in code

Please see my answer to your other post: viewtopic.php?f=3&t=2256&p=12448#p12448
by sfernandez
09 Apr 2021, 13:10
Forum: General Discussion
Replies: 3
Views: 29

Re: Implicit DataTemplates

I just created a view model like this: namespace Testing { public class MyViewModel { } } And use it in a xaml like this: <Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Testing"> <Grid.Resource...
by sfernandez
09 Apr 2021, 12:58
Forum: General Discussion
Replies: 4
Views: 25

Re: Assigning view to NoesisView in code

In Unity you can have a root xaml, let's say MainPage, that you can add to the scene using the NoesisView component. <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Grid x:Name="LayoutRoot"/> </Page> This will generate ...
by sfernandez
09 Apr 2021, 12:05
Forum: General Discussion
Replies: 4
Views: 31

Re: DataTemplate creation in code

Hi, the WPF framework is huge and we are implementing more and more things on each version based usually on the most requested features by our clients. If you find anything you need please don't hesitate to ask here in the forums and/or create a ticket in our bugtracker asking for it. So first of al...
by sfernandez
09 Apr 2021, 10:30
Forum: General Discussion
Replies: 4
Views: 42

Re: Assertion when using TemplateBinding

I was referring to the moment that a TemplateBinding value was set to the VisualTree when applying the Template: https://referencesource.microsoft.com/#PresentationFramework/src/Framework/System/Windows/FrameworkTemplate.cs,822 WPF implementation just creates a normal Binding with RelativeSource.Tem...
by sfernandez
07 Apr 2021, 16:49
Forum: General Discussion
Replies: 5
Views: 47

Re: controller B nav sometimes triggers multiple times, sometimes not at all

Is there a way to consume a button click event so that when visual tree changes it won't pick up the same button event again? Maybe something a delay before changing visual tree would work (seems hacky)? The default implementation of the GamepadTrigger doesn't handle the event, but the source code ...