Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You said:</p> <blockquote> <p>Decomposing the play area into smaller user controls would leverage the WPF layout capabilities, but it seems like decomposition would prevent the cards from expanding into adjacent user controls during the mouse-over, so that doesn't seem feasible either.</p> </blockquote> <p>But this is not correct. Decomposition is absolutely the right approach to take, and this would not prevent the cards from expanding into adjacent user controls. The reason being that you can use a <code>RenderTransform</code> rather than a <code>LayoutTransform</code>. See <a href="http://www.charlespetzold.com/blog/2006/03/211105.html" rel="nofollow noreferrer">this example</a>, by Charles Petzold, or <a href="http://patconroy.wordpress.com/2009/03/24/layouttransform-vs-rendertransform-in-wpf/" rel="nofollow noreferrer">this article</a>, to visualize the difference. Because a <code>RenderTransform</code> is applied after the layout has already occurred, your cards would be able to expand outside their bounds.</p> <p>Given that decomposition is the right approach, I would arrange your various card collections into a <code>Grid</code>, with each collection being an <code>ItemsControl</code>. The <code>ItemsControl</code> should bind its <code>ItemsSource</code> property to some collection, and then you can provide a custom <code>ItemTemplate</code> that would display the image and any other information. I would be hesitant to use a <code>Canvas</code>, as this would restrict you to hard-coding the positions for the cards (which is a very WinForms-like solution for a problem that can be far more elegantly solved). Take advantage of WPF's fantastic layout engine and use nested grids and items controls to create a dynamic layout. This will ensure that your game board looks good at any resolution and when stretched to various sizes.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload