Telerik Forums
UI for WPF Forum
2 answers
208 views

Double Underline of font family "Calibri" doesn't look match after exporting to PDF

Steps to get this issue.

A. Insert double underline (═══)  in the rich text box. ( RichTextBox.Commands.InsertTextCommand.Execute(\u2550); )

B. Change the font to "Calibri" and font size to 10. 

C.Export into pdf using PdfFormatProvider.Export

You could see the double underline in PDF looks longer that what we see in the rich text box. 

If the double underline (═══)  is set to "Times New Roman"it matches the PDF export

 Is it some thing to do with the font family ? 

 Regards

Anand

 

Deyan
Telerik team
 answered on 08 Mar 2016
9 answers
276 views
Hello, I'm trying to style de RadFilter, so I started to style the FilterControl.

I create a simple WPF 4.0 proyect (VS 2010 SP1) with a RadFilter and a FilterControl (just for get template in ExpressionBlend).
Opened the solution and extracted FilterControl Template to a new dictionary resource and set "For all Controls" (so I got the RadFilter modified).

With that, the RadFilter stoped working. Without any modification, the dropdownbutton stopped displaying.

(How could I got the sample proyect, if you need it)

Any idea here?

Thanks in advance.

Tamplate generated by Expression Blend 4:

<ResourceDictionary
    xmlns:Telerik_Windows_Controls_Data_DataFilter="clr-namespace:Telerik.Windows.Controls.Data.DataFilter;assembly=Telerik.Windows.Controls.Data"
    <!-- Resource dictionary entries should be defined here. -->
    <Style TargetType="{x:Type Telerik_Windows_Controls_Data_DataFilter:FilterControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Telerik_Windows_Controls_Data_DataFilter:FilterControl}">
                    <Border x:Name="OuterBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="11">
                        <Border.OpacityMask>
                            <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                <GradientStop Color="Black" Offset="0"/>
                                <GradientStop Offset="0.3"/>
                            </LinearGradientBrush>
                        </Border.OpacityMask>
                        <Border.Triggers>
                            <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetProperty="(UIElement.OpacityMask).(GradientBrush.GradientStops)[1].(GradientStop.Offset)" Storyboard.TargetName="OuterBorder"/>
                                        <DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetProperty="(UIElement.OpacityMask).(GradientBrush.GradientStops)[0].(GradientStop.Offset)" Storyboard.TargetName="OuterBorder"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </EventTrigger>
                        </Border.Triggers>
                        <Border x:Name="InnerBorder" BorderBrush="White" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="10">
                            <StackPanel Orientation="Horizontal">
                                <telerik:RadButton x:Name="PART_RemoveFilterButton" Command="{Binding RemoveFilter}">
                                    <telerik:RadButton.Style>
                                        <Style TargetType="{x:Type telerik:RadButton}">
                                            <Setter Property="Template">
                                                <Setter.Value>
                                                    <ControlTemplate TargetType="{x:Type telerik:RadButton}">
                                                        <Grid>
                                                            <Border x:Name="ButtonBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="8"/>
                                                            <Border x:Name="ButtonBorder_Over" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="8" Opacity="0">
                                                                <Border.Background>
                                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                        <GradientStop Color="#FFDE4646" Offset="1"/>
                                                                        <GradientStop Color="#FFFF8B6A"/>
                                                                    </LinearGradientBrush>
                                                                </Border.Background>
                                                            </Border>
                                                            <Border x:Name="ButtonBorder_Pressed" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="8" Opacity="0">
                                                                <Border.Background>
                                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                        <GradientStop Color="#FF943434"/>
                                                                        <GradientStop Color="#FFFF3800" Offset="1"/>
                                                                    </LinearGradientBrush>
                                                                </Border.Background>
                                                            </Border>
                                                            <Path Data="M4.0551758,5.1411133L4.9467773,5.1411133 4.9467773,8.0683594 7.8740234,8.0683594 7.8740234,8.9277344 4.9467773,8.9277344 4.9467773,11.85498 4.0551758,11.85498 4.0551758,8.9277344 1.1279297,8.9277344 1.1279297,8.0683594 4.0551758,8.0683594z" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Height="8" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Stroke="{TemplateBinding Foreground}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Width="8">
                                                                <Path.RenderTransform>
                                                                    <TransformGroup>
                                                                        <ScaleTransform/>
                                                                        <SkewTransform/>
                                                                        <RotateTransform Angle="-45"/>
                                                                        <TranslateTransform/>
                                                                    </TransformGroup>
                                                                </Path.RenderTransform>
                                                            </Path>
                                                        </Grid>
                                                        <ControlTemplate.Triggers>
                                                            <Trigger Property="IsMouseOver" Value="True">
                                                                <Trigger.EnterActions>
                                                                    <BeginStoryboard>
                                                                        <Storyboard>
                                                                            <DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ButtonBorder_Over"/>
                                                                        </Storyboard>
                                                                    </BeginStoryboard>
                                                                </Trigger.EnterActions>
                                                                <Trigger.ExitActions>
                                                                    <BeginStoryboard>
                                                                        <Storyboard FillBehavior="Stop">
                                                                            <DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ButtonBorder_Over"/>
                                                                        </Storyboard>
                                                                    </BeginStoryboard>
                                                                </Trigger.ExitActions>
                                                            </Trigger>
                                                            <Trigger Property="IsPressed" Value="True">
                                                                <Trigger.EnterActions>
                                                                    <BeginStoryboard>
                                                                        <Storyboard>
                                                                            <DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ButtonBorder_Pressed"/>
                                                                        </Storyboard>
                                                                    </BeginStoryboard>
                                                                </Trigger.EnterActions>
                                                                <Trigger.ExitActions>
                                                                    <BeginStoryboard>
                                                                        <Storyboard FillBehavior="Stop">
                                                                            <DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ButtonBorder_Pressed"/>
                                                                        </Storyboard>
                                                                    </BeginStoryboard>
                                                                </Trigger.ExitActions>
                                                            </Trigger>
                                                        </ControlTemplate.Triggers>
                                                    </ControlTemplate>
                                                </Setter.Value>
                                            </Setter>
                                            <Setter Property="Background">
                                                <Setter.Value>
                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                        <GradientStop Color="#FF943434" Offset="1"/>
                                                        <GradientStop Color="#FFFF3800"/>
                                                    </LinearGradientBrush>
                                                </Setter.Value>
                                            </Setter>
                                            <Setter Property="BorderBrush">
                                                <Setter.Value>
                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                        <GradientStop Color="#FF83A5D2" Offset="0"/>
                                                        <GradientStop Color="#FFE7F1FF" Offset="1"/>
                                                    </LinearGradientBrush>
                                                </Setter.Value>
                                            </Setter>
                                            <Setter Property="BorderThickness" Value="1"/>
                                            <Setter Property="Width" Value="16"/>
                                            <Setter Property="Height" Value="16"/>
                                            <Setter Property="HorizontalContentAlignment" Value="Center"/>
                                            <Setter Property="VerticalContentAlignment" Value="Center"/>
                                            <Setter Property="Foreground" Value="White"/>
                                            <Setter Property="Margin" Value="1,0,4,0"/>
                                        </Style>
                                    </telerik:RadButton.Style>
                                </telerik:RadButton>
                                <StackPanel Orientation="Horizontal">
                                    <StackPanel.Visibility>
                                        <Binding Path="IsComposite">
                                            <Binding.Converter>
                                                <telerik:BooleanToVisibilityConverter/>
                                            </Binding.Converter>
                                        </Binding>
                                    </StackPanel.Visibility>
                                    <telerik:RadToggleButton x:Name="PART_CompositeFilterLogicalOperatorToggleButton" FontSize="10" Height="18" MinWidth="30">
                                        <telerik:RadToggleButton.IsChecked>
                                            <Binding Mode="TwoWay" Path="CompositeFilter.LogicalOperator">
                                                <Binding.Converter>
                                                    <Telerik_Windows_Controls_Data_DataFilter:LogicalOperatorToCheckedConverter/>
                                                </Binding.Converter>
                                            </Binding>
                                        </telerik:RadToggleButton.IsChecked>
                                        <telerik:StyleManager.Theme>
                                            <telerik:Office_BlackTheme/>
                                        </telerik:StyleManager.Theme>
                                        <Binding Path="CompositeFilter.LogicalOperator">
                                            <Binding.Converter>
                                                <telerik:FilterCompositionLogicalOperatorConverter/>
                                            </Binding.Converter>
                                        </Binding>
                                    </telerik:RadToggleButton>
                                    <telerik:RadButton x:Name="PART_AddFilterButton" Command="{Binding AddFilter}">
                                        <telerik:RadButton.Style>
                                            <Style TargetType="{x:Type telerik:RadButton}">
                                                <Setter Property="Template">
                                                    <Setter.Value>
                                                        <ControlTemplate TargetType="{x:Type telerik:RadButton}">
                                                            <Grid>
                                                                <Border x:Name="ButtonBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="8"/>
                                                                <Border x:Name="ButtonBorder_Over" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="8" Opacity="0">
                                                                    <Border.Background>
                                                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                            <GradientStop Color="#FF5AB13C" Offset="1"/>
                                                                            <GradientStop Color="#FFB1FF72"/>
                                                                        </LinearGradientBrush>
                                                                    </Border.Background>
                                                                </Border>
                                                                <Border x:Name="ButtonBorder_Pressed" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="8" Opacity="0">
                                                                    <Border.Background>
                                                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                            <GradientStop Color="#FF4D9434"/>
                                                                            <GradientStop Color="#FF71FF00" Offset="1"/>
                                                                        </LinearGradientBrush>
                                                                    </Border.Background>
                                                                </Border>
                                                                <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                                            </Grid>
                                                            <ControlTemplate.Triggers>
                                                                <Trigger Property="IsMouseOver" Value="True">
                                                                    <Trigger.EnterActions>
                                                                        <BeginStoryboard>
                                                                            <Storyboard>
                                                                                <DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ButtonBorder_Over"/>
                                                                            </Storyboard>
                                                                        </BeginStoryboard>
                                                                    </Trigger.EnterActions>
                                                                    <Trigger.ExitActions>
                                                                        <BeginStoryboard>
                                                                            <Storyboard FillBehavior="Stop">
                                                                                <DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ButtonBorder_Over"/>
                                                                            </Storyboard>
                                                                        </BeginStoryboard>
                                                                    </Trigger.ExitActions>
                                                                </Trigger>
                                                                <Trigger Property="IsPressed" Value="True">
                                                                    <Trigger.EnterActions>
                                                                        <BeginStoryboard>
                                                                            <Storyboard>
                                                                                <DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ButtonBorder_Pressed"/>
                                                                            </Storyboard>
                                                                        </BeginStoryboard>
                                                                    </Trigger.EnterActions>
                                                                    <Trigger.ExitActions>
                                                                        <BeginStoryboard>
                                                                            <Storyboard FillBehavior="Stop">
                                                                                <DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ButtonBorder_Pressed"/>
                                                                            </Storyboard>
                                                                        </BeginStoryboard>
                                                                    </Trigger.ExitActions>
                                                                </Trigger>
                                                            </ControlTemplate.Triggers>
                                                        </ControlTemplate>
                                                    </Setter.Value>
                                                </Setter>
                                                <Setter Property="Background">
                                                    <Setter.Value>
                                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                            <GradientStop Color="#FF4D9434" Offset="1"/>
                                                            <GradientStop Color="#FF71FF00"/>
                                                        </LinearGradientBrush>
                                                    </Setter.Value>
                                                </Setter>
                                                <Setter Property="BorderBrush">
                                                    <Setter.Value>
                                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                            <GradientStop Color="#FF83A5D2" Offset="0"/>
                                                            <GradientStop Color="#FFE7F1FF" Offset="1"/>
                                                        </LinearGradientBrush>
                                                    </Setter.Value>
                                                </Setter>
                                                <Setter Property="BorderThickness" Value="1"/>
                                                <Setter Property="Width" Value="16"/>
                                                <Setter Property="Height" Value="16"/>
                                                <Setter Property="HorizontalContentAlignment" Value="Center"/>
                                                <Setter Property="VerticalContentAlignment" Value="Center"/>
                                                <Setter Property="Foreground" Value="White"/>
                                                <Setter Property="Margin" Value="4,0,1,0"/>
                                            </Style>
                                        </telerik:RadButton.Style>
                                        <Path Data="M4.0551758,5.1411133L4.9467773,5.1411133 4.9467773,8.0683594 7.8740234,8.0683594 7.8740234,8.9277344 4.9467773,8.9277344 4.9467773,11.85498 4.0551758,11.85498 4.0551758,8.9277344 1.1279297,8.9277344 1.1279297,8.0683594 4.0551758,8.0683594z" Height="8" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Stroke="White" Width="8">
                                            <Path.RenderTransform>
                                                <TransformGroup>
                                                    <ScaleTransform/>
                                                    <SkewTransform/>
                                                    <RotateTransform/>
                                                    <TranslateTransform/>
                                                </TransformGroup>
                                            </Path.RenderTransform>
                                        </Path>
                                    </telerik:RadButton>
                                </StackPanel>
                                <StackPanel Orientation="Horizontal">
                                    <StackPanel.Visibility>
                                        <Binding Path="IsComposite">
                                            <Binding.Converter>
                                                <telerik:InvertedBooleanToVisibilityConverter/>
                                            </Binding.Converter>
                                        </Binding>
                                    </StackPanel.Visibility>
                                    <telerik:RadComboBox x:Name="PART_SimpleFilterMemberComboBox" Margin="0,0,3,0" MinWidth="100" VerticalAlignment="Center">
                                        <telerik:StyleManager.Theme>
                                            <telerik:Office_BlackTheme/>
                                        </telerik:StyleManager.Theme>
                                    </telerik:RadComboBox>
                                    <telerik:RadComboBox x:Name="PART_SimpleFilterOperatorComboBox" Margin="0,0,3,0" MinWidth="100" VerticalAlignment="Center">
                                        <telerik:RadComboBox.ItemTemplate>
                                            <DataTemplate>
                                                <TextBlock>
                                                    <TextBlock.Text>
                                                        <Binding>
                                                            <Binding.Converter>
                                                                <telerik:FilterOperatorConverter/>
                                                            </Binding.Converter>
                                                        </Binding>
                                                    </TextBlock.Text>
                                                </TextBlock>
                                            </DataTemplate>
                                        </telerik:RadComboBox.ItemTemplate>
                                        <telerik:RadComboBox.IsEnabled>
                                            <Binding Path="SimpleFilter.Member">
                                                <Binding.Converter>
                                                    <Telerik_Windows_Controls_Data_DataFilter:FilterMemberToEnabledConverter/>
                                                </Binding.Converter>
                                            </Binding>
                                        </telerik:RadComboBox.IsEnabled>
                                        <telerik:StyleManager.Theme>
                                            <telerik:Office_BlackTheme/>
                                        </telerik:StyleManager.Theme>
                                    </telerik:RadComboBox>
                                    <Telerik_Windows_Controls_Data_DataFilter:FilterEditor FilterOperator="{Binding Operator}" HorizontalContentAlignment="Stretch" ItemPropertyDefinition="{Binding SelectedMember}" VerticalContentAlignment="Stretch">
                                        <Telerik_Windows_Controls_Data_DataFilter:FilterEditor.IsEnabled>
                                            <Binding Path="Member">
                                                <Binding.Converter>
                                                    <Telerik_Windows_Controls_Data_DataFilter:FilterMemberToEnabledConverter/>
                                                </Binding.Converter>
                                            </Binding>
                                        </Telerik_Windows_Controls_Data_DataFilter:FilterEditor.IsEnabled>
                                    </Telerik_Windows_Controls_Data_DataFilter:FilterEditor>
                                    <Border BorderBrush="Transparent" Width="8">
                                        <Border.Visibility>
                                            <Binding Path="CanUserCreateCompositeFilters">
                                                <Binding.Converter>
                                                    <telerik:InvertedBooleanToVisibilityConverter/>
                                                </Binding.Converter>
                                            </Binding>
                                        </Border.Visibility>
                                    </Border>
                                    <telerik:RadButton x:Name="PART_ToCompositeFilterButton" Command="{Binding ToCompositeFilter}">
                                        <telerik:RadButton.Style>
                                            <Style TargetType="{x:Type telerik:RadButton}">
                                                <Setter Property="Template">
                                                    <Setter.Value>
                                                        <ControlTemplate TargetType="{x:Type telerik:RadButton}">
                                                            <Grid>
                                                                <Border x:Name="ButtonBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="8"/>
                                                                <Border x:Name="ButtonBorder_Over" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="8" Opacity="0">
                                                                    <Border.Background>
                                                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                            <GradientStop Color="#FF5AB13C" Offset="1"/>
                                                                            <GradientStop Color="#FFB1FF72"/>
                                                                        </LinearGradientBrush>
                                                                    </Border.Background>
                                                                </Border>
                                                                <Border x:Name="ButtonBorder_Pressed" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="8" Opacity="0">
                                                                    <Border.Background>
                                                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                            <GradientStop Color="#FF4D9434"/>
                                                                            <GradientStop Color="#FF71FF00" Offset="1"/>
                                                                        </LinearGradientBrush>
                                                                    </Border.Background>
                                                                </Border>
                                                                <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                                            </Grid>
                                                            <ControlTemplate.Triggers>
                                                                <Trigger Property="IsMouseOver" Value="True">
                                                                    <Trigger.EnterActions>
                                                                        <BeginStoryboard>
                                                                            <Storyboard>
                                                                                <DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ButtonBorder_Over"/>
                                                                            </Storyboard>
                                                                        </BeginStoryboard>
                                                                    </Trigger.EnterActions>
                                                                    <Trigger.ExitActions>
                                                                        <BeginStoryboard>
                                                                            <Storyboard FillBehavior="Stop">
                                                                                <DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ButtonBorder_Over"/>
                                                                            </Storyboard>
                                                                        </BeginStoryboard>
                                                                    </Trigger.ExitActions>
                                                                </Trigger>
                                                                <Trigger Property="IsPressed" Value="True">
                                                                    <Trigger.EnterActions>
                                                                        <BeginStoryboard>
                                                                            <Storyboard>
                                                                                <DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ButtonBorder_Pressed"/>
                                                                            </Storyboard>
                                                                        </BeginStoryboard>
                                                                    </Trigger.EnterActions>
                                                                    <Trigger.ExitActions>
                                                                        <BeginStoryboard>
                                                                            <Storyboard FillBehavior="Stop">
                                                                                <DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ButtonBorder_Pressed"/>
                                                                            </Storyboard>
                                                                        </BeginStoryboard>
                                                                    </Trigger.ExitActions>
                                                                </Trigger>
                                                            </ControlTemplate.Triggers>
                                                        </ControlTemplate>
                                                    </Setter.Value>
                                                </Setter>
                                                <Setter Property="Background">
                                                    <Setter.Value>
                                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                            <GradientStop Color="#FF4D9434" Offset="1"/>
                                                            <GradientStop Color="#FF71FF00"/>
                                                        </LinearGradientBrush>
                                                    </Setter.Value>
                                                </Setter>
                                                <Setter Property="BorderBrush">
                                                    <Setter.Value>
                                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                            <GradientStop Color="#FF83A5D2" Offset="0"/>
                                                            <GradientStop Color="#FFE7F1FF" Offset="1"/>
                                                        </LinearGradientBrush>
                                                    </Setter.Value>
                                                </Setter>
                                                <Setter Property="BorderThickness" Value="1"/>
                                                <Setter Property="Width" Value="16"/>
                                                <Setter Property="Height" Value="16"/>
                                                <Setter Property="HorizontalContentAlignment" Value="Center"/>
                                                <Setter Property="VerticalContentAlignment" Value="Center"/>
                                                <Setter Property="Foreground" Value="White"/>
                                                <Setter Property="Margin" Value="4,0,1,0"/>
                                            </Style>
                                        </telerik:RadButton.Style>
                                        <telerik:RadButton.Visibility>
                                            <Binding Path="CanUserCreateCompositeFilters">
                                                <Binding.Converter>
                                                    <telerik:BooleanToVisibilityConverter/>
                                                </Binding.Converter>
                                            </Binding>
                                        </telerik:RadButton.Visibility>
                                        <Path Data="M2.0597237,0.00011700392C2.3919959,0.0037145019 2.7279578,0.090300739 3.0362324,0.26828307 3.9928176,0.82056788 4.3205678,2.0437487 3.7682831,3.0003339 3.5047298,3.4568219 3.0883964,3.7701081 2.6211619,3.9128945 2.5376498,3.9384158 2.606295,8.1556374 2.6448601,8.1688096 2.7661251,8.2102287 2.8851618,8.2639664 3.0003339,8.3304611 3.119907,8.3994967 3.2296547,8.479015 3.3290861,8.567185L3.3953214,8.6289421 7.0353448,6.5273734 7.032584,6.5179721C6.9001091,6.0235683 6.9562423,5.4786268 7.2323849,5.0003339 7.5948217,4.3725749 8.2461894,4.0156323 8.921531,4.0005015 8.9436405,4.0000061 8.9657753,3.9998771 8.9879267,4.0001169 9.3201993,4.0037147 9.6561611,4.0903007 9.9644353,4.2682832 10.921021,4.8205677 11.248771,6.0437485 10.696486,7.0003339 10.144202,7.9569193 8.9210207,8.2846695 7.9644353,7.7323848 7.7908325,7.6321552 7.6379409,7.5098292 7.5072617,7.3710103 7.457924,7.3185995 3.8905699,9.3987923 3.9225863,9.510286 4.0671648,10.013763 4.0149822,10.573039 3.7323847,11.062512 3.1801,12.019097 1.9569192,12.346847 1.0003339,11.794563 0.043748736,11.242278 -0.28400159,10.019097 0.26828313,9.062512 0.56168437,8.5543262 1.0444304,8.2236139 1.5759602,8.108039L1.6210667,8.099353 1.6210667,3.9568464 1.5962493,3.9518846C1.4043243,3.9085528 1.2155921,3.8359381 1.0362324,3.7323848 0.079647064,3.1801001 -0.24810326,1.9569192 0.30418158,1.0003339 0.66661841,0.37257487 1.3179861,0.015632391 1.9933276,0.00050151348 2.0154371,6.1988831E-06 2.0375722,-0.00012278557 2.0597237,0.00011700392z" Fill="White" Margin="4.764,3.911,0.231,0.182" RenderTransformOrigin="0.178532408309272,0.500013572224711" Stretch="Fill">
                                            <Path.RenderTransform>
                                                <TransformGroup>
                                                    <ScaleTransform ScaleY="1" ScaleX="-1"/>
                                                    <SkewTransform AngleY="0" AngleX="0"/>
                                                    <RotateTransform Angle="120"/>
                                                    <TranslateTransform X="1.7763568394002505E-15"/>
                                                </TransformGroup>
                                            </Path.RenderTransform>
                                        </Path>
                                    </telerik:RadButton>
                                </StackPanel>
                            </StackPanel>
                        </Border>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="White" Offset="0"/>
                    <GradientStop Color="#FFCDCDCD" Offset="1"/>
                    <GradientStop Color="#FFCECECE" Offset="0.42"/>
                    <GradientStop Color="#FFAFAFAF" Offset="0.43"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderBrush" Value="#FF5F5F5F"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Foreground" Value="Black"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="VerticalAlignment" Value="Top"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
    </Style>
