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
595
Please Delete: ScrollViewer and XamTilesControl strange behavior
posted

EDIT****

Sorry I didn't see a way to delete this post. After talking with a colleague I think the problem is that I'm trying to force functionality on a XamTileControl that is not necessary. In other words my thinking was all wrong.

 

 

 

Has anyone had a problem wrapping a XamTilesControl with a scrollviewer and having your tiles shrink? If you drag the lower right corner of a tile to resize it and drag it a little bit then the tile/tiles will fill the XamTilesControl. If the scrollviewer is commented out then the tiles will fill the XamTilesControl without any user manipulation.

 

<UserControl x:Class="tmTilesContainer"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:SES_Tire_Analyzer"
             xmlns:igDP="http://infragistics.com/Tiles"
             mc:Ignorable="d"             
             d:DesignHeight="300" d:DesignWidth="300">
   
    <UserControl.Resources>
        <local:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
        <Style TargetType="{x:Type igDP:Tile}">
            <Setter Property="Row" Value="{Binding rowPosition}"/>
            <Setter Property="Column" Value="{Binding columnPosition}"/>
            <Setter Property="CloseButtonVisibility" Value="Visible"/>
            <Setter Property="CloseAction" Value="RemoveItem"/>
           
            <Setter Property="Visibility" Value="{Binding IsVisible, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        </Style>
       
    </UserControl.Resources>


    <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
        <Grid Name="LayoutRoot">
            <igDP:XamTilesControl Name="xamTilesControl1" HeaderPath="Tag" ItemsSource="{Binding Charts}">
 
                <igDP:XamTilesControl.NormalModeSettings>
                    <igDP:NormalModeSettings TileLayoutOrder="UseExplicitRowColumnOnTile"
                                         AllowTileDragging="Swap"
                                         ShowAllTiles="False"
                                         ShouldAnimate="False"                                      
                                         HorizontalTileAreaAlignment="Stretch"
                                         VerticalTileAreaAlignment="Stretch"/>
                </igDP:XamTilesControl.NormalModeSettings>

                <igDP:XamTilesControl.ItemTemplate>
                    <DataTemplate>
                        <local:myUserControl/>
                    </DataTemplate>
                </igDP:XamTilesControl.ItemTemplate>


            </igDP:XamTilesControl>
        </Grid>
    </ScrollViewer>
</UserControl>

 

 

 

<UserControl x:Class="myUserControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
   
    <Border BorderBrush="Black" BorderThickness="10">
    <Grid Background="Yellow">
           
    </Grid>
    </Border>
</UserControl>

  • 17559
    posted

    Hello SESRuss,

    Thank you for your feedback. If you have any other questions in the future or if you still have any concerns on this matter, please feel free to contact us.