ItemClicked event is not supported as an EventTriggerBehavior within ListItemTemplate

I’ve been working on writing some code samples for our Universal Windows Platform, they really are pretty neat how they enable a single app to run across Windows desktop, phone, Xbox One, and even HoloLens eventually. We’ll have the code sample released in the near future, but for now I wanted to blog about some small issues I’ve run into, couldn’t find any relevant documentation or stackoverflow answers, and I ended up figuring out the solutions on my own.
In this case, we were creating a listview and each item we wanted to be clickable to navigate to a detail page regarding that item. The listview control does have a selected item functionality built in, but we didn’t want to use that. A simple command to execute when one of the items is clicked is exactly what we wanted.
<DataTemplate x:Key="ListItemTemplate">
      <core:EventTriggerBehavior EventName="ItemClick">
            Command="{Binding DataContext.FooCommand, ElementName=LayoutRoot}"
            CommandParameter="{Binding}" />

<ListView ItemsSource="{Binding TheItems}"
   IsItemClickEnabled="True" SelectionMode="None"
   ItemTemplate="{StaticResource ListItemTemplate}" />
 Seems like this will get the job done, but compiler kept throwing us this very helpful error.
Cannot add instance of type 'Microsoft.Xaml.Interactions.Core.EventTriggerBehavior' to a collection of type 'Microsoft.Xaml.Interactivity.BehaviorCollection'. [Line: 27 Position: 95]
Cannot add instance of type 'Microsoft.Xaml.Interactions.Core.InvokeCommandAction' to a collection of type 'Microsoft.Xaml.Interactivity.BehaviorCollection'. [Line: 29 Position: 99]
Cannot add instance of type 'Microsoft.Xaml.Interactions.Core.EventTriggerBehavior' to a collection of type 'Microsoft.Xaml.Interactivity.BehaviorCollection'. [Line: 28 Position: 95]

Well, after a bit of digging I found out that a data template does not support an event trigger behavior for the event name as ItemClick. The ItemClick event is actually specific to the ListView xaml control, which is why the compiler complains that it cannot be added to the BehaviorCollection, so in our event trigger behavior we had to use a different event entirely. The Tapped event is the event we want, it is a high level event to cover both touch and mouse interactions.

<DataTemplate x:Key="ListItemTemplate">
      <core:EventTriggerBehavior EventName="Tapped">
            Command="{Binding DataContext.FooCommand, ElementName=LayoutRoot}"
            CommandParameter="{Binding}" />

<ListView ItemsSource="{Binding TheItems}"
   IsItemClickEnabled="True" SelectionMode="None"
   ItemTemplate="{StaticResource ListItemTemplate}" />
 There we go. Now, when a user clicks, or touches, one of the items shown in the ListView, the proper trigger is fired.  Hope this helps!

Staying Fresh When Behind

Dota Match 1246203674

I’m still not exactly sure how we end up winning this game, sheer willpower?  The opposing team had a better team composition, more carries(also better ones in my opinion), they were ahead of us by over 5k xp multiple times within 30 minutes, and we had a player(Slardar) that seemed to be feeding on purpose.  The only thing we had going for us was their Lion kept taking all their kills, hard to believe when they have a Sniper and Riki.  Within the first 10 minutes my lane partner was calling it game over, and I honestly thought he was right.  We couldn’t get much farm and they were killing us if we stepped past our towers.  But like any competition, you need a clear and optimistic mind if you ever hope to win.  Giving up is the last thing you want to even think about.  So we kept playing.  We held our own at our high ground and they couldn’t seem to break it.

So remember, it doesn’t matter what comes, fresh goes better in life!

Playing with Noobs

Lately I have not been playing many single player games at all.  I have a few I would like to play through, but I’m currently immersed in multiplayer team games.  The biggest taker of my time is Dota2 followed by Destiny and now that Smash Bros is out I’ll probably be learning the newer ropes for that too.  Multiplayer games have this innate ability to be easy fun compared to a single player campaign simply because you are playing with other people; friends or not, the game is infinitely more interesting because you are interacting with actual people and can be more fun.  Can being the keyword there, because when your game revolves around other players it no longer goes the way you want it to.  Just like in a team sport, if someone fails to preform their role then you can fail as a result even if you do yours well.  This happens more often than I’d like, or maybe that is confirmation bias, and I’m not ashamed to admit that it can frustrate the hell out of me.