</ResourceDictionary>
Vikas
Top achievements
Rank 1
 answered on 08 Mar 2016
6 answers
123 views

Howdy All,

     

Kevin
Top achievements
Rank 1
 answered on 08 Mar 2016
1 answer
258 views

 

 

I'm having probelas with the binding of radautocompletebox in raddatagridview , in this example the GridViewComboBoxColumn the ItemsSource works correctly but the ItemsSource RadAutoCompleteBox does not work.

Can anyone help.

 

*** VIEW

using ViewModels;
using System.Windows;

namespace Windows
{
     public partial class frmTestes : Window
    {
        public frmTestes()
        {
            InitializeComponent();
            this.DataContext = new vmTeste(myConnection, System.DateTime.Now);
        }
    }
}

 

**** XAML

<Window x:Name="window"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:Windows"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"

        x:Class="Windows.frmTestes" mc:Ignorable="d" Title="frmTestes" >
    <Grid>
        <TabControl x:Name="tabControl">
            <TabItem Header="TabItem1">
                <telerik:RadGridView CanUserDeleteRows="False"   
                                     AlternationCount="2"
                                     BorderThickness="0"
                                     ShowGroupPanel="True"
                                     AlternateRowBackground="#FFF0F0F0"
                                     AutoGenerateColumns="False"
                                     RowDetailsVisibilityMode="Collapsed"
                                     RowIndicatorVisibility="Collapsed"
                                     ItemsSource="{Binding linhas}">

                    <telerik:RadGridView.Columns>
                        <telerik:GridViewComboBoxColumn Header="Código" MinWidth="110" IsComboBoxEditable="True"  
                                                        DataMemberBinding="{Binding artigo}"
                                                        SelectedValueMemberPath="artigo"
                                                        DisplayMemberPath="artigo"
                                                        telerik:TextSearch.TextPath="artigo"
                                                        ItemsSource="{Binding DataContext.artigos, ElementName=window}">
                        </telerik:GridViewComboBoxColumn>

                        <telerik:GridViewDataColumn UniqueName="designacao" Header="Designação" Width="*" DataMemberBinding="{Binding desig1}">
                            <telerik:GridViewDataColumn.CellEditTemplate>
                                <DataTemplate>
                                    <telerik:RadAutoCompleteBox SelectedItem="{Binding artigos.desig1, Mode=TwoWay}"
                                                                ItemsSource="{Binding DataContext.artigos, ElementName=window}"
                                                                SelectionMode="Single" 
                                                                TextSearchMode="Contains"
                                                                DisplayMemberPath="desig1"
                                                                SearchText="{Binding desig1}"/>
                                </DataTemplate>
                            </telerik:GridViewDataColumn.CellEditTemplate>
                        </telerik:GridViewDataColumn>
                    </telerik:RadGridView.Columns>
                </telerik:RadGridView>
            </TabItem>
            <TabItem Header="TabItem2"/>
           </TabControl>
    </Grid>
