edgarhsanchez
Posts: 31
Joined: 21 May 2012, 18:19

Re: NoesisGUI and Unity Integration

25 Oct 2012, 22:32

Does..
xmlns:i="http://schemas.microsoft.com/expression ... eractivity"
xmlns:ei="http://schemas.microsoft.com/expression ... teractions"
namespaces work in NoesisGUI at this time? If not is there an equivalent or plans to support?
 
User avatar
sfernandez
Site Admin
Posts: 1912
Joined: 22 Dec 2011, 19:20

Re: NoesisGUI and Unity Integration

26 Oct 2012, 16:53

@edgarhsanchez: I suppose you are talking about using Blend Behavior and Action extensions. We implemented part of the base architecture to make them work, but currently only GoToStateAction is implemented.

A full implementation of this feature is not on our plans for NoesisGUI v1.0, but could be included in a future revision if most users have a demand for it.

In order to help you better, can you explain what exactly are you trying to do that it requires these extensions?

Thank for your collaboration.
 
edgarhsanchez
Posts: 31
Joined: 21 May 2012, 18:19

Re: NoesisGUI and Unity Integration

29 Oct 2012, 16:10

We use Interaction such as...
<i:Interaction.Triggers>
     <ei:DataTrigger Value="true" Binding="{Binding IsBlinking}">
         <m:ControlStoryboardAction Storyboard="{StaticResource BlinkingStoryboard}" />
     </ei:DataTrigger>
     <m:StoryboardCompletedTrigger Storyboard="{StaticResource BlinkingStoryboard}">
         <i:InvokeCommandAction Command="{Binding SomeCommand}" />
     </m:StoryboardCompletedTrigger>
     <i:EventTrigger EventName="Click">
         <i:InvokeCommandAction Command="ACommand"/>
     </i:EventTrigger>
</i:Interaction.Triggers>
to carry out specific animations or commands on events
 
User avatar
sfernandez
Site Admin
Posts: 1912
Joined: 22 Dec 2011, 19:20

Re: NoesisGUI and Unity Integration

01 Nov 2012, 02:19

@edgarhsanchez: We don't have implementations for all these extensions, but I'm almost sure that the xaml you presented can be translated to code that is already implemented.

For example, you can launch the BlinkingStoryboard when a property change event is raised for IsBlinking.
Then attach a handler for Completed event of that storyboard.
The handler will execute the SomeCommand command manually.
You can also attach another handler to Click event and execute the ACommand command manually.

If you need help to do it, just ask in the forums ;)
 
pmike
Posts: 28
Joined: 31 Oct 2012, 09:29

Re: NoesisGUI and Unity Integration

06 Nov 2012, 06:59

I'am try to import the last version of NoesisGUI (0.9.6) for Unity3D (version 3.5.4), but Unity says:
"Error while importing package: Package has unknown format".
Is package file correct?
 
dmrvar
Posts: 4
Joined: 08 Oct 2012, 16:02

Re: NoesisGUI and Unity Integration

06 Nov 2012, 08:15

Same with me!...3.5.5f2
"Error while importing package: Package has unknown format"
 
User avatar
sfernandez
Site Admin
Posts: 1912
Joined: 22 Dec 2011, 19:20

Re: NoesisGUI and Unity Integration

06 Nov 2012, 13:26

Sorry for the inconvenience. Yesterday we accidentally introduced a misconfiguration on the web server that lead to corrupt downloads of Unity packages. Now the problem is solved.

Please feel free to download again the package and try the new samples.

Thanks for your patience.
 
dmrvar
Posts: 4
Joined: 08 Oct 2012, 16:02

Re: NoesisGUI and Unity Integration

09 Nov 2012, 15:39

Thanks its working now.

My next questions are related to performance and data binding to real data object and using
this data in ItemsSource and DataContext...

1.Can you provide me working example how to use control.SetDataContext and control.SetItemsSource
who are using BaseComponent as parameter to bind c# data object


We have for example;
class Person
{
string name;
int age;
DateTime born;
}

so should we make something like that

class Person:DependencyObject
{
DependencyProperty name; //what type?
DependencyProperty age;// SWIGTYPE_p_int ?
DependencyProperty born;
}

binding:
Person person = new Person();
//initialize members
control.SetDataContext(person);

Collection items = new Collection();
items.Add(person1);
items.Add(person2);
....
control.SetItemsSource(items );

2. Do you plan to make any VirtualizingPanel?
For example:
I dynamically added 1000 Buttons to ScrollView->StackPanel.Items, only 20 visible on the screen
with ScrollView. Memory consumption in TaskManager was 2Gb.... :-( and very long loading time.

Is there any better performance when using DataTemplates and data binding..


I hope that you understand, what I am thinking about.
 
User avatar
sfernandez
Site Admin
Posts: 1912
Joined: 22 Dec 2011, 19:20

Re: NoesisGUI and Unity Integration

12 Nov 2012, 18:57

For question 1 we are still working on extensibility from Unity side. It is something that is working perfectly on the C++ side through the use of our reflection system. So the expectations are being able to use .NET reflection to obtain the necessary info for resolving bindings to Unity classes. When this is solved this process would be totally automatic.

Meanwhile you can populate your lists manually, creating the required elements for each item:
// Your data class
public struct Person
{
    public string name;
    public int age;
}

// ...

// Persons data
Person[] persons = new Person[] {
    new Person() { name = "John", age = 35 },
    new Person() { name = "Mike", age = 36 },
    new Person() { name = "Anne", age = 29 },
};
		
// List item generation
ListBox personsList = new ListBox();
personsList.SetHorizontalAlignment(HorizontalAlignment.Center);
personsList.SetVerticalAlignment(VerticalAlignment.Bottom);
personsList.SetMargin(new Thickness(20.0f));
ItemCollection items = personsList.GetItems();
		
foreach (Person person in persons)
{
    TextBlock name = new TextBlock(person.name);
    name.SetMinWidth(50.0f);
    TextBlock age = new TextBlock(person.age.ToString());
    age.SetMargin(new Thickness(10.0f, 0.0f, 0.0f, 0.0f));

    StackPanel personItem = new StackPanel();
    personItem.SetOrientation(Orientation.Horizontal);
    UIElementCollection children = personItem.GetChildren();

    children.Add(name);
    children.Add(age);

    items.Add(personItem);
}
For question 2 the answer is totally yes ;)
Not for version 1.0, because we are not focusing yet on optimizations. But it is planned to be included in version 1.1.

Who is online

Users browsing this forum: No registered users and 2 guests