« first day (711 days earlier)      last day (3438 days later) » 

3:00 PM
and you can change the underlying panel used by any of the above so you have ultimate flexibility
 
Now, call Dread Pirate Peter a genius
 
the map ui in my roguelike is just an itemscontrol with a canvas as the panel
 
Because that is genius
How does it render them?
 
and it is a zoomable, viewported, virtualizing canvas so I can just plop my whole dungeon in there and not worry about it
 
That is awesome
 
3:03 PM
datatemplate based on object type
most of the templates are images
attached poperties in the style handle the x and y and zIndex
 
That's what I wanted
That's pretty cool
I hadn't thought of making games in WPF
But simple 2D ones could be quite easy
 
<ListBox Name="Elements" ItemsSource="{Binding Elements}" Background="Black" Style="{StaticResource MainMapStyle}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<zoomableCanvas:ZoomableCanvas Loaded="ZoomableCanvas_Loaded" Scale="{Binding Scale}" Offset="{Binding Offset}"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="IsEnabled" Value="False"/>
<Setter Property="Canvas.Left" Value="{Binding CanvasPosition.X}"/>
<Setter Property="Canvas.Top" Value="{Binding CanvasPosition.Y}"/>
 
That's hilariously simple
 
I may swap the canvas out for an embedded XNA windw eventually, but that should be pretty transparent
here is the template selector and a few example templates:
<DataTemplate x:Key="Atmosphere">
<Image Height="64" Width="64" Opacity="{Binding Opacity}" Visibility="{Binding Seen,Converter={StaticResource BooleanToVisibilityConverter}}" Source="{Binding Icon,Converter={StaticResource IIconToImageSourceConverter},ConverterParameter=atmosphere}"></Image>
</DataTemplate>

<DataTemplate x:Key="Items">
<Image Height="64" Width="64" Opacity="{Binding Opacity}" Visibility="{Binding Seen,Converter={StaticResource BooleanToVisibilityConverter}}" Source="{Binding Icon,Converter={StaticResource IIconToImageSourceConverter},ConverterParameter=items}"></Image>
 
got a screenie pirate?
 
3:07 PM
yeah, hold on a min. my company blocks imagur. I need to disconnect from my VPN
unless stack has its own image stuff?
 
I don't think so, not outside of questions
 
@DreadPiratePeter lucky you. It's my country who blocks imgur... :|
 
Is that what you're working on, DPP?
 
BTW, the lighting is simply done by varying opacity
yep
 
3:10 PM
Is there any way for an old MUDder to get involved?
 
nicee
 
That's awesome
Is that a personal project then?
 
Hey Denver.
 
and just since it is so cool, a screenie of my window for visualizing my monster AI behavior trees:
that curving line issue has since been solved (ty Reed!)
 
That's cool
 
3:12 PM
Oh snap Dread
I want to do exactly that soon (very similar) with my data.
Is the node view quite simple?
 
@Sean, yes.since my job normally takes up about 10% of my time and I work at home, I get a lot of work done on my game
 
What job takes 10% of the time?
I want it
 
You have it pretty good then :D that's so cool
 
well, it takes 10% of my time because I have almost 40 years of coding experience and I write a lot of tools to automate everything I do
 
Can you automate writing my code?
 
3:14 PM
Are you a robot?
 
I'll get you started

function TenThousandMonkeys()
{

}
 
I can automate anything, it is my specialty ;)
 
rebooting.
 
probably the only other person I've heard that say besides myself :D
 
Mav mostly automates people though
 
3:16 PM
to his basement
 
@Asheh, the node view control is from: mindscapehq.com
 
He starts tweaking them slowly until they do what he wants and enjoy it, too
 
Wow, expensive Dread?
 
oh and if anyone is interested, the ridiculously cool zoomable virtualizing canvas is detailed here: blogs.msdn.com/b/kaelr/archive/2010/07/29/zoomablecanvas.aspx
even if you don't need it, the articles are enlightening
 
Bookarmked
@Sean
what would be the way to change the layout of a view. Becausse its done via a resource dictionary, unload and reload it?
 
3:24 PM
Is anyone else honestly worried about Stephan?
 
Nope
@Asheh The layout of a view?
Uhh
 
I guess we need a template selector
 
@Asheh, got my company to pay for it
 