</Window>

 

**** VIEWMODEL

using System;
using System.Collections.ObjectModel;
using System.Data.SqlClient;

namespace ViewModels
{
    public class vmTeste : BaseViewModel
    {
        public vmTeste(SqlConnection _connection, DateTime _datatrabalho)
        {
            linhas_ = getLinhasFromSQL(_connection, _datatrabalho);
            artigos_ = getArtigosFromSQL(_connection, _datatrabalho);
        }

        private ObservableCollection<Linha> linhas_;
        public ObservableCollection<Linha> linhas
        {
            get
            {
                return this.linhas_;
            }
            set
            {
                linhas_ = value;
            }
        }
   
        private ObservableCollection<Artigo> artigos_;
        public ObservableCollection<Artigo> artigos
        {
            get
            {
                return this.artigos_;
            }
        }
    }
}

Thanks
I'm having probelas with the binding of radautocompletebox in raddatagridview , in this example the GridViewComboBoxColumn the ItemsSource works correctly but the ItemsSource RadAutoCompleteBox does not work. Can anyone help .
I'm having probelas with the binding of radautocompletebox in raddatagridview , in this example the GridViewComboBoxColumn the ItemsSource works correctly but the ItemsSource RadAutoCompleteBox does not work. Can anyone help .
Yana
Telerik team
 answered on 08 Mar 2016