The other day a few buddies and I were playing a game of Dota2 with a player on our team that was almost certainly brand new to the game.  This sniper didn’t buy any of the suggested items, instead he only bought items which improved his agility statistic(which does make some sense as agility is the hero’s primary stat).  We tried suggesting better items to buy/use, but he kept buying agility items.  As a result, he died a lot in the early game, “feeding” the other team gold and exp, making the rest of the game a very one sided experience.  My friends and I didn’t blame or yell at the sniper player over our voice chat but we all knew who cost us the game, or at least a good game.  In the words of my friend Jon, “Why are playing with a first timer?  Why is this possible?”.

Earlier this week I was going through the Vault of Glass raid on Destiny with 5 other coworkers.  A raid is a type of mission that is usually much larger in scale and requires a team of players to work together to conquer obstacles, enemies, and puzzles to finish it.  You need above average teamwork to accomplish this challenge, and it can take hours to complete.  I have gone through the raid a few times now but this time I believe we had more people on the fireteam that hadn’t finished it than those of us that had, and I was the most experienced player.  Throughout the raid I could feel frustration bubbling up when someone didn’t do their part, missed an oracle call out, or just died when they shouldn’t have.  Any fault in someone’s play usual result in a team wipe and we would have to start the section over again.  Our final time was 3 1/2 hours when it usually takes my more experienced group about 1 hour.  I couldn’t get mad though, I had joined this group of my own choice.  We were also talking and laughing throughout the entire thing, it was very fun even though it was taking a lot longer.  I stayed because every raider has their first raid when they were learning what to do, what not to do, etc.  I’m sure I was the same or worse when I first learned it all.

So why is playing with noobs so frustrating when it is an inevitable experience?  After all, you can’t truly ever have someone play their first team game without playing with actual teammates, it wouldn’t be a real first game.  When you play any game you feel competent at, you expect to at least do well enough to be satisfied with your performance.  But the shtick of any team game is you can’t do your best if someone else holds you back.  Just like how a team victory feels that much better when everyone is assisting each other, a team loss feels that much worse when you can’t do your job because someone isn’t doing theirs’.  It has happened, it is happening, and it will continue to happen.  I think too many noobs face people yelling at and insulting them so they keep their microphone and speakers off and therefore don’t learn from others who sometimes actually try to help them in game.  I’ve found the best response is to take a breathe, pop a mentos, and make the best of the game you can.  Talk to the noob, be friendly, and explain things you think he may be confused with.  It is surprising how quick they will start asking you more questions or be more eager to help out once they see you as an ally/teacher.

We Need More Spencer Mansions (The Jimquisition)

Resident Evil HD REMASTER is a remastered version of the remake of the original Resident Evil game released in 1996.  I didn’t know exactly what it was about Resident Evil, but it stuck in my brain as one-of-those-games since the first time I played it.  Years later, playing the REmake on the GameCube in 2002 I realized that it was the mansion atmosphere that made this game special.

The Spencer Mansion is almost a main character in its own right, adding an eerie unsettling stillness as you explore.  Throughout the game you become intimately familiar with its hallways, puzzles, tenants(alive or dead), sounds and music(or lack thereof), and back story.  But it doesn’t stay static, even after backtracking the mansion’s passageways, doors will break if you use them too much, zombies will come back to life, new enemies will burst out of doors you thought to be safe.  The design of this game is so well done that it will forever be the definition of Survival Horror for me.

Custom Dungeon World Move: Identify

I’ve been playing a little bit of Dungeon World with some friends lately(the system is awesome, very streamlined for beginners, and I really love the influence the players have in telling the action/story).  One thing that I found odd, coming from D&D proper, was the lack of any kind of an Identify spell.  The creators replied to my tweet regarding how to figure out a magical item and pointed to Spout Lore(if it fits), Ritual, asking a another being for help, and trying it out to see what happens.  That last option honestly sounds awesome and very “Dungeon Worldy” to me, but I thought I’d try introducing a custom move in a future game to see how it goes.

The following move is based heavily on Whiskeyjack’s idea in this thread, which they actually use in Apocalypse World.  Since the two systems “run on the same engine”, and share the same creators, I thought it would fit into Dungeon World easily enough.

This is an advanced move, accessible starting at level 2, available under the Bard and Wizard classes.  The downside to picking this advanced move upon leveling up is that the player could just try to figure out the magical item on their own and take a more unique or useful move instead.


