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
385
Question about TileLayoutOrder="UseExplicitRowColumnOnTile"
posted

Hi there...

My question is about the UseExplicitRowColumnOnTile is regarding a specific scenario that my end user may encounter.  Here are the steps:

1.  No existing layout to load when the user first runs the app.

2.  The tiles are databinded to an ObservableCollection and dynamically added at runtime. 

3.  On this first pass, I need the tiles to be placed arbitrarily in rows/columns BUT have the TileLayoutOrder set to Explicit.

4.  User will move/arrange/resize the tiles once they are loaded arbitrarily to specific positions with the behavior like the Explicit Tile Layout sample.

5.  Layout will be auto-saved upon exiting using the Save/Load functionality built in to the tile control.

Where I am running into trouble is in step 3.  I tried creating a Style for the Tiles to use that default behavior when you set the row and column = -1 and the rowspan and columnspan = 0.  What I ended up with was one long row of tiles that could not be repositioned from that first row, eventhough my MaxColumns is set to 3? 

Ideally, maybe I would bind those values to something in a layout.xml file for each item in the tile control that is filling the tile?  Although I'm not sure it would be necessary once the user has set up their tiles as they want them.

The other piece to this is that they will also add additional tiles or more likely tiles to a blank tile control, so where they are placed initially will be important as they add items to the collection the tile control is bound to. 

The other part I'm having trouble with is step 4.  Once the tiles are there on the same row, they can't be dragged down to form a 2nd or 3rd row.  My MaxColumn=3 and MaxRow=3, so they could potentially have 3 Rows/Columns even if they are coming up all in one horizontal row. 

Is there any advice/example you could provide to guide me on how I can achieve this behavior? 

Thanks in advance,

//Amanda

  • 27093
    posted

    Hello ,

     

    I have been looking into your request and think I understood what you are trying to achieve. For future reference keep in mind that usually there should be a single issue raised for each thread in order to avoid such long and confusing explanations.

     

    If you don’t have an existing layout on startup and you want to use the UseExplicitRowColumnOnTile setting you will have to provide your Tiles with the Row and Column indexes explicitly (as mentioned in the property enum’s name). Unlike the other settings, which only arrange the tiles consecutively according to their collection index, this allows you to have unfilled rows/columns and even with only one tile in them. It is the presence of a Tile that defines the existence of a row/column (http://help.infragistics.com/Help/NetAdvantage/WPF/2010.1/CLR3.5/html/Infragistics3.Wpf.Tiles.v10.1~Infragistics.Windows.Tiles.NormalModeSettings~TileLayoutOrder.html ). The MaxRows/Columns properties are simply restrictions. If you want to place a Tile on a spot that isn’t taken you can’t do it with the mouse. The dragging actions are reserved for switching. If you want to use all the available space with drag/drop you have to further develop the functionality to recognize where the item is being dropped and associate it with the row/columns properties, thus making the newly taken places available.

     

    I can also suggest reading through the online documentation for this specific control to better understand  it: http://help.infragistics.com/NetAdvantage/WPF/2010.1/CLR3.5/?page=xamTilesControl.html

     

    Please let me know if you require any further assistance on the matter.

     

    Sincerely,

    Petar Monov

    Developer Support Engineer

    Infragistics Bulgaria

    www.infragistics.com/support