Forums

Testing Feeback
Last Post 19 Sep 2014 05:23 PM by gogman. 56 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Page 2 of 3 << < 123 > >>
Author Messages
BamYaziUser is Offline
New Member
New Member
Posts:42


--
22 Jul 2014 01:14 PM
Trying to set Padding in a style

<Style x:Key="DialogTitle" TargetType="Border">
<Setter Property="Background" Value="SteelBlue" />
<Setter Property="Padding" Value="5" />
</Style>

causes #error:'Type Thickness not supported' error in generated code
Filip DušekUser is Offline
Advanced Member
Advanced Member
Posts:676


--
22 Jul 2014 01:23 PM
Listbox

Item template property is not supported, but when any ItemsControl is binded like that, it will search resource dictionary for data template. So you can put your data template to dictionary and just do this

<ListBox Height="200" ItemsSource="{Binding MapList}" /> 


You don't have to create data templates for primitive types. There are already in library. There is a issue with this if Listbox is child to TabItem (TabControl). Avoid that for now.

About Width in Setters (or any double number) and Padding, will fix that asap. I have to do some refactoring in UI Generator first.
Filip DušekUser is Offline
Advanced Member
Advanced Member
Posts:676


--
22 Jul 2014 02:04 PM
Think I will add ItemTemplate property just in case. It will be easier in some cases to use that instead of data template in dictionary.
BamYaziUser is Offline
New Member
New Member
Posts:42


--
22 Jul 2014 04:17 PM
You're awesome and reading my mind again - i was going to ask if you could do that since i think the datatemplate in dictionary route would mean that it's only possible to have one style of listbox per dictionary as i understand it.

I'm already making great headway with my in-game editing tools with your library - it's a great piece of work!

