Window Custon Theme

4 posts, 0 answers
  1. Mikhailo Shuturma
    Mikhailo Shuturma avatar
    8 posts
    Member since:
    Nov 2009

    Posted 11 May 2010 Link to this post

    I created library with my custom theme for RadWindow, but after applying (using StyleManager) and click on header Close button application chashes.

    I use this code for close button:

    <telerik:RadButton x:Name="PART_CloseButton" Command="telerik:WindowCommands.Close" Style="{StaticResource WindowButtonStyle}">
                                            <Path Fill="{StaticResource WindowButtonIconFill}" Stroke="{StaticResource WindowButtonIconStroke}" Width="14" Height="14" Data="M1.5,3.5 L2.5,2.5 4.5,2.5 6.5,4.5 8.5,2.5 10.5,2.5 11.5,3.5 8.5,6.5 8.5,7.5 11.5,10.5 10.5,11.5 8.5,11.5 6.5,9.5 4.5,11.5 2.5,11.5 1.5,10.5 4.5,7.5 4.5,6.5 z" />
                                        </telerik:RadButton>

    Also is use alternate of Command="telerik:WindowCommands.Close":
     
    <Button.Command>
        <RoutedUICommand
        Text="Close" />
     </Button.Command>
    than button not work.

    Help me to resolve this problem.

    Thanks
  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 13 May 2010 Link to this post

    Hi Mikhailo,

     The button doesn't work when you use Command="telerik:WindowCommands.Close"  or <Button.Command>
        <RoutedUICommand
        Text="Close" />
     </Button.Command>.
    If the second one is the case - it cannot work, because we are not listening for such a command. We are listening for the telerik:WindowCommands.Close command.

    If both don't, please provide us with a sample project that reproduces the issue. This will help us investigate what the problem is.

    Kind regards,
    Miroslav Nedyalkov
    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. UI for WPF is Visual Studio 2017 Ready
  4. Mikhailo Shuturma
    Mikhailo Shuturma avatar
    8 posts
    Member since:
    Nov 2009

    Posted 14 May 2010 Link to this post

    When I use "telerik:WindowCommands.Close" after click on close button ("X") my application crashes. My sample projects theme file is attached. Also one note: I use trial version (2010.1.309.35) of Rad controls.
    Please let me known if there is way to resolve this trouble.

    <ResourceDictionary 
                        xmlns:customTheme="clr-namespace:BlackTheme_WPF" 
                        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
                        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
                        xmlns:s="clr-namespace:System;assembly=mscorlib" 
                        xmlns:twcc="clr-namespace:Telerik.Windows.Controls.Chromes;assembly=Telerik.Windows.Controls" 
                        xmlns:twca="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
     
        <Thickness x:Key="WindowButtonMargin">1,1,0,1</Thickness> 
     
        <SolidColorBrush x:Key="RadWindowHeaderColor">White</SolidColorBrush> 
        <SolidColorBrush x:Key="BorderLineOuterColor">#26000000</SolidColorBrush> 
        <Thickness x:Key="WindowButtonPadding">4,4,4,4</Thickness> 
        <CornerRadius x:Key="SplitButton_SpanCornerRadius">1,1,1,1</CornerRadius> 
        <SolidColorBrush x:Key="WindowBorderBackground" Color="#FF4B4B4B"/> 
        <SolidColorBrush x:Key="WindowOuterBorder">#FF848484</SolidColorBrush> 
        <LinearGradientBrush 
          StartPoint="0.5,0" 
          EndPoint="0.5,1" 
          x:Key="WindowModalBackground"
            <LinearGradientBrush.GradientStops> 
                <GradientStop 
                Color="#E5000000" /> 
                <GradientStop 
                Color="#4C000000" 
                Offset="0.5" /> 
                <GradientStop 
                Color="#E5000000" 
                Offset="1" /> 
            </LinearGradientBrush.GradientStops> 
        </LinearGradientBrush> 
        <LinearGradientBrush 
          StartPoint="0.5,0" 
          EndPoint="0.5,1" 
          x:Key="WindowButtonIconFill"
            <LinearGradientBrush.GradientStops> 
                <GradientStop 
                Color="#FF282828" /> 
                <GradientStop 
                Color="#FF7C7C7C" 
                Offset="1" /> 
            </LinearGradientBrush.GradientStops> 
        </LinearGradientBrush> 
        <SolidColorBrush x:Key="WindowInnerBorder" Color="#FF898989"/> 
        <SolidColorBrush x:Key="WindowButtonIconStroke">#FFFFFFFF</SolidColorBrush> 
        <SolidColorBrush x:Key="WindowBackground">#FFFFFFFF</SolidColorBrush> 
        <LinearGradientBrush 
          StartPoint="0,0" 
          EndPoint="0,1" 
          x:Key="WindowHeaderBackground"
            <LinearGradientBrush.GradientStops> 
                <GradientStop 
                Color="#FF5C5C5C" 
                Offset="0" /> 
                <GradientStop 
                Color="#FF454545" 
                Offset="0.5" /> 
                <GradientStop 
                Color="#FF212121" 
                Offset="0.512" /> 
                <GradientStop 
                Color="#FF7A7A7A" 
                Offset="1" /> 
            </LinearGradientBrush.GradientStops> 
        </LinearGradientBrush> 
        <customTheme:BlackTheme x:Key="Theme"/> 
        <SolidColorBrush x:Key="BorderLineInnerColor" Color="#FF727272"/> 
     
        <Style 
          TargetType="Thumb" 
          x:Key="WindowResizeThumbStyle"
            <Setter Property="FrameworkElement.MinWidth" Value="5"/> 
            <Setter Property="FrameworkElement.MinHeight" Value="5"/> 
            <Setter 
             Property="Control.Template"
                <Setter.Value> 
                    <ControlTemplate 
                   TargetType="Thumb"
                        <Rectangle 
                      Fill="#00FFFFFF" /> 
                    </ControlTemplate> 
                </Setter.Value> 
            </Setter> 
        </Style> 
        <Style TargetType="telerik:RadButton" x:Key="WindowButtonStyle"
            <Setter Property="Control.Padding" Value="{StaticResource WindowButtonPadding}"/> 
            <Setter Property="FrameworkElement.Margin" Value="{StaticResource WindowButtonMargin}"/> 
            <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/> 
            <Setter Property="Control.Template"
                <Setter.Value> 
                    <ControlTemplate TargetType="telerik:RadButton"
                        <Grid> 
                            <twcc:ButtonChrome 
                         CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" 
                         RenderNormal="False" 
                         RenderMouseOver="{TemplateBinding UIElement.IsMouseOver}" 
                         RenderPressed="{TemplateBinding ButtonBase.IsPressed}" 
                         telerik:StyleManager.Theme="{StaticResource Theme}" /> 
                         <ContentPresenter Margin="{TemplateBinding Padding}" /> 
                         <ContentPresenter 
                         Content="{TemplateBinding ContentControl.Content}" 
                         ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" 
                         ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" 
                         Margin="{TemplateBinding Control.Padding}" /> 
                        </Grid> 
                    </ControlTemplate> 
                </Setter.Value> 
            </Setter> 
        </Style> 
        <ControlTemplate 
          TargetType="telerik:RadWindow" 
          x:Key="RadWindowTemplate"
            <Grid 
             x:Name="LayoutRoot"
                <Border 
                BorderThickness="1,1,1,1" 
                CornerRadius="10,10,10,10" 
                BorderBrush="#11000000" 
                Margin="-3,-3,-5,-5"
                    <Border 
                   BorderThickness="1,1,1,1" 
                   CornerRadius="9,9,9,9" 
                   BorderBrush="#22000000"
                        <Border 
                      BorderThickness="1,1,1,1" 
                      CornerRadius="8,8,8,8" 
                      BorderBrush="#33000000"
                            <Border 
                         BorderThickness="1,1,1,1" 
                         CornerRadius="7,7,7,7" 
                         BorderBrush="#44000000"
                                <Border 
                            BorderThickness="1,1,1,1" 
                            CornerRadius="6,6,6,6" 
                            BorderBrush="#55000000"
                                    <Border 
                               BorderThickness="1,1,1,1" 
                               CornerRadius="5,5,5,5" 
                               BorderBrush="#66000000"
                                        <Border 
                                  BorderThickness="1,1,1,1" 
                                  CornerRadius="4,4,4,4" 
                                  BorderBrush="#77000000" /> 
                                    </Border> 
                                </Border> 
                            </Border> 
                        </Border> 
                    </Border> 
                </Border> 
                <Border 
                BorderThickness="1,1,1,1" 
                CornerRadius="5,5,5,5" 
                BorderBrush="{TemplateBinding Border.BorderBrush}" 
                Background="{TemplateBinding telerik:RadWindow.BorderBackground}" 
                x:Name="WindowOuterBorder" 
                Grid.RowSpan="2"
                    <Border 
                   BorderThickness="1,1,1,1" 
                   CornerRadius="4,4,4,4" 
                   BorderBrush="{StaticResource WindowInnerBorder}" 
                   x:Name="WindowInnerBorder"
                        <Grid> 
                            <Grid.RowDefinitions> 
                                <RowDefinition 
                            Height="Auto" /> 
                                <RowDefinition 
                            Height="*" /> 
                            </Grid.RowDefinitions> 
                            <Grid 
                         x:Name="Header" 
                         Background="{StaticResource WindowHeaderBackground}"
                                <Grid.ColumnDefinitions> 
                                    <ColumnDefinition 
                               Width="*" /> 
                                    <ColumnDefinition 
                               Width="Auto" /> 
                                </Grid.ColumnDefinitions> 
     
                                <StackPanel 
                            Orientation="Horizontal" 
                            Margin="2,0,0,0" 
                            Grid.Column="0"
                                    <ContentPresenter 
                               Content="{TemplateBinding telerik:RadWindow.Icon}" 
                               ContentTemplate="{TemplateBinding telerik:RadWindow.IconTemplate}" 
                               x:Name="IconContent" 
                               Margin="2,2,2,2" 
                               HorizontalAlignment="Left" 
                               VerticalAlignment="Center" /> 
                                    <ContentPresenter 
                               Content="{TemplateBinding HeaderedContentControl.Header}" 
                               ContentTemplate="{TemplateBinding HeaderedContentControl.HeaderTemplate}" 
                               x:Name="HeaderContent" 
                               HorizontalAlignment="Left" 
                               VerticalAlignment="Center" /> 
                                </StackPanel> 
                                <Thumb  x:Name="titleThumb" Grid.ColumnSpan="2" Style="{StaticResource WindowResizeThumbStyle}"/> 
     
                                <Border 
                            x:Name="PART_HeaderButtonsBorder" 
                            Grid.Column="1"
                                    <StackPanel 
                               Orientation="Horizontal" 
                               x:Name="HeaderButtons" 
                               Margin="0,0,3,0" 
                               Grid.Column="1"
                                        <telerik:RadButton 
                                             x:Name="PART_MinimizeButton" Command="telerik:WindowCommands.Minimize" Style="{StaticResource WindowButtonStyle}"
                                            <Path 
                                     Data="M1.5,7.5L12.5,7.5 12.5,11.5 1.5,11.5z" 
                                     Stroke="{StaticResource WindowButtonIconStroke}" 
                                     Width="14" 
                                     Height="14" 
                                     Fill="{StaticResource WindowButtonIconFill}"
                                            </Path> 
                                        </telerik:RadButton> 
                                        <telerik:RadButton 
                                  x:Name="PART_RestoreButton" 
                                            Command="telerik:WindowCommands.Restore" Style="{StaticResource WindowButtonStyle}"
                                            <Path 
                                     Data="M0.5,4.5L0.5,11.5 1.5,12.5 8.5,12.5 9.5,11.5 9.5,3.5 1.5,3.5z M3.5,6.5L3.5,9.5 6.5,9.5 6.5,6.5z M3.5,3.5L3.5,1.5 4.5,0.5 11.5,0.5 12.5,1.5 12.5,9.5 11.5,10.5 9.5,10.5 9.5,3.5z" 
                                     Stroke="{StaticResource WindowButtonIconStroke}" 
                                     Width="14" 
                                     Height="14" 
                                     Fill="{StaticResource WindowButtonIconFill}"
                                            </Path> 
                                        </telerik:RadButton> 
                                        <telerik:RadButton x:Name="PART_MaximizeButton"  Command="telerik:WindowCommands.Maximize" Style="{StaticResource WindowButtonStyle}"
     
                                            <Path 
                                     Data="M1.5,2.5L12.5,2.5 12.5,11.5 1.5,11.5z M4.5,5.5L9.5,5.5 9.5,8.5 4.5,8.5z" 
                                     Stroke="{StaticResource WindowButtonIconStroke}" 
                                     Width="14" 
                                     Height="14" 
                                     Fill="{StaticResource WindowButtonIconFill}"
     
                                            </Path> 
                                        </telerik:RadButton> 
                                        <telerik:RadButton x:Name="PART_CloseButton" Command="telerik:WindowCommands.Close" Style="{StaticResource WindowButtonStyle}"
                                            <Path 
                                     Data="M1.5,3.5L2.5,2.5 4.5,2.5 6.5,4.5 8.5,2.5 10.5,2.5 11.5,3.5 8.5,6.5 8.5,7.5 11.5,10.5 10.5,11.5 8.5,11.5 6.5,9.5 4.5,11.5 2.5,11.5 1.5,10.5 4.5,7.5 4.5,6.5z" 
                                     Stroke="{StaticResource WindowButtonIconStroke}" 
                                     Width="14" 
                                     Height="14" 
                                     Fill="{StaticResource WindowButtonIconFill}"
                                          </Path> 
                                        </telerik:RadButton> 
                                    </StackPanel> 
                                </Border> 
                            </Grid> 
                            <Border 
                         BorderThickness="1,1,1,1" 
                         BorderBrush="{StaticResource BorderLineInnerColor}" 
                         x:Name="ContentOuterBorder" 
                         Margin="{TemplateBinding Border.BorderThickness}" 
                         Grid.Row="1"
                                <Border 
                            BorderThickness="1,1,1,1" 
                            BorderBrush="{TemplateBinding Border.BorderBrush}" 
                            Background="{TemplateBinding Panel.Background}" 
                            x:Name="ContentInnerBorder"
                                    <ContentPresenter 
                               Content="{TemplateBinding ContentControl.Content}" 
                               ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" 
                               x:Name="ContentElement" 
                               Margin="{TemplateBinding Control.Padding}" /> 
                                </Border> 
                            </Border> 
                        </Grid> 
                    </Border> 
                </Border> 
                <Thumb x:Name="W" Style="{StaticResource WindowResizeThumbStyle}" Cursor="SizeWE" HorizontalAlignment="Left" /> 
                <Thumb x:Name="N" Style="{StaticResource WindowResizeThumbStyle}" Cursor="SizeNS" VerticalAlignment="Top" /> 
                <Thumb x:Name="E" Style="{StaticResource WindowResizeThumbStyle}" Cursor="SizeWE" HorizontalAlignment="Right" /> 
                <Thumb x:Name="S" Style="{StaticResource WindowResizeThumbStyle}" Cursor="SizeNS" VerticalAlignment="Bottom" /> 
                <Thumb x:Name="NW" Style="{StaticResource WindowResizeThumbStyle}" Cursor="SizeNWSE" VerticalAlignment="Top" HorizontalAlignment="Left" /> 
                <Thumb x:Name="NE" Style="{StaticResource WindowResizeThumbStyle}" Cursor="SizeNESW" VerticalAlignment="Top" HorizontalAlignment="Right" /> 
                <Thumb x:Name="SE" Style="{StaticResource WindowResizeThumbStyle}" Cursor="SizeNWSE" VerticalAlignment="Bottom" HorizontalAlignment="Right" /> 
                <Thumb x:Name="SW" Style="{StaticResource WindowResizeThumbStyle}" Cursor="SizeNESW" VerticalAlignment="Bottom" HorizontalAlignment="Left" /> 
            </Grid> 
            <ControlTemplate.Triggers> 
                <Trigger 
                Property="telerik:RadWindow.WindowState"
                    <Setter 
                   Property="Border.CornerRadius" 
                   TargetName="WindowOuterBorder"
                        <Setter.Value> 
                            <CornerRadius>0,0,0,0</CornerRadius> 
                        </Setter.Value> 
                    </Setter> 
                    <Setter 
                   Property="Border.CornerRadius" 
                   TargetName="WindowInnerBorder"
                        <Setter.Value> 
                            <CornerRadius>0,0,0,0</CornerRadius> 
                        </Setter.Value> 
                    </Setter> 
                    <Setter 
                   Property="Border.BorderThickness" 
                   TargetName="WindowOuterBorder"
                        <Setter.Value> 
                            <Thickness>0,0,0,0</Thickness> 
                        </Setter.Value> 
                    </Setter> 
                    <Setter 
                   Property="Border.BorderThickness" 
                   TargetName="WindowInnerBorder"
                        <Setter.Value> 
                            <Thickness>0,0,0,0</Thickness> 
                        </Setter.Value> 
                    </Setter> 
                    <Setter 
                   Property="Border.BorderThickness" 
                   TargetName="ContentInnerBorder"
                        <Setter.Value> 
                            <Thickness>0,1,0,0</Thickness> 
                        </Setter.Value> 
                    </Setter> 
                    <Setter 
                   Property="Border.BorderThickness" 
                   TargetName="ContentOuterBorder"
                        <Setter.Value> 
                            <Thickness>0,1,0,0</Thickness> 
                        </Setter.Value> 
                    </Setter> 
                    <Setter 
                   Property="FrameworkElement.Margin" 
                   TargetName="ContentOuterBorder"
                        <Setter.Value> 
                            <Thickness>0,0,0,0</Thickness> 
                        </Setter.Value> 
                    </Setter> 
                    <Setter 
                   Property="FrameworkElement.Margin" 
                   TargetName="HeaderButtons"
                        <Setter.Value> 
                            <Thickness>0,0,0,0</Thickness> 
                        </Setter.Value> 
                    </Setter> 
                    <Trigger.Value> 
                        <x:Static 
                      Member="WindowState.Maximized" /> 
                    </Trigger.Value> 
                </Trigger> 
                <Trigger 
                Property="telerik:RadWindow.WindowState"
                    <Setter 
                   Property="UIElement.Visibility" 
                   TargetName="ContentOuterBorder"
                        <Setter.Value> 
                            <x:Static 
                         Member="Visibility.Collapsed" /> 
                        </Setter.Value> 
                    </Setter> 
                    <Setter 
                   Property="FrameworkElement.Margin" 
                   TargetName="HeaderButtons"
                        <Setter.Value> 
                            <Thickness>0,0,0,0</Thickness> 
                        </Setter.Value> 
                    </Setter> 
                    <Trigger.Value> 
                        <x:Static 
                      Member="WindowState.Minimized" /> 
                    </Trigger.Value> 
                </Trigger> 
            </ControlTemplate.Triggers> 
        </ControlTemplate> 
        <Style 
          TargetType="telerik:RadPrompt" 
          x:Key="{telerik:ThemeResourceKey ThemeType=customTheme:BlackTheme, ElementType=telerik:RadPrompt}"
            <Style.Resources> 
                <ResourceDictionary /> 
            </Style.Resources> 
            <Setter 
             Property="KeyboardNavigation.IsTabStop"
                <Setter.Value> 
                    <s:Boolean>False</s:Boolean> 
                </Setter.Value> 
            </Setter> 
            <Setter 
             Property="FrameworkElement.Width"
                <Setter.Value> 
                    <s:Double>350</s:Double> 
                </Setter.Value> 
            </Setter> 
            <Setter 
             Property="UIElement.SnapsToDevicePixels"
                <Setter.Value> 
                    <s:Boolean>True</s:Boolean> 
                </Setter.Value> 
            </Setter> 
            <Setter 
             Property="Control.Template"
                <Setter.Value> 
                    <ControlTemplate 
                   TargetType="telerik:RadPrompt"
                        <Grid 
                      x:Name="LayoutRoot"
                            <Grid.ColumnDefinitions> 
                                <ColumnDefinition 
                            Width="Auto" /> 
                                <ColumnDefinition 
                            Width="*" /> 
                            </Grid.ColumnDefinitions> 
                            <Grid.RowDefinitions> 
                                <RowDefinition 
                            Height="*" /> 
                                <RowDefinition 
                            Height="Auto" /> 
                            </Grid.RowDefinitions> 
                            <Image 
                         Source="pack://application:,,,/Telerik.Windows.Controls.Navigation;component/themes/WindowConfirmIcon.png" 
                         x:Name="Icon" 
                         Width="48" 
                         Height="48" 
                         Margin="16,8,8,8" 
                         VerticalAlignment="Top" /> 
                            <StackPanel 
                         x:Name="PromptContent" 
                         Grid.Column="1" 
                         Grid.Row="0"
                                <ScrollViewer 
                            HorizontalScrollBarVisibility="Auto" 
                            VerticalScrollBarVisibility="Auto" 
                            Margin="0,0,0,8" 
                            Grid.Column="1" 
                            Grid.Row="0" 
                            telerik:StyleManager.Theme="{StaticResource Theme}"
                                    <ContentPresenter 
                               Content="{TemplateBinding ContentControl.Content}" 
                               ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" 
                               ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" 
                               x:Name="PromptText" 
                               Margin="8,8,8,0" /> 
                                </ScrollViewer> 
                                <TextBox 
                            x:Name="PromptTextBox" 
                            Margin="8,8,8,8" 
                            telerik:StyleManager.Theme="{StaticResource Theme}" 
                            xml:space="preserve"></TextBox> 
                            </StackPanel> 
                            <Border 
                         BorderThickness="0,0,0,1" 
                         BorderBrush="{StaticResource BorderLineInnerColor}" 
                         Background="{StaticResource BorderLineOuterColor}" 
                         x:Name="HorizontalRule" 
                         Height="2" 
                         VerticalAlignment="Top" 
                         Grid.Row="1" 
                         Grid.ColumnSpan="2" /> 
                            <StackPanel 
                         Orientation="Horizontal" 
                         x:Name="DialogButtons" 
                         HorizontalAlignment="Right" 
                         Grid.Row="2" 
                         Grid.ColumnSpan="2"
                                <telerik:RadButton 
                            x:Name="OK" 
                            MinWidth="70" 
                            Margin="0,10,8,8" 
                            telerik:StyleManager.Theme="{StaticResource Theme}">OK</telerik:RadButton> 
                                <telerik:RadButton 
                            x:Name="Cancel" 
                            MinWidth="70" 
                            Margin="0,10,8,8" 
                            telerik:StyleManager.Theme="{StaticResource Theme}">Cancel</telerik:RadButton> 
                            </StackPanel> 
                        </Grid> 
                    </ControlTemplate> 
                </Setter.Value> 
            </Setter> 
        </Style> 
        <Style 
          TargetType="telerik:RadAlert" 
          x:Key="{telerik:ThemeResourceKey ThemeType=customTheme:BlackTheme, ElementType=telerik:RadAlert}"
            <Style.Resources> 
                <ResourceDictionary /> 
            </Style.Resources> 
            <Setter 
             Property="KeyboardNavigation.IsTabStop"
                <Setter.Value> 
                    <s:Boolean>False</s:Boolean> 
                </Setter.Value> 
            </Setter> 
            <Setter 
             Property="FrameworkElement.MinWidth"
                <Setter.Value> 
                    <s:Double>275</s:Double> 
                </Setter.Value> 
            </Setter> 
            <Setter 
             Property="FrameworkElement.MaxWidth"
                <Setter.Value> 
                    <s:Double>500</s:Double> 
                </Setter.Value> 
            </Setter> 
            <Setter 
             Property="UIElement.SnapsToDevicePixels"
                <Setter.Value> 
                    <s:Boolean>True</s:Boolean> 
                </Setter.Value> 
            </Setter> 
            <Setter 
             Property="Control.Template"
                <Setter.Value> 
                    <ControlTemplate 
                   TargetType="telerik:RadAlert"
                        <Grid 
                      x:Name="LayoutRoot"
                            <Grid.ColumnDefinitions> 
                                <ColumnDefinition 
                            Width="Auto" /> 
                                <ColumnDefinition 
                            Width="*" /> 
                            </Grid.ColumnDefinitions> 
                            <Grid.RowDefinitions> 
                                <RowDefinition 
                            Height="*" /> 
                                <RowDefinition 
                            Height="Auto" /> 
                            </Grid.RowDefinitions> 
                            <Image 
                         Source="pack://application:,,,/Telerik.Windows.Controls.Navigation;component/themes/WindowAlertIcon.png" 
                         x:Name="Icon" 
                         Width="48" 
                         Height="48" 
                         Margin="16,8,8,8" 
                         VerticalAlignment="Top" /> 
                            <ScrollViewer 
                         HorizontalScrollBarVisibility="Auto" 
                         VerticalScrollBarVisibility="Auto" 
                         Margin="0,0,0,8" 
                         Grid.Column="1" 
                         Grid.Row="0" 
                         telerik:StyleManager.Theme="{StaticResource Theme}"
                                <ContentPresenter 
                            Content="{TemplateBinding ContentControl.Content}" 
                            ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" 
                            ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" 
                            x:Name="AlertText" 
                            Margin="8,8,8,0" /> 
                            </ScrollViewer> 
                            <Border 
                         BorderThickness="0,0,0,1" 
                         BorderBrush="{StaticResource BorderLineInnerColor}" 
                         Background="{StaticResource BorderLineOuterColor}" 
                         x:Name="HorizontalRule" 
                         Height="2" 
                         VerticalAlignment="Top" 
                         Grid.Row="1" 
                         Grid.ColumnSpan="2" /> 
                            <telerik:RadButton 
                         x:Name="OK" 
                         MinWidth="70" 
                         Margin="0,10,8,8" 
                         HorizontalAlignment="Right" 
                         Grid.Row="2" 
                         Grid.ColumnSpan="2" 
                         telerik:StyleManager.Theme="{StaticResource Theme}">OK</telerik:RadButton> 
                        </Grid> 
                    </ControlTemplate> 
                </Setter.Value> 
            </Setter> 
        </Style> 
        <Style TargetType="telerik:RadWindow" x:Key="{telerik:ThemeResourceKey ThemeType=customTheme:BlackTheme, ElementType=telerik:RadWindow}"
            <Setter 
             Property="KeyboardNavigation.IsTabStop"
                <Setter.Value> 
                    <s:Boolean>False</s:Boolean> 
                </Setter.Value> 
            </Setter> 
            <Setter 
             Property="Panel.Background" Value="{StaticResource WindowBackground}"
            </Setter> 
            <Setter 
             Property="Border.BorderBrush" Value="{StaticResource WindowOuterBorder}"
            </Setter> 
            <Setter 
             Property="telerik:RadWindow.BorderBackground" Value="{StaticResource WindowBorderBackground}"
            </Setter> 
            <Setter 
             Property="telerik:RadWindow.ModalBackground" Value="{StaticResource WindowModalBackground}"
            </Setter> 
            <Setter 
             Property="Border.BorderThickness"
                <Setter.Value> 
                    <Thickness>2,0,2,2</Thickness> 
                </Setter.Value> 
            </Setter> 
            <Setter 
             Property="FrameworkElement.MinHeight"
                <Setter.Value> 
                    <s:Double>26</s:Double> 
                </Setter.Value> 
            </Setter> 
            <Setter 
             Property="FrameworkElement.MinWidth"
                <Setter.Value> 
                    <s:Double>100</s:Double> 
                </Setter.Value> 
            </Setter> 
            <Setter 
             Property="FrameworkElement.HorizontalAlignment"
                <Setter.Value> 
                    <x:Static 
                   Member="HorizontalAlignment.Left" /> 
                </Setter.Value> 
            </Setter> 
            <Setter 
             Property="FrameworkElement.VerticalAlignment"
                <Setter.Value> 
                    <x:Static 
                   Member="VerticalAlignment.Top" /> 
                </Setter.Value> 
            </Setter> 
            <Setter 
             Property="Control.HorizontalContentAlignment"
                <Setter.Value> 
                    <x:Static 
                   Member="HorizontalAlignment.Stretch" /> 
                </Setter.Value> 
            </Setter> 
            <Setter 
             Property="Control.VerticalContentAlignment"
                <Setter.Value> 
                    <x:Static 
                   Member="VerticalAlignment.Stretch" /> 
                </Setter.Value> 
            </Setter> 
            <Setter Property="HeaderedContentControl.Foreground" Value="{StaticResource RadWindowHeaderColor}"/> 
            <Setter 
             Property="HeaderedContentControl.Header"
                <Setter.Value> 
                    RadWindow</Setter.Value> 
            </Setter> 
            <Setter 
             Property="telerik:RadWindow.WindowStartupLocation"
                <Setter.Value> 
                    <x:Static 
                   Member="WindowStartupLocation.Manual" /> 
                </Setter.Value> 
            </Setter> 
            <Setter 
             Property="telerik:RadWindow.WindowState"
                <Setter.Value> 
                    <x:Static 
                   Member="WindowState.Normal" /> 
                </Setter.Value> 
            </Setter> 
            <Setter  Property="Control.Template" Value="{StaticResource RadWindowTemplate}"
            </Setter> 
            <Setter 
             Property="twca:AnimationManager.AnimationSelector"
                <Setter.Value> 
                    <twca:AnimationSelector /> 
                </Setter.Value> 
            </Setter> 
        </Style> 
        <Style 
          TargetType="telerik:RadConfirm" 
          x:Key="{telerik:ThemeResourceKey ThemeType=customTheme:BlackTheme, ElementType=telerik:RadConfirm}"
            <Style.Resources> 
                <ResourceDictionary /> 
            </Style.Resources> 
            <Setter 
             Property="KeyboardNavigation.IsTabStop"
                <Setter.Value> 
                    <s:Boolean>False</s:Boolean> 
                </Setter.Value> 
            </Setter> 
            <Setter 
             Property="FrameworkElement.MinWidth"
                <Setter.Value> 
                    <s:Double>275</s:Double> 
                </Setter.Value> 
            </Setter> 
            <Setter 
             Property="FrameworkElement.MaxWidth"
                <Setter.Value> 
                    <s:Double>500</s:Double> 
                </Setter.Value> 
            </Setter> 
            <Setter 
             Property="UIElement.SnapsToDevicePixels"
                <Setter.Value> 
                    <s:Boolean>True</s:Boolean> 
                </Setter.Value> 
            </Setter> 
            <Setter 
             Property="Control.Template"
                <Setter.Value> 
                    <ControlTemplate 
                   TargetType="telerik:RadConfirm"
                        <Grid 
                      x:Name="LayoutRoot"
                            <Grid.ColumnDefinitions> 
                                <ColumnDefinition 
                            Width="Auto" /> 
                                <ColumnDefinition 
                            Width="*" /> 
                            </Grid.ColumnDefinitions> 
                            <Grid.RowDefinitions> 
                                <RowDefinition 
                            Height="*" /> 
                                <RowDefinition 
                            Height="Auto" /> 
                            </Grid.RowDefinitions> 
                            <Image 
                         Source="pack://application:,,,/Telerik.Windows.Controls.Navigation;component/themes/WindowConfirmIcon.png" 
                         x:Name="Icon" 
                         Width="48" 
                         Height="48" 
                         Margin="16,8,8,8" 
                         VerticalAlignment="Top" /> 
                            <ScrollViewer 
                         HorizontalScrollBarVisibility="Auto" 
                         VerticalScrollBarVisibility="Auto" 
                         Margin="0,0,0,8" 
                         Grid.Column="1" 
                         Grid.Row="0" 
                         telerik:StyleManager.Theme="{StaticResource Theme}"
                                <ContentPresenter 
                            Content="{TemplateBinding ContentControl.Content}" 
                            ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" 
                            ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" 
                            x:Name="ConfirmText" 
                            Margin="8,8,8,0" /> 
                            </ScrollViewer> 
                            <Border 
                         BorderThickness="0,0,0,1" 
                         BorderBrush="{StaticResource BorderLineInnerColor}" 
                         Background="{StaticResource BorderLineOuterColor}" 
                         x:Name="HorizontalRule" 
                         Height="2" 
                         VerticalAlignment="Top" 
                         Grid.Row="1" 
                         Grid.ColumnSpan="2" /> 
                            <StackPanel 
                         Orientation="Horizontal" 
                         x:Name="DialogButtons" 
                         HorizontalAlignment="Right" 
                         Grid.Row="2" 
                         Grid.ColumnSpan="2"
                                <telerik:RadButton 
                            x:Name="OK" 
                            MinWidth="70" 
                            Margin="0,10,8,8" 
                            telerik:StyleManager.Theme="{StaticResource Theme}">OK</telerik:RadButton> 
                                <telerik:RadButton 
                            x:Name="Cancel" 
                            MinWidth="70" 
                            Margin="0,10,8,8" 
                            telerik:StyleManager.Theme="{StaticResource Theme}">Cancel</telerik:RadButton> 
                            </StackPanel> 
                        </Grid> 
                    </ControlTemplate> 
                </Setter.Value> 
            </Setter> 
        </Style> 
     
    </ResourceDictionary> 
  5. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 17 May 2010 Link to this post

    Hi Mikhailo,

     Most probably the reason for the crash of the application is not the command but something else. Could you please open a support ticket and send us a sample project that reproduces the issue? This way we will be able to better assist you resolve the problem.

    Kind regards,
    Miroslav Nedyalkov
    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.
Back to Top