Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
260
Binding IsMaximized to ViewModel
posted

I have a style defined for XamTile as follows:

        <Style TargetType="ig:XamTile" x:Key="fistyle">
            <Setter Property="IsMaximized" Value="{Binding Selected,Mode=TwoWay}"/>
        </Style>
Within the XamTileManager this style is being set as the ItemContainerStyle.  The theory is that as I add new items to the TileManager I can set Selected=true on the items viewmodel to make the new tile Maximzed.

 

Unfortunately, it doesn't work.  There are no binding errors and I have confirmed the Style is applied.  (I set IsHitTestVisible=False in the style to test it).

Parents
No Data
Reply
  • 7305
    Suggested Answer
    posted

    Hello,

    I am attaching a sample of one way of implementing it.

    When you load the sample you will see the second tile maximized. This is initially set up in XAML. Then use the "Add Tile" button to add new tiles. The new tiles are set up using the style like the one you provided, which sets the new tile in maximized state.

    Let me know how this works for you, or any questions you may have.

     

    Sam

    WPF_xamTile_Maximized.zip
Children