private void criticalProviderAlert_TileStateChanged(object sender, Telerik.Windows.RadRoutedEventArgs e){ RadTileViewItem maximizedItem = criticalProviderAlert.ItemContainerGenerator.ContainerFromItem(criticalProviderAlert.MaximizedItem) as RadTileViewItem; if (maximizedItem != null ) { maximizedItem.MaxHeight = 352; maximizedItem.MaxWidth = 330; return; }}
So now I can change the size when the tile state is changed (pic 2). However, when I go back to the restored state - pic 3 is what happens. I wanted it to look as it did when I first started the app.
2. The next problem is layout. Notice that even though I have given the tiles explicit values, the control is treating the tiles as if they are using the default values based on what the panel computed. This is apparent in pic 3. Ideally, I would like it to look like pic 4. Is there a way to override/change the layout behavior so that it respects my explicit values rather than the default ones?
Thanks - this is a cool control.
UPDATE:
I have a working solution for 1 where I can resize the tiles as I see fit. I am doing this in code behind (we are using mvvm) since this is just a view related issue. The code is as follows but if anyone has any other ideas, please feel free to share:
private void providerAlert_TileStateChanged(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
var s = e.Source;
RadTileViewItem maximizedItem =
providerAlert.ItemContainerGenerator.ContainerFromItem(providerAlert.MaximizedItem) as RadTileViewItem;
if (maximizedItem != null )
{
maximizedItem.MaxHeight = 352;
maximizedItem.MaxWidth = 330;
}
else
{
var tileItems = providerAlert.Items;
foreach (var tile in tileItems)
{
var actualTile = providerAlert.ItemContainerGenerator.ContainerFromItem(tile) as RadTileViewItem;
if(actualTile != null)
{
actualTile.MaxHeight = 50;
}
}
}
}
<
radDock:RadDocking>
<radDock:RadDocking.DocumentHost>
<radDock:RadSplitContainer>
<radDock:RadPaneGroup ItemContainerStyle="{StaticResource RadPanelStyle}" prismrgn:RegionManager.RegionName="MaintenanceTabRegion" />
</radDock:RadSplitContainer>
</radDock:RadDocking.DocumentHost>
<radDock:RadSplitContainer InitialPosition="DockedBottom" Height="350">
<radDock:RadPaneGroup ItemContainerStyle="{StaticResource RadPanelStyle}" prismrgn:RegionManager.RegionName="ProperyRegion" />
</radDock:RadSplitContainer>
</radDock:RadDocking>
When I am writting the above xaml in Shell window as parent region it is working i mean regions are creating but If my shellwindow is a contentControl as parent region and my view contains the above code. and loading in the contentcontrol region, "MaintenanceTabRegion" region is not created because of RadTabItem intialization gives error where as "ProperyRegion" region is created.( I debugged the prism code), If I Use RadTabControl as my region "MaintenanceTabRegion" it is creating..
any body can help to fix this issue.. It is urgent requirment...
Thanks
Bichitra
<ResourceDictionary xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"> <!-- Resource dictionary entries should be defined here. --> <Style TargetType="{x:Type telerik:GridViewCheckBox}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type telerik:GridViewCheckBox}"> <Grid HorizontalAlignment="Left" VerticalAlignment="Center" Width="13" Height="13"> <Grid Margin="0"> <Path x:Name="IndeterminatePath" Stretch="Fill" Stroke="#FF8D8D8D" StrokeThickness="1.5" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center" Width="7" Height="7" Visibility="Collapsed" Data="M14.708333,144.5L20.667,144.5"/> <Path x:Name="CheckedPath" Stretch="Fill" Stroke="#FF8D8D8D" StrokeThickness="1.5" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center" Visibility="Collapsed" Data="M32.376187,77.162509L35.056467,80.095277 40.075451,70.02144"/> </Grid> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsChecked" Value="True"> <Setter Property="Visibility" TargetName="CheckedPath" Value="Visible"/> </Trigger> <Trigger Property="IsThreeState" Value="True"> <Setter Property="Visibility" TargetName="IndeterminatePath" Value="Visible"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> </ResourceDictionary>