This is a migrated thread and some comments may be shown as answers.

TileView not laying out properly

38 Answers 360 Views
TileView
This is a migrated thread and some comments may be shown as answers.
derrick
Top achievements
Rank 2
derrick asked on 23 Nov 2009, 07:41 PM
Hi,

When I programattically add contents (RadFluidContentControls with textblocks as a test) to the RadTileView, the contents do not update correctly.  Resizing the window or clicking on an item causes it to update the layout correctly.  I need to know how to force the RadTileView to update its layout to correct this error.  (See pictures attached).  I'm using the Nov03 version, btw.

Thanks,

Derrick

    private void LoadPod(XElement Pod)
    {
      string Name = utils.GetAttributeValue(Pod, "Name");
      RadTileViewItem pod = new RadTileViewItem();
      //header
      pod.Header = Name;
      //
      RadFluidContentControl fcc = new RadFluidContentControl();
      fcc.NormalToSmallThreshold = new Size(300, 300);
      fcc.NormalToLargeThreshold = new Size(301, 301);
      fcc.LargeToNormalThreshold = new Size(302, 302);
      pod.Content = fcc;
      //
      TextBlock small = new TextBlock();
      small.Text = "small";
      fcc.SmallContent = small;
      //
      TextBlock norm = new TextBlock();
      norm.Text = "normal";
      fcc.Content = norm;
      //
      TextBlock large = new TextBlock();
      large.Text = "large";
      fcc.LargeContent = large;
      //
      this.Pods.Items.Add(pod);
    }

38 Answers, 1 is accepted

Sort by
0
Tihomir Petkov
Telerik team
answered on 24 Nov 2009, 08:11 AM
Hi Derrick,

Thank you for your feedback. This is a known issue on which we are working. The problem should be resolved for the upcoming service pack which is due in the beginning of December.

Kind regards,
Tihomir Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
derrick
Top achievements
Rank 2
answered on 25 Nov 2009, 05:17 AM
Thank you.  I've also noticed a couple other issues you might want to know about for the next release.  The FluidContentControl is sometimes oscillating between Small and Normal.  (Rapidly switching between the two contents endlessly).  Seems to only happen when the tiles are in the minimized state.  I've tried it with several different threshold sizes.  Also, I've seen them show the wrong content for their size a number of times. 
0
Tihomir Petkov
Telerik team
answered on 25 Nov 2009, 07:52 AM
Hi Derrick,

The fast switching in the FluidContentControl may be caused by your specific threshold values. Can you please provide an example that demonstrates the problem so that I can investigate? We are not aware of current bugs in the thresholds.

Greetings,
Tihomir Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
derrick
Top achievements
Rank 2
answered on 25 Nov 2009, 02:25 PM
Hi,

I've tried several different sets of threshold values, including the one in my original post, and these settings:

      RadFluidContentControl fcc = new RadFluidContentControl();
      fcc.NormalToSmallThreshold = new Size(200, 200);
      fcc.NormalToLargeThreshold = new Size(201, 201);
      fcc.LargeToNormalThreshold = new Size(302, 302);

I'm putting a RadChart in the tiles, and want it to be something else if the tile is too small to display correctly.

Thank you,

Derrrick
0
Tihomir Petkov
Telerik team
answered on 30 Nov 2009, 01:47 PM
Hi Derrick,

In the code snippet you provided I see that you're setting only three of the four threshold values which means the threshold you don't set gets an automatic value which may be causing the problem. Another problem may be the actual size of the content you want to switch with these thresholds - have you checked what is the actual size (and thus are the threshold values correct) of the content you want to swap? Sometimes when you don't hard code the size of your elements it may be tricky to determine the actual size with which they're rendered. You may need to check their size at runtime.

Alternatively, you can swap the visible content of the FluidContentControl manually as the tile states change. To do that, you need to set the ContentChangeMode of the FluidContentControl to "Manual". Also, you should attach to the TileStateChanged event of the TileView and do the following:

private void tileView_TileStateChanged(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
 RadTileViewItem item = e.Source as RadTileViewItem;
 if (item != null)
 {
  RadFluidContentControl fluidControl = item.ChildrenOfType<RadFluidContentControl>().First();
  if (fluidControl != null)
  {
   switch (item.TileState)
   {
    case TileViewItemState.Maximized:
     fluidControl.State = FluidContentControlState.Large;
     break;
    case TileViewItemState.Minimized:
     fluidControl.State = FluidContentControlState.Small;
     break;
    case TileViewItemState.Restored:
     fluidControl.State = FluidContentControlState.Normal;
     break;
   }
  }
 }
}


