HiveBrain v1.2.0
Get Started
← Back to all entries
patterncsharpMinor

TicTactics Presentation

Submitted by: @import:stackexchange-codereview··
0
Viewed 0 times
tictacticspresentationstackoverflow

Problem

This is my take at the current code-challenge, Ultimate Tic-Tac-Toe, at least the presentation part.

As I chose to write a WPF application for my game, and this is my very first time fiddling with a UniformGrid and ItemsControl, I'd like to know if I've done any beginner mistakes.

MainWindow


    
        
            
            
            
            
            
                
                    
                        
                        
                        
                        
                    
                
            
        

        
            
            
            
            
            

            
                
                    
                    
                        
                            
                        
                    
                
            
        
    

    
        
            
            
            
        
        
            
            
            
        

        

            
                
                    
                
            

            
                
                    
                        
                            
                        
                    
                
            

        

    


SmallBoardView


    
        
            
            
            
            
            
            

            
                
                    
                    
                        
                            
                        
                    
                    
                
            
        
    
    
        
            
                
                    
                
            
            
                
                    
                        
                    
                
            
        
    


Result

As the window gets resized, the game board and its contents scale perfectly well, all I'm missing is `MinWidt

Solution


  • ` - Border. prefix should be redundant, as you specify target type in Style.



  • a) i think in such simple cases where you have like two possible states a DataTrigger is superior to spawning yet another converter. b) wasnt Value nullable? Wont it throw an exception if HasValue == false`?



Apart from that your markup looks pretty clean to me.

Context

StackExchange Code Review Q#41026, answer score: 2

Revisions (0)

No revisions yet.