I've currently got a strange problem with buttons sometimes not working that i've not got to the bottom of yet. My UI consists of a toolbar and several pop-up panels that i show/hide by changing a visibilty binding. In some circumstances where i show/hide them in a sequence i get dead buttons (ie they have no mouseover effect and don't trigger command bindings). I think i'll need to put togeather an example to demonstrate this one, since it's a bit complex to explain in a message.

BamYaziUser is Offline
New Member
New Member
Posts:42


--
22 Jul 2014 04:23 PM
A feature that would be very helpful would be to have the generator dump an error log file, since the response code is very limited information and means that you have to drop into a command prompt and run the generate manually to try and figure out why your XAML didn't compile. If you wrote out a log file you could open it in visual studio to see problems (and since visual studio will spot changes if you keep the window open get updates if the compile fails).
BamYaziUser is Offline
New Member
New Member
Posts:42


--
22 Jul 2014 04:33 PM
Ignore my comment about the datatemplate, i was making a stupid mistake and trying to create a template for the ListBoxItem rather than my datatype - oops
Filip DušekUser is Offline
Advanced Member
Advanced Member
Posts:676


--
22 Jul 2014 05:12 PM

Posted By <a href='http://emptykeys.com/Activity-Feed/userid/19' class='af-profile-link'>BamYazi</a> on 22 Jul 2014 04:23 PM
A feature that would be very helpful would be to have the generator dump an error log file, since the response code is very limited information and means that you have to drop into a command prompt and run the generate manually to try and figure out why your XAML didn't compile. If you wrote out a log file you could open it in visual studio to see problems (and since visual studio will spot changes if you keep the window open get updates if the compile fails).


You should see it in Visual Studio Build Output window for now. Log file is on my todo list.
BamYaziUser is Offline
New Member
New Member
Posts:42


--
23 Jul 2014 12:59 PM
I've created a repro project to demonstrate the button problem i mentioned above...

https://www.dropbox.com/s/w2mtl5kf1ypfksl/Button_Issue.zip

Click Load on the Toolbar, A dialog will pop up.
Click OK on the dialog, and another dialog will pop up. The button on this second dialog will be broken.

If you click Inspect on the Toolbar the second dialog is displayed just on it's own. In this case the button will work.

The same issue appears to occur pretty much randomly with other buttons if you just click Save or Load or Inspect on the toolbar
and click Cancel to just close the dialog.

Filip DušekUser is Offline
Advanced Member
Advanced Member
Posts:676


--
23 Jul 2014 01:54 PM
I will check that out, thanks.

I was refactoring UI Generator today and adding Item Template, Content Template properties for better Data Template support. Width and Padding in setters are working. I will test it lil bit more and make some minor release tomorrow.
BamYaziUser is Offline
New Member
New Member
Posts:42


--
23 Jul 2014 05:53 PM
Wow, that was fast ! I wish i was half as productive as you getting my game done
Filip DušekUser is Offline
Advanced Member
Advanced Member
Posts:676


--
23 Jul 2014 07:00 PM
I found the problem with buttons too, so fix in next release.

Few notes.

You should use Visibility.Collapsed instead of Hidden. It's faster, coz when element is collapsed it's not part of Layout pass (same like in WPF). When using Style from dictionary with BasedOn attribute pls use {DynamicResource DialogButton}. I don't know how to generate code for Static Resource style with Based On at this moment.

There is one feature, which will be much better for creating dialog windows. You can't generate them yet, but there is a support on UI Root (OwnedWindowsContent) to show windows over the UI. You can move them around etc. I will make simple dialog Yes/No/Cancel before the end of beta.
BamYaziUser is Offline
New Member
New Member
Posts:42


--
24 Jul 2014 07:15 PM
Just tried to build with the latest release, it's a simple fix from my end but could fail more gracefully, but

<ListBox Height="234" ItemsSource="{Binding Mobs}">
<ListBox.ItemTemplate>
<DataTemplate>

</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>

I'm assuming it's caused by the empty data template (i had a bunch of them as placeholders waiting for this release) will cause the generator to exit -2...commenting them out fixes things. I've seen a few places where this happens if you have controls with expected content that isn't there so it's perhaps something you can deal with as a general case.

Thanks for the new release though - i'll implement my data templates now and give it some more testing
BamYaziUser is Offline
New Member
New Member
Posts:42


--
24 Jul 2014 07:16 PM
If you run the generator manually the actual error is...

Generating C:\_DEVELOPMENT\Enchilada\CastleSmashers\UserInterface\MapEditorUI.xa
ml
System.NullReferenceException: Object reference not set to an instance of an obj
ect.
at EmptyKeys.UserInterface.Generator.TypeGenerator.ProcessGenerators(Object s
ource, CodeTypeDeclaration classType, CodeMemberMethod method, Boolean generateF
ields) in e:\!Prog\TFS\LogicMarbles\UIGenerator\UIGenerator\TypeGenerator.cs:lin
e 149
BamYaziUser is Offline
New Member
New Member
Posts:42


--
24 Jul 2014 07:38 PM
I'm having some problem getting a datatemplate to work, am i doing something wrong

I have several ObservableCollections defined in my ViewModel

public ObservableCollection<TileDefinition> FloorTiles { get; set; }
public ObservableCollection<TileDefinition> WallTiles { get; set; }
public ObservableCollection<TileDefinition> DecorationTiles { get; set; }

These are definately populated when the datacontext is set on the view, and my XAML is

<ListBox Height="234" ItemsSource="{Binding FloorTiles}">
<ListBox.ItemTemplate>
<DataTemplate DataType="libs:TileDefinition">
<StackPanel>
<TextBlock Text="{Binding Name}" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>

with the libs namespace defined on ek:UIRoot

xmlns:libs="clr-namespace:Enchilada.Voxels.Libraries;assembly=Enchilada.Voxels"

And the Enchilada.Voxels dll is referenced by the UserInterface project

BamYaziUser is Offline
New Member
New Member
Posts:42


--
24 Jul 2014 07:52 PM
Not a major issue since i don't intend to run in a window once things are developed, but if you are running in a window and maximize it - everything goes bad
BamYaziUser is Offline
New Member
New Member
Posts:42


--
24 Jul 2014 08:13 PM
Another one i'm afraid...

binding SelectedIndex on a ListBox

<ListBox Height="234" SelectedIndex="{Binding SelectedWallIndex}">

private int selectedWallIndex;
public int SelectedWallIndex
{
get { return this.selectedWallIndex; }
set
{
SetProperty<int>(ref this.selectedWallIndex, value);
}
}

Causes an Object reference not set to an instance of an object in the generated code

Binding binding_e_88_SelectedIndex = new Binding("SelectedWallIndex");
e_88.SetBinding(ListBox.SelectedIndexProperty, binding_e_88_SelectedIndex);
Filip DušekUser is Offline
Advanced Member
Advanced Member
Posts:676


--
24 Jul 2014 08:15 PM
Hmm there is only one problem with ListBox binding, which i know about. If you have that List Box inside TabControl/TabItem. I have to fix one bug in generator for it, it's bit tricky.
BamYaziUser is Offline
New Member
New Member
Posts:42


--
24 Jul 2014 08:26 PM
Thats the problem then, the list box is inside a TabControl/TabItem in my XAML
BamYaziUser is Offline
New Member
New Member
Posts:42


--
24 Jul 2014 08:39 PM
Looks like the full screen problem is a bit more serious...

If i run in fullscreen in non HD resolution ie.
At 800x600 then non of the UI works no button mouseover or clicks.
At 1280x800 it sort of works although there appears to be some sort of scaling issue ie. button mouse overs/clicks work although somewhere to the left of the actual button
At 1920x1080 everything appears to work with the exception of the new slider control

Filip DušekUser is Offline
Advanced Member
Advanced Member
Posts:676


--
24 Jul 2014 10:00 PM
I'm leaving for a week tomorrow. Vacations \o/. Tho I will fix tabcontrol/listbox issue before leaving, full screen will have to wait.
You are not authorized to post a reply.
Page 2 of 3 << < 123 > >>