Let me know if any of the above suggestions helps.

Regards,
Tihomir Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
derrick
Top achievements
Rank 2
answered on 17 Dec 2009, 06:35 PM
Hi,

I didn't see the TileView mentioned in the latest build Release Notes--do you know if this problem has been fixed yet?  (RadTileView tiles not laying out correctly until clicked or resized).

Thanks,

Derrick

0
Congero
Top achievements
Rank 1
answered on 17 Dec 2009, 06:39 PM
I am having the same problem with the irregular layout and I am also anxiously awaiting the fix.  Please advise.  Thanks for you support.
0
Tihomir Petkov
Telerik team
answered on 18 Dec 2009, 07:14 PM
Hello guys,

We could not address the bug in the latest release, but we will do our best to provide a patch as soon as possible.

Sincerely yours,
Tihomir Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
derrick
Top achievements
Rank 2
answered on 23 Dec 2009, 04:46 PM
Please, Please, Please address this bug soon.  It's been a month and we are getting to close to having to deliver our solution to our customer.  If you can't fix it, at least give me a workaround so I can force it to re-layout somehow.  Thanks.
0
Congero
Top achievements
Rank 1
answered on 23 Dec 2009, 04:54 PM
I totally agree with Derrick.  We used this control in our prototype to the client as a major selling point with the assurance that a bug fix was forthcoming.  We are working against a tight deadline.  If there is no fix please give us a workaround!!
0
Valentin.Stoychev
Telerik team
answered on 24 Dec 2009, 09:19 AM
Hello Reggie Tyler,

The fix is coming in the mid-January with the SP release. If you need it even earlier - please let us know.

Best wishes,
Valentin.Stoychev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Congero
Top achievements
Rank 1
answered on 24 Dec 2009, 05:45 PM
Hi Valentin
Thanks for your response.  First I would like to say that I've a big fan of Telerik, the products they produce and the support behind the products. Thanks to you and all of the people on the Telerik team.  The short answer is yes,we need it asap.  The excitement the control generated when we previewed it to our client will rapidly disappear if we are not able to deliver it in the final product.  I'm sure you understand how this impacts our ability to manage the customer's expectations.  Thanks for any help you can provide and have a great holiday season.
 
Regards
Reggie
0
derrick
Top achievements
Rank 2
answered on 24 Dec 2009, 06:20 PM
Hi,

Yes, I would like a workaround in advance of the SP release if possible.  The tiles layout correctly after clicking one of them, maybe we could simulate a mouse click or something?  Maybe add a method to force a layout, anything.

Thanks and Merry Christmas!

Derrick

0
derrick
Top achievements
Rank 2
answered on 28 Dec 2009, 04:19 AM

I figured out a workaround for now.  Since the control works the first time, just recreate the control each time you want to load a different set of tiles:

      RadTileView OldPods = this.Pods;
      this.Pods = new RadTileView();
      ((Border)OldPods.Parent).Child = this.Pods;
      this.Pods.Name = OldPods.Name;
      this.Pods.Margin = OldPods.Margin;
      this.Pods.MinimizedColumnWidth = OldPods.MinimizedColumnWidth;
      this.Pods.MinimizedItemsPosition = OldPods.MinimizedItemsPosition;

     ...load tiles...

 

0
Valentin.Stoychev
Telerik team
answered on 28 Dec 2009, 09:28 AM
Hi derrick,

ok - we will let you know once this is fixed.

Best wishes,
Valentin.Stoychev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Dheeraj Ramaswamy
Top achievements
Rank 2
answered on 29 Dec 2009, 07:57 PM
There is one way to fix the layout issue which is to set the first tileviewitem to maximized state and the rest to minimized. This does fix the issue however the issue with the largecontent being displayed is even on minimized mode does still exist.
0
Cass
Top achievements
Rank 1
answered on 08 Jan 2010, 04:47 PM
I have the same problem-- eagerly anticipating the fix.

Or is there any code I could use to deliver an automatic Click to the header? That would seem to solve the problem too.

