I have to admit that I didn’t use WPT SWT, so this may not work at all, but this is what you would normally do if you used standard WPF
<Window .... .... .... ResizeMode="CanResizeWithGrip" Template="{StaticResource WindowTemplateKey}"> </Window>
Where will you have a template similar to this
<ControlTemplate x:Key="WindowTemplateKey" TargetType="{x:Type Window}"> <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> <Grid> <AdornerDecorator> <ContentPresenter/> </AdornerDecorator> <ResizeGrip Visibility="Collapsed" HorizontalAlignment="Right" x:Name="WindowResizeGrip" Style="{DynamicResource ResizeGripStyle1}" VerticalAlignment="Bottom" IsTabStop="false"/> </Grid> </Border> <ControlTemplate.Triggers> <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="ResizeMode" Value="CanResizeWithGrip"/> <Condition Property="WindowState" Value="Normal"/> </MultiTrigger.Conditions> <Setter Property="Visibility" TargetName="WindowResizeGrip" Value="Visible"/> </MultiTrigger> </ControlTemplate.Triggers> </ControlTemplate>
So, I assume that you had a window (the shell in your case, specified in a separate ResourceDictionary (XAML file) called "CustomShellTemplateFile.xaml"), you could do something like
shell.setData ("ResourceDictionary", "CustomShellTemplateFile.xaml");
source share