2 answers
94 views

Hi,

I have a grid view bound to a RadObservableCollection that contains around a million items. when I select all items and delete them from the grid view (using telerik:RadGridViewCommands.Delete), the whole application freezes and stops responding. I tried all the tricks and tips for optimizing the grid view, but that didn't help.

How do I solve the issue?

Thanks

Stefan Nenchev
Telerik team
 answered on 08 Mar 2016
1 answer
537 views

So as the title states, I'm trying to navigate between rows in a GridView when a cell* ( * : cell correspond to third row and quantity column in my case )  is editing by clicking up/down , so when i navigate up/down , the new selected row also have cell* editing   , here is my gridview

<telerik:RadGridView Grid.Row="2" Grid.ColumnSpan="3"
         x:Name="gridview"
         ItemsSource="{Binding CurrentDetailBLLs}"
         SelectedItem="{Binding SelectedCurrentDetailBLL,Mode=TwoWay}"                  
         SelectionMode="Extended"
         CanUserDeleteRows="True"
         CanUserInsertRows="True"
         IsReadOnly="False"
         IsFilteringAllowed="False"
         AutoGenerateColumns="False"
         GroupRenderMode="Flat"
         AutoExpandGroups="True"
         NewRowPosition="None"
         IsSynchronizedWithCurrentItem="True" KeyUp="dataGridView1_KeyUp">
            <!--SelectionUnit="FullRow"-->
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn
                            TextAlignment="Justify"
                            Width="auto"
                            HeaderTextAlignment="Center"
                            DataMemberBinding="{Binding Path=ProductID}"
                            Header="ProductCode" />
                <telerik:GridViewDataColumn
                            TextAlignment="Justify"
                            Width="auto"
                            HeaderTextAlignment="Center"
                            DataMemberBinding="{Binding Path=ProductName}"
                            Header="ProductName" IsReadOnly="True">
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn
                            TextAlignment="Center"
                                    Width="auto"
                            HeaderTextAlignment="Center"
                            DataMemberBinding="{Binding Path=Quantity}"
                            Header="Quantity"/>
 
            </telerik:RadGridView.Columns>