When you have some quiet time you can study an item you know to be magical to reveal some of what it does; roll +Int and ask a number of questions to the GM who will answer truthfully
On a 10+, choose two from the 7-9 list
On 7-9, choose one from the list

  • You discover the item’s command word. Tell the GM how this happened and he will tell you what the command word is.  If there is no command word, the GM says so as their answer.
  • As you study the item it imparts to you a hint of its use. The GM will give you a one or two word hint/description relating to it’s use.
  • You remember some historical fact relating to the item you’re inspecting. The GM will ask you two questions about the item’s origin.
  • You think that you have figured out a way to reveal the item’s secrets, but it is going to cost you. The GM will tell you the cost and you can decide if you think it is worth it.

To pair with this new player move, in an effort to make things interesting, I will also offer this GM move for use on a 6-, Activate the magical item.  Perhaps this isn’t always relevant, the magical properties could be passive, but if the weapon needs to be activated in some way, have some fun and activate it.  They wanted to find out what it does right?


In this example, the dagger’s magical power is it renders the wielder invisible only if they stab themselves with it.

Cory: Okay, since we’re making camp anyway I want to identify this dagger I found.

GM: Alright sure, roll+Int!

Cory: Okay.  Oh man a 4?  Argh, guess I’ll try some other time.

GM: Not so fast…You’re looking over this dagger, trying to extract some magical energy to clue you in on what it can do.  After about 20 minutes you get careless and it slips accidentally stabbing yourself for d4 damage!  However, upon stabbing your leg you turn invisible.

Cory: Whoa, cool!  And I only take d4-2 damage b/c of my armor.  This will come in handy…

Observations of a D&D noob

One of the things I’ve always wanted to do is play through a Dungeons and Dragons campaign.  There is this stigma with people that play D&D, commenting on how silly they are, calling it playing make believe way past the acceptable age, hearing passing comments in Sunday School when I was young about the spiritual dangers of Dungeons and Dragons(btw; what kind of Dungeon Master doesn’t give you a save vs poison?), or see it get poked fun of on TV.  Despite people looking down at the D&D crowd a little, something attracted me to the idea of participating.  Maybe it was the idea of that which is forbidden or maybe I never experienced that level of nerdom, but for some reason I wanted in.

Brief spiel on what Dungeons and Dragons is if you don’t know: Dungeons and Dragons(D&D) is a structured and open ended role playing system where players create and control a character to interact within the game world usually run by another player known as the Dungeon Master(DM).  There are rules that everyone, yes even the DM 99% of the time, must follow which governs how players can progress, attack, or generally interact with other characters or the world itself.  There have been many different systems, editions, variations, and rule sets created since the original conception in 1974 by Gary Gygax, but at its heart the goal has stayed the same: keep the system free enough so the players can to do whatever the hell they want to but while still keeping them under some realistic limitations.  You can play an evil wizard seeking revenge but you can’t play as a dragon archer that shoots swords out of its eyes(well at least not when you’re only level 1!).

Fast forward through highschool and college, where I avoided any D&D action, to when I started watching Rollplay.  Rollplay was created by twitch/youtube content creator itmejp and the rest of the cast are mostly personalities from the professional USA Starcraft 2 scene.  I don’t think any of them had played tabletop D&D proper before, except for their DM who has played for years, so it was really fun and interesting learning how the game works alongside the cast.  I also got the opportunity to moderate itmejp’s twitch channel which is cool but also a big chore; sometimes I just want to watch the show and not ban a douchebag in chat every 7 minutes.  So what started in February 2013 has continued over a year to today with Rollplay consisting of four different campaigns/shows, hundreds of exciting plot twists, and thousands of people tuning in each week to see what happens with their favorite characters.  If you think Game of Thrones is exciting and keeps you on your toes, try watching Rollplay D&D/Solum.  When you have a good DM(a mix of fairness, creativity, and a bit of a desire to kill you) the world and story never seems dull.  When you have interesting characters(complete with their own back stories, personalities, and quirks) interacting with each other adds more to the story and plot.  It can feel like a well written book at times if the harmony is there, except for one thing: the main characters aren’t safe.  The Dungeon Master doesn’t want to kill you(at least not outright) but he certainly has to try to put you in danger, otherwise it’s no fun.  If the characters are guaranteed a cinematic resolution, then there isn’t any danger, and a world without danger is boring.  If a player character dies, that’s it.  That character is done, and usually don’t get to find out anything more about them.  If all the player characters die, you don’t get to find out what happens in the story because it ends there.  And it is this aspect that makes D&D exciting.  The characters are supposed to save the town by killing the evil dragon on the mountain.  If this was The Hobbit(and I very much love The Hobbit) we’re fairly safe in assuming that is what will eventually somehow happen, but in D&D the whole party could die and Bilbo never gets heard from again.  “But what happens to The Ring that Bilbo found!?”  We don’t find out, not until The Fellowship Of The Ring D&D campaign begins and then the dangers start all over again.