Thanks!
0
Cass
Top achievements
Rank 1
answered on 13 Jan 2010, 03:35 PM
Hi Telerik,

Thanks for your awesome controls. Could you please let me know when the bug is fixed for TileView (or if it is possible to do a workaround by programming in a manual header click)? My firm has a software demo on January 16th and is really counting on the fix. It would be a major turnoff to clients if the tiles loaded like it is doing now.

Cassandra
0
Valentin.Stoychev
Telerik team
answered on 13 Jan 2010, 03:42 PM
Hello Cass,

Yes - this fix is now part from the Q3.SP2 release which should be available for download by the end of the week.

Greetings,
Valentin.Stoychev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Cass
Top achievements
Rank 1
answered on 13 Jan 2010, 04:26 PM
Wonderful! Thank you so much.
0
Joe Giese
Top achievements
Rank 1
answered on 28 Jan 2010, 12:59 AM
How can I get the latest fix? When I load the Tileview using Code-Behind. Notice that 1st RadTileViewItem is maximized and it is behind the other minimized items. I then tried to force all items to be minimized but still the same problem.

            foreach (PHI item in rows)
            {
                RadTileViewItem rtvItem = new RadTileViewItem();
                rtvItem.Header = item.Description;
                rtvItem.TileState = TileViewItemState.Minimized;
                rtvItem.Content = rtvItem;
                rtvItems.Add(rtvItem);

            }
0
Tihomir Petkov
Telerik team
answered on 28 Jan 2010, 04:09 PM
Hi Martin,

I was not able to reproduce the problems you report using the latest version of the controls (2009 Q3 SP2). Can you please download the latest version from your client account and see if the problem persists?

All the best,
Tihomir Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Joe Giese
Top achievements
Rank 1
answered on 28 Jan 2010, 05:55 PM
I do have the latest version and still the same problem. 1st image is when loads first. After resizing the content by clicking the title, it sorts itself right. But now LargeContent and SmallContant  does not load correctly at all time. This control is very buggy.




0
Dheeraj Ramaswamy
Top achievements
Rank 2
answered on 28 Jan 2010, 06:32 PM
Hi Martin,

 I had the same issue but it was related to the sizing you provide for large/small content for fluid control. The best thing to do is to handle this maually by setting ContentChangeMode of fluid control to manual and handling TileStateChanged on the TileView.
0
Joe Giese
Top achievements
Rank 1
answered on 28 Jan 2010, 06:42 PM
Thanks, that did fix the Large/Small Content issue. However I still have display issue during the first load. If I slightly re-size the browser height it will fix itself. See the attachments, 1 is the initial load and 2 is after slight resizing the browser.

Thanks
0
Dheeraj Ramaswamy
Top achievements
Rank 2
answered on 28 Jan 2010, 06:54 PM
While building your TileView from code, try setting {TileControl}.MaximizeMode = TileViewMaximizeMode.ZeroOrOne and set only one of the tileviewitem to Maximized along with fluidcontrolstate to large ...set the rest of the timeviewitem to minimized.

0
Joe Giese
Top achievements
Rank 1
answered on 28 Jan 2010, 07:13 PM
Thanks, that worked. So I can't have them all small state. One has to be at large state at all time? Will this be fixed?

2nd question, still cosmetically there is an issue. Look at the 1st image and then 2nd. The tiles are bleeding on each other. As soon as I do the resizing, it will fix it.  
0
Dheeraj Ramaswamy
Top achievements
Rank 2
answered on 28 Jan 2010, 07:19 PM
From what I know off, you can have all of them to Restored State but not all can be minimized....

Regarding the second question ..You may want to make sure your project is referencing the latest dll. I dont have such issues on my project.
0
Joe Giese
Top achievements
Rank 1
answered on 28 Jan 2010, 07:33 PM
Thanks Dheera,

That did it. You been a great help. Thanks

Regards
0
Dheeraj Ramaswamy
Top achievements
Rank 2
answered on 28 Jan 2010, 07:37 PM
You are welcome. Glad could help.
0
James
Top achievements
Rank 1
answered on 29 Apr 2010, 04:42 PM
Was this fixed. I have a problem that when I remove an item using code behind that the remaining items don't quite layout correctly. All items are in a single row in 'restored' state, and when I remove one they move in a little but still leave bigger than expected gaps between them. As soon as I click the header for any item they snap into place just as I want them. Is there anyway for me to simulate that click. I have tried forcing arrange and invalidating layout.
0
Vladislav
Telerik team
answered on 05 May 2010, 08:10 AM
Hello James,