the attached image make clear what i am talking about .

help plz !

Stefan Nenchev
Telerik team
 answered on 08 Mar 2016
16 answers
920 views
I need to provide arrow key navigation between rows and columns similar to how Excel works. I have implemented a custom keyboard command provided based on DefaultKeyboardCommandProvider following the instructions from this blog post (the example is actually incorrect. After clearing the command list, the example tried to Remove rather than Add a RadGridViewCommands command to this list).

It appears that if the cell is in edit mode, the custom command provider does not pick up the keyboard events. If I press ESC to cancel edit mode, then the provide gets called. Is there some problem with how I have defined my XAML? I would expect the "Key.Up" and "Key.Down" keys to propogate through the edit control (TextBox) and through to the command provider. Here's what the XAML looks like for the column I'm testing:

                <trgv:GridViewDataColumn Header="Quantity"
 MinWidth="75"
 HeaderTextAlignment="Right"
 ShowDistinctFilters="False">
                    <trgv:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Quantity}"
   HorizontalAlignment="Right"/>
                        </DataTemplate>
                    </trgv:GridViewDataColumn.CellTemplate>
                    <trgv:GridViewDataColumn.CellEditTemplate>
                        <DataTemplate>
                            <infctrl:NumberTextBox Value="{Binding Quantity, ValidatesOnDataErrors=True, UpdateSourceTrigger=LostFocus}"
   HorizontalAlignment="Stretch"
   DisplayFormat="N0"/>
                        </DataTemplate>
                    </trgv:GridViewDataColumn.CellEditTemplate>
                </trgv:GridViewDataColumn>