So after watching 150+ hours of the Rollplay gang do their thing, I decided it was time to take the plunge myself.  Would the other people in my party be super awkward and weird?  Would they all get frustrated with me learning how to play?  Would we get along?  Would I even enjoy playing?  This was all new territory for me so I was a unsure about a lot of things.  Luckily everything went super smooth, I found someone asking around r/itmejp, a community mostly for Rollplay fans/content, if anyone was interested in jumping into a campaign for first time players.  Cool!  Everyone else in the group was brand new or relatively new to D&D and it was the DM’s first time running a campaign.  It was very helpful, and a bit of a relief, to know I wasn’t going to be the only noob asking questions.  We play online using the webapp which allows us to roll virtual die(with a really good random number generator for dice rolls) and facilitates the DM to create maps, environments, and keep track of player data.  A few play sessions into our campaign we started streaming our own sessions via and have even started gathering our own small audience!  If you haven’t popped over to the An Adventure For Beginners Page, that is what it’s all about.  It’s been a journey in itself playing with my group and we have just passed our 30th play session.

Some thoughts:

  • People who play D&D aren’t weird, well not all of us
    • I’m sure there are weird people who play, but you get that with any activity.  They’re  just people who enjoy playing the game.  I’ve met sport jocks, English majors, theology students, and musicians that all love to play.  People from all walks of life enjoy coming together and participating in a common activity, what a concept eh?
  • Playing the game isn’t always super exciting
    • I usually am always having fun but you aren’t in a battle against hordes of orcs saving the local King every minute.  Like in real life, you have to take time to run errands, restock supplies, plan what you’re going to do next, plan again after the road you wanted to take is closed, and even take a rest day or two if your character gets sick.  A lot of it is simplified thanks to the rules/system and a quality DM, but it still happens.  A few times an entire session simply revolved around our party staying in a town talking to locals and shopping for items.  Learn to embrace it as a very important part of the game.
  • Our group is awesome
    • I honestly couldn’t have asked for a better group to find.  Not only was mostly everyone else in the same newbie boat as I was, but we all get along really well.  Most of us are fans of Rollplay and get to discuss the weekly happenings on the show.  All of us have very similar humor and love to joke around in game and out.  We even started to play other games together.  The players, characters, and DM all bring something different to the table and it really makes the game stand out.  Dare I say…I’ve made new friends through a random D&D party?
  • Streaming our game online adds an interesting dynamic
    • This isn’t something you’ll find in your typical D&D group but we have had lots of fun doing it.  Its a little frustrating when twitch decides to delete a recording or when parts of the recorded video go corrupt, but we’re learning how to work around the issue and are also hosting our recordings on YouTube, possibly with additional content.  Whether it is the audience interaction, hearing how watching us helps others understand D&D better, or just having the last session recorded for an easy recap makes the extra work worth it.  It has also propelled me into some web development involving wordpress and twitch integration, something I’ll share in the future.
  • I am having a lot more fun than I thought I would
    • Going into it, I was pretty sure I would have fun playing.  However I wasn’t expecting to have this much fun.  The first time we jumped into combat in game my character shot his bow and I rolled two perfect 20s in a row, critical hit!  One of our party members got arrested and we had to go through finding witnesses and a trial to get him off of a unfounded murder charge!  I can’t count the number of times we’ve gotten ourselves too far into combat with half the party unconscious and our cleric dishes out damage and heal spells to save us.  A bard in our group played Wrecking Ball on his flute and rolled a 1 for his skill check.  These are moments I will remember for a long time.  I look forward to Monday evenings when I can chill out with some friends online and roleplay Cabaan the Elf ranger who sucks at perception checks.

