Setting MinimizedColumnWidth at Runtime

9 posts, 0 answers
  1. Gregory
    Gregory avatar
    10 posts
    Member since:
    Aug 2010

    Posted 25 Aug 2010 Link to this post

    I have a project where I have a main TileItem within a RadTileView. The main item can never be closed, but "child" TileItems can be closed (I've implemented a close button on the template for the "child" tile items). At startup, I'm setting the MinimizedColumnWidth on the RadTileView to 0 so that the main tile item takes up the entire screen width. Then, when a "child" tile item is created and loaded, I change the MinimizedColumnWidth to 200 and change out the content. Finally, when all of the "child" tile items have been closed, I maximize the main tile item again and set the MinimizedColumnWidth on the RadTileView back to 0, to try and make the main window take up the full screen width again.

    Everything works up until the last step. Setting the MinimizedColumnWidth  back to 0 has no effect, and the column layout appears to remain at 200 for the minimized column. If it matters, I have my RadTileView enclosed in a Grid. Here is a sample of the Xaml markup:
    <Grid x:Name="LayoutRoot" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
           
            <ScrollViewer
                HorizontalScrollBarVisibility="Auto"
                VerticalScrollBarVisibility="Auto"
                VerticalContentAlignment="Center"
                Padding="0"
                Margin="0,0,0,0"
                x:Name="sv"
                BorderThickness="0">
                <Border CornerRadius="6" x:Name="mainBorder">
                    <telerikNavigation:RadTileView
                        x:Name="RadTileView1" 
                        MinimizedColumnWidth="0"
                        MinimizedRowHeight="200"
                        MinimizedItemsPosition="Right"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Stretch"
                        MaximizeMode="One"
                        Width="Auto"
                        Height="Auto"
                        ScrollBarVisibility="Auto">
                        <telerikNavigation:RadTileViewItem
                            x:Name="mainDiagramTile"               
                            TileStateChanged="mainDiagramTile_TileStateChanged"
                            MinimizedHeight="200">
                            <telerikNavigation:RadTileViewItem.Header>
                                <TextBlock x:Name="tbMain" Text="Loading..." Style="{StaticResource HeaderTitle}" />
                            </telerikNavigation:RadTileViewItem.Header>
                            <telerikNavigation:RadTileViewItem.Content>
                                        <ScrollViewer  HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                                            <Controls:SilverlightDiagram x:Name="d"/>
                                        </ScrollViewer>                               
                            </telerikNavigation:RadTileViewItem.Content>
                        </telerikNavigation:RadTileViewItem>
                    </telerikNavigation:RadTileView>
                </Border>
            </ScrollViewer>
    </Grid>


    Is there a way to make the main tile item take up the entire screen width again when all of the "child" tiles are closed?

    Thanks,

    Greg
  2. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1511 posts

    Posted 26 Aug 2010 Link to this post

    Hello Gregory,

    We are not aware of such issue with RadTileView. Please find attached my test project. Have a look at it and let me know if I am missing something. I'd be glad to further assist you.

    Kind regards,
    Kiril Stanoev
    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
  3. DevCraft banner
  4. Gregory
    Gregory avatar
    10 posts
    Member since:
    Aug 2010

    Posted 26 Aug 2010 Link to this post

    Kiril,

    Thanks for the reply. My code is almost identical to yours, with the exception that I am using your Silverlight 3 controls rather than Silverlight 4. Would that make any difference?

    Regards,

    Greg
  5. Gregory
    Gregory avatar
    10 posts
    Member since:
    Aug 2010

    Posted 26 Aug 2010 Link to this post

    UPDATE

    I just noticed that when the last "child" item is closed and the parent item is restored, if I click on the header of the parent item, then it expands to the full width of the screen.
  6. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1511 posts

    Posted 31 Aug 2010 Link to this post

    Hi Gregory,

    You are correct. The fact that I am using SL4 and you SL3 is what is causing the different behavior. We will research the topic and see if the same scenario can be supported in Silverlight 3, since we made some improvements to RadTileView which are SL4 specific. If this scenario is possible we will do our best to include it in our next week's internal build. However, I'd strongly suggest you try migrate to Silverlight 4. More information on how to migrate SL3 to SL4 you can find here.

    Kind regards,
    Kiril Stanoev
    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
  7. Gregory
    Gregory avatar
    10 posts
    Member since:
    Aug 2010

    Posted 31 Aug 2010 Link to this post

    Thanks, Kiril. We'd really like to see this fix in the internal build, as it will be several months before we can move to Silverlight 4 due to internal standards and research requirements.
  8. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1511 posts

    Posted 06 Sep 2010 Link to this post

    Hello Gregory,

    While researching, I think there is a quicker workaround. Try calling RadTileView's UpdateItemsSizeAndPosition() after any operation that involves rearrangement of tiles. Take a look at the attached project and let me know if it works.

    All the best,
    Kiril Stanoev
    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
  9. Totti
    Totti avatar
    10 posts
    Member since:
    Sep 2010

    Posted 04 Oct 2011 Link to this post

    Hi,
    For your sample in attached file, I want to customize to have a VerticalScroll when I have many rad Title items, How to do that?
    I'm using Rad Control ver 2010.3.1314.1040, So it's difficult to create the scroll for rad Title control.
    Thanks.
  10. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 07 Oct 2011 Link to this post

    Hello Totti,

    In the RadControls ver.2010.3.1314.1040, this scenario is not supported. However, with the latest release you can implement it out-of the box following this tutorial.

    Greetings,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
DevCraft banner