Maya
Telerik team
 answered on 08 Mar 2016
2 answers
603 views

Hello,

I have a RadTreeView that has different item HierarchicalDataTemplates based on the data type.  One of the templates calls for multi-column items.  Whenever I am performing a drag/drop operation the tooltip target appears to be taking the existing template (maybe put into a horizontal stack panel) and showing the info.  (See attachment)  This is not the results I want as it's even showing hidden buttons (X) that should only appear on hover.  

So my question is how can I update the circled part of the tooltip to only show the label (with the styling such as bold removed as well)?

 

Thank you for your assistance.

 

David
Top achievements
Rank 1
 answered on 07 Mar 2016
5 answers
1.1K+ views

I would like to display "Yes" or "No" for a Boolean in RadGridView instead of a checkbox. I would like to implement this changes in xaml. Columns are generating dynamically. This is how it's created now:

 <telerik:RadGridView x:Name="Data" Grid.Row="3" Margin="5" AutoGenerateColumns="False" CanUserSortColumns="True" IsFilteringAllowed="True"
                                 grid:RadGridViewColumnsBinding.ColumnsCollection="{Binding Path=Columns}"
                                 IsReadOnly="False" CanUserResizeColumns="True"/>

 

I am new in Silverlight coding. Will really appreciate if someone can help.

Dilyan Traykov
Telerik team
 answered on 07 Mar 2016
9 answers
149 views

Hi,

  We are trying to automate RADGridView using CUIT and AutomationElement but we are unable to auto scroll to required row. I have searched in the net and I found this article(http://docs.telerik.com/teststudio/advanced-topics/coded-samples/silverlight/radgridview-automation/scrolling) related to GridView for Sliverlight applications. Is there similar type of the code or any fix for WPF RadGridView? Any help to solve this problem is greatly appreciated.

 

Regards,

Nagasree.

 

Maya
Telerik team
 answered on 07 Mar 2016
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Slider
Expander
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?