Yes, this issue is fixed in our last official release "RadControls_for_Silverlight_3_2010_1_0422".
I have prepared a sample project with the described behavior and it works as expected from our point of view.

Can you please check it and let us know if you still experience any problems?

Regards,
Vladislav
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Doug Beard
Top achievements
Rank 1
answered on 06 Nov 2010, 09:29 PM
No, I can confirm the issue still exists in the lastest version.  The fuildcontent control does not replace content with the  proper template when state changes unless you manually change the tile state in the code behind via the tilestatechanged event.

0
Zarko
Telerik team
answered on 08 Nov 2010, 04:35 PM
Hello Doug Beard,

 Could you please send us a sample project that represents your issue, so we will be able to better assist you? In fact the best way of using the RadFluidContentControl inside RadTileView is to bind the TileState of the items to the State of the RadFluidContentControl. Could you please read this article and if you have further questions feel free to ask ?

All the best,
Zarko
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Doug Beard
Top achievements
Rank 1
answered on 13 Nov 2010, 11:29 PM
The suggested workaround assumes one can create custom transports specifically for binding to the TileView, which contain a custom property for storing the so called ContentState.

Our ViewModel can not be tightly coupled to the View or the MVVM boundaries become blurred and concerns are not separated enough to be handled by separate teams.

0
Zarko
Telerik team
answered on 17 Nov 2010, 10:10 AM
Hi Doug Beard,

 My advice is to consider that adding one additional property to your ViewModel will not break the View - ViewModel separation(the property can be of any type - int, string etc.), but if you don't add it the only other solution is once the containers are generated to manually set bindings between the containers and their FluidContentControls. Please examine the attached project and if you have further questions feel free to ask.

Best wishes,
Zarko
the Telerik team
See What's New in RadControls for Silverlight in Q3 2010 on Tuesday, November 16, 2010 11:00 AM - 12:00 PM EST or 10:00 PM - 11:00 PM EST: Register here>>
0
Doug Beard
Top achievements
Rank 1
answered on 17 Nov 2010, 02:36 PM
But in your solution the View Model is actually a Business Object, not a View Model.  Adding the property to our View Model doesn't work, because the TileView is not bound to the ViewModel it is bound to a collection of business object IN the view model.

View Models usually contain all the collections, objects and logic for the entire view.  Not just one collection for a single control within the view.  The proposed solution is engineered such that ContainerBindingSolution and the FluidContentControl are looking for the ContentState binding in the Business Object with in the collection which is bound to the tileview.

Extending our Business Objects (Domain Services) is undesirable.  I'd like to see our teams tacking Views (Designers), View Models (Designer/Developer) independently.  Thus the View Model should contain no custom logic for the specific view and be transportable between WPF and Silverlight.

For the moment, I have extended the partial class from the domain service which is within the list that binds to the tile view.  Adding a Content State property.  Honestly though,  the  (control) TileView should take care of this stuff encapsulated, not requiring the designer and the developer to collaborate on for simple databinding.
0
Zarko
Telerik team
answered on 17 Nov 2010, 04:33 PM
Hi Doug Beard,

 Sorry for the misunderstanding, in my previous reply by "adding one additional property to your ViewModel" I meant adding it to your TileViewItem Business Object.
 We plan to improve the integration between the TileView and the RadFluidContentControl for Q1 2011, but I can't give you a specific date for now.

Greetings,
Zarko
the Telerik team
See What's New in RadControls for Silverlight in Q3 2010 on Tuesday, November 16, 2010 11:00 AM - 12:00 PM EST or 10:00 PM - 11:00 PM EST: Register here>>
Tags
TileView
Asked by
derrick
Top achievements
Rank 2
Answers by
Tihomir Petkov
Telerik team
derrick
Top achievements
Rank 2
Congero
Top achievements
Rank 1
Valentin.Stoychev
Telerik team
Dheeraj Ramaswamy
Top achievements
Rank 2
Cass
Top achievements
Rank 1
Joe Giese
Top achievements
Rank 1
James
Top achievements
Rank 1
Vladislav
Telerik team
Doug Beard
Top achievements
Rank 1
Zarko
Telerik team
Share this question
or