Moving forward, I’m not entirely sure what the future looks like.  We finished “Season 1” of our campaign with 30 play sessions, around 26 of them are recorded and online our twitch and youtube channels, and have had over 10,000 viewers.  10k isn’t a whole lot in the world of internet videos but it is pretty damn impressive for what we’re doing I think.  We will be starting the next season this week and I’m definitely excited to see where our story goes.

If you have any interest in checking out what our D&D sessions look like, jump over to our campaign page or stop by my twitch channel on a Monday evening(8pm EST | 5pm PST) and say hello!

Pre-Order Bonuses – The Other Side

Compare my recent rant about Titanfall’s lack of preorder bonuses(a good thing!) to what you get with Watch Dogs depending on what edition, location, or pass you buy.

When special editions go to far

When special editions go to far

There are eight, EIGHT, different editions to choose from.  Keep in mind, these are just the bonuses for buying a special edition copy of the game.  This image doesn’t show all the extra crap you get from preordering from Gamestop, Amazon, BestBuy, etc.

I get it, companies make money this way.  I just wish I could pay my $60 and own the complete game.  I’m not talking about extra guns, power-ups, or skins here, I don’t care about that stuff.  There are two pieces of DLC, created during the game’s development, that you have to pay extra to get.  For shame.

Pre-Order Bonuses

I know that I’m not the only one getting sick and tired of 10 different pre-order bonuses depending on what retailer you go to or version of the game you order.  It is getting out of hand.  I don’t mind so much when its simple game swag or in-game cosmetics, but sometimes it is extra weapons, maps, even entire DLC chapters.  Like day 0 DLC, it isn’t good for the industry and should stop.

  • The gamers don’t like it because they can’t get their hands on all of the game content.  A game that they paid for.
  • It’s bad for the retailers because now their orders don’t depend on actual service but who can shell out money for the best bonus.
  • It’s bad for the game companies because they are spending time making game content for small portions of their customer base.

So when Titanfall announced their preorder bonuses I was surprised when they actually did a great job.  No exclusive guns, or titans, or maps.  A few swag items and a possible guide that you can find on the internet.  Well done Respawn Entertainment!  As an avid gamer, thank you for not contributing to the preorder bonus ecosystem mess we are currently stuck in.

Xbox One

So every week since E3 I’ve logged on and wrote about the Xbox One and every week Microsoft has changed it, then I have to start writing all over again!  The latest is allowing self-publishing for developers, something I thought was the most important thing it was lacking since its announcement.  If Microsoft continues down this road I think we will see the Xbox One doing extremely well like the 360 did.

I will say this though, the original plans for the Xbox One being online and digital were not terrible and got way too much hate for what Microsoft was trying to do.  I was actually pretty excited.  I think the reversal was a good idea for the short term, but hopefully it won’t mess too much of the strategy up.  There are definitely reasons to prefer the PS4 over the Xbox One, but I don’t see any reasons to hate either console.  Sony is giving us a vastly improved PS3 while Microsoft is still trying to do something different and push digital content onto consoles; either one will be a great choice.

disclaimer//this was written before I got hired at Microsoft in September 2013

Spring Form Tag Broken for Portlet Use

This issue came up as I was dealing with the Spring Portlet ResourceRequest change(before I found the problem/solution).  Still not getting the portlet to render views via ResourceRequests properly, I decided to test with Spring 3.2.x to see if the problem would follow.  I was also curious to see what changes would be made on the portlet side of things, any added improvements or shortcuts?  Based on the 3.2.x changelog, not much was changed regarding portlet support(ctrl+f “portlet”).  But its never that simple, right?

Enter SPR-8684.  This change actually makes things easy for most Spring webapps; automatically prepending the contextPath and servletPath in the Spring form tag is an easy shortcut.  But for portlets, this renders the form tag essentially useless.  Portlets don’t want their forms to be prepended with their own contextPath, they should resolve to the portal’s contextPath.  The good news is that my request for a fix was accepted almost instantly, SPR-10382.  So I’ll just have to wait to use Spring 3.2.3.

I know many of my most recent posts have been about problems using Spring, but I don’t want to sound like a complainer.  Without Spring I would be without a brilliant framework to code portlets with, and its a pretty niche area to be honest.  I love Spring because they are constantly moving forward by adding new ideas and technologies into their product.  Also, the community support is pretty fantastic!