Mav said earlier if you used a data trigger
Then it updates the UI straight away
 
No sorry
 
3:25 PM
So maybe try using a data trigger on the type and then setting the content
 
My ObservableCollection of ViewModel's need to be displayed differently. Right?
 
Does it?
 
Yeah
FormView : ViewModel
NodeView :VIewModel
All the layout is done through the resource dictionary
Ohhh
I guess I can have a different window which loads a different dictionary?
 
you can have multiple views against the same viewmodel
 
Whats the common method for doing that?
 
3:28 PM
Well you've got two different types
You can use a data template
 
I use caliburn.micro which makes it dead simple
 
DPP: make that a proper link and I'll bookmark it [ ZoomableCanvas by Kael Rowan ]( http:// blogs.msdn.com/b/kaelr/archive/2010/07/29/zoomablecanvas.aspx )
remove spaces and it'll be ready
(use the actual http link instead of the hot linked text)
 
nope
 
You need http://
 
3:30 PM
ah, one sec
 
don't copy paste link text -- copy shortcut
 
how's that
 
Great
 
2 stars should answer that :)
 
cool, thanks
 
3:31 PM
thanks for sharing
 
@Sean
 
lol
 
Totally right again, missed that one thanks
 
You can ping me in the message, btw
 
I press enter and it keeps sending it before i type
 
3:33 PM
Use tab instead
 
@Sean this is better
 
Much
 
Yes
 
Tab FTW
 
Ok so if my FormView is different (the type). But DataField and DataStruct is always the same
I suppose Ill have a completely different set of keys in my other view
 
3:34 PM
You can re-use templates
If you want things to be presented in the same way, that is
But if not, yeah you will probably end up with different templates and selectors with different keys
 
Ohhhhhh I can just setup my type selector differently
Man this is so cool
 
^_^
Bollox
Does anyone know of the pre-4.5 [CallerMemberName] equivalent?
 
there's none
 
Can functions be called on the datacontext?
 
but r# can do it
sort of yes Asheh - but why do you want to?
 
3:45 PM
So, one of my DataTypes is an array. I want to have the option for a PLUS/MINUS button etc for array elements
 
calling a function everytime a datacontextchanged event is raised isn't very productive
how will a function call solve that?
 
The function call adds and removes from the observable collection
 
You want to make a command for that
Expose it on your view model
 
aren't commands global?
 
ICommand is your friend for that sort of thing
no
 
3:47 PM
I only want it to function for that particular Datafield
 
so expose only on that vm ?
 
Well you can have the command there and only display it in the template for that particular field
 
or yes you can do that too
 
Only display the buttons, sorry
 
Ah yes create a command to add remove the element and bind it
 
3:47 PM
yea
 
Ok great
 
but no data template will be operating on an array type - so no function call on a datacontext makes sense
 
My data template contains an itemscontrol, if one of these items (DataFields) is an array, it selects the DataStructTemplate, and this can be removed from its parent
So it should have a - sign next to it
and that will hook into a command which removes it from its observablecollection
 
*poof - brain exploded
 
lol
yep mine does urrday
 
3:50 PM
well i think by now you can make the right decision -- just put things where they're most scoped
 
:)
 
4:23 PM
I'm off guys, catch you later
 
Laters
Is there a way to fix these random XAML errors that don't cause the project to stop being compiled butclog up your error list?
 
no
lol
it sucks
 
Massively.
 
 
1 hour later…
5:54 PM
windows 10??
so, if every other windows version is bad (winME, vista, win7) are bad... what happend to win9 that was going to be the good one??
 
6:20 PM
Win7 is bad? Since when?
Also, win8.1 solves most of the complaints I've heard about win8. I don't mind it on my desktop.
 
6:32 PM
windows 10 is fake
 
@Asheh Don't uset he designer :)
 
how the f do i delete my xbox live account that was auto created for me
 
heh
 
literally impossible
i want to delete it, and link it to my actual account
 
I believe you are correct.
I've been trying to figure out how to change my PSN name for the better part of a decade.
 
 
2 hours later…
8:39 PM
@Billdr Sorry, win8 I meant
 
Righto. I didn't have a problem with vista either. I'm weird, I guess.
 
vista introduced UAC
 

« first day (711 days earlier)      last day (3438 days later) »