Telerik Forums
UI for WPF Forum
5 answers
316 views

Hi,

    I have a GridViewComboBoxColumn bound to a datasource. I need to add a checkbox on the first row. How can we achieve this? Please help.

Thanks in advance,
Norbert John

Afsal
Top achievements
Rank 1
 answered on 18 Apr 2011
4 answers
383 views
Hi,

I have set the GridLinesVisibility-Property to "None" in my grid. But when the rowdetails are visible (set to "Visible" or "VisibleWhenSelected"), there are 3 horizontal lines visible:

above the row,
between the row and rowdetails,
under the rowdetails.

How can I remove (and recolor) these??? Espacially the one between the row and the rowdetails...
(I've searched in the GridViewStyle, RowStyle, CellStyle an the RowDetailsStyle for this, but couldn't find anything that effected.)

Thanks & Regards...
Filiz
Filiz
Top achievements
Rank 1
 answered on 18 Apr 2011
1 answer
118 views

Hello Team,
 
We are using radDataFilter and Gridview filter on a xaml, here is a scnerio-
RadGridview has both the filters radDataFilter and GridView(Columns Filter).
The gridview is dependent on radDataFilter datasource called “FilteredSource”. 
In the same context if we apply the filter on Gridview filter, the color of funnel icon must changed, but its not happening.


Code:

<telerik:RadDataFilter Name="radDataFilter"

DockPanel.Dock="Top"

Visibility="{Binding Path=IsVisible, Mode=OneWay}"

Source="{Binding Shipments}"

Margin="1">

</telerik:RadDataFilter>

<ydd:YodelGridView x:Name="ShipmentGrid"

SelectionMode="Extended"

IsSynchronizedWithCurrentItem="True"

ItemsSource="{Binding FilteredSource, ElementName=radDataFilter}"

IsFilteringAllowed="True"

CanUserFreezeColumns="False"

AutoGenerateColumns="False"

IsReadOnly="True"

SelectionUnit="FullRow"

ScrollViewer.HorizontalScrollBarVisibility="Auto"

ScrollViewer.VerticalScrollBarVisibility="Auto">

Could you please look into this and suggest the solution.

Regards,
Narendra Ughade

Rossen Hristov
Telerik team
 answered on 18 Apr 2011
1 answer
353 views
Hi,
  <><>How we can apply Binding.ValidationRules in the telerik:RadNumericUpDown control  ?
Pana
Telerik team
 answered on 18 Apr 2011
1 answer
262 views
Can't figure out how to make the background of the Content area transparent, so the background set on the item behind it shows through. There's nothing similar to ItemContainerStyle.
Tina Stancheva
Telerik team
 answered on 18 Apr 2011
1 answer
163 views
<ControlTemplate x:Key="RadScheduleViewControlTemplate1" TargetType="{x:Type telerik:RadScheduleView}">
    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Border x:Name="NavigationHeader" BorderThickness="1" Visibility="{TemplateBinding NavigationHeaderVisibility}">
                <Border.BorderBrush>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FF96B3DC" Offset="0"/>
                        <GradientStop Color="#FF7CA1CD" Offset="1"/>
                        <GradientStop Color="#FF6289B9" Offset="0.5"/>
                    </LinearGradientBrush>
                </Border.BorderBrush>
                <Border.Background>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FFEBF3FF" Offset="0"/>
                        <GradientStop Color="#FFD0E8FF" Offset="1"/>
                        <GradientStop Color="#FFABC9EE" Offset="0.43"/>
                        <GradientStop Color="#FFC6DFFF" Offset="0.42"/>
                    </LinearGradientBrush>
                </Border.Background>
                <Border BorderBrush="#FFEFF6FF" BorderThickness="1">
                    <Grid x:Name="ScheduleViewHeader">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <ListBox x:Name="ViewModeSelection" Grid.Column="1" SelectionMode="Single" HorizontalAlignment="Left" Margin="-2,2,0,2" Width="71" d:LayoutOverrides="HorizontalAlignment">
                            <ListBox.Style>
                                <Style TargetType="{x:Type ListBox}">
                                    <Setter Property="BorderBrush" Value="{x:Null}"/>
                                    <Setter Property="Background" Value="{x:Null}"/>
                                    <Setter Property="BorderThickness" Value="0"/>
                                    <Setter Property="Margin" Value="2"/>
                                    <Setter Property="ItemContainerStyle">
                                        <Setter.Value>
                                            <Style TargetType="{x:Type ListBoxItem}">
                                                <Setter Property="Margin" Value="2"/>
                                                <Setter Property="Padding" Value="6,3"/>
                                                <Setter Property="MinWidth" Value="84"/>
                                                <Setter Property="Foreground" Value="Black"/>
                                                <Setter Property="HorizontalContentAlignment" Value="Center"/>
                                                <Setter Property="IsTabStop" Value="False"/>
                                                <Setter Property="Template">
                                                    <Setter.Value>
                                                        <ControlTemplate TargetType="{x:Type ListBoxItem}">
                                                            <Grid>
                                                                <Border x:Name="CheckOuterBorder" BorderBrush="#FF83A5D2" BorderThickness="1" CornerRadius="1">
                                                                    <Border.Background>
                                                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                            <GradientStop Color="#FFEBF3FF"/>
                                                                            <GradientStop Color="#FFD0F3FF" Offset="1"/>
                                                                            <GradientStop Color="#FFA1C5F2" Offset="0.43"/>
                                                                            <GradientStop Color="#FFCAE1FF" Offset="0.42"/>
                                                                        </LinearGradientBrush>
                                                                    </Border.Background>
                                                                    <Rectangle x:Name="CheckInnerBorder" Stroke="White"/>
                                                                </Border>
                                                                <ContentPresenter x:Name="Content" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" telerik:LocalizationManager.ResourceKey="{Binding Title}" RecognizesAccessKey="True" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                                            </Grid>
                                                            <ControlTemplate.Triggers>
                                                                <Trigger Property="IsMouseOver" Value="True">
                                                                    <Setter Property="Foreground" Value="Black"/>
                                                                    <Setter Property="BorderBrush" TargetName="CheckOuterBorder" Value="#FFFFC92B"/>
                                                                    <Setter Property="Background" TargetName="CheckOuterBorder">
                                                                        <Setter.Value>
                                                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                                <GradientStop Color="#FFFFFBA3" Offset="1"/>
                                                                                <GradientStop Color="#FFFFFBDA" Offset="0"/>
                                                                                <GradientStop Color="#FFFFD25A" Offset="0.43"/>
                                                                                <GradientStop Color="#FFFEEBAE" Offset="0.42"/>
                                                                            </LinearGradientBrush>
                                                                        </Setter.Value>
                                                                    </Setter>
                                                                    <Setter Property="Stroke" TargetName="CheckInnerBorder" Value="White"/>
                                                                </Trigger>
                                                                <Trigger Property="IsSelected" Value="True">
                                                                    <Setter Property="BorderBrush" TargetName="CheckOuterBorder">
                                                                        <Setter.Value>
                                                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                                <GradientStop Color="#FF282828"/>
                                                                                <GradientStop Color="#FF5F5F5F" Offset="1"/>
                                                                            </LinearGradientBrush>
                                                                        </Setter.Value>
                                                                    </Setter>
                                                                    <Setter Property="Background" TargetName="CheckOuterBorder">
                                                                        <Setter.Value>
                                                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                                <GradientStop Color="#FFFFD74E" Offset="0.996"/>
                                                                                <GradientStop Color="#FFFFDCAB" Offset="0.17"/>
                                                                                <GradientStop Color="#FFFE9227" Offset="0.57"/>
                                                                                <GradientStop Color="#FFFFD18F" Offset="0.56"/>
                                                                                <GradientStop Color="#FFFFBA74" Offset="0"/>
                                                                            </LinearGradientBrush>
                                                                        </Setter.Value>
                                                                    </Setter>
                                                                    <Setter Property="Stroke" TargetName="CheckInnerBorder">
                                                                        <Setter.Value>
                                                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                                <GradientStop Color="#FFB69A78"/>
                                                                                <GradientStop Color="#FFFFE17A" Offset="0.126"/>
                                                                            </LinearGradientBrush>
                                                                        </Setter.Value>
                                                                    </Setter>
                                                                    <Setter Property="Foreground" Value="Black"/>
                                                                </Trigger>
                                                            </ControlTemplate.Triggers>
                                                        </ControlTemplate>
                                                    </Setter.Value>
                                                </Setter>
                                            </Style>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="ItemsPanel">
                                        <Setter.Value>
                                            <ItemsPanelTemplate>
                                                <telerik:RadUniformGrid IsItemsHost="True" Rows="1"/>
                                            </ItemsPanelTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </ListBox.Style>
                        </ListBox>
                        <StackPanel Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
                            <ContentControl x:Name="CurrentInterval" Content="{TemplateBinding CurrentVisibleRangeText}" HorizontalAlignment="Right" VerticalAlignment="Center">
                                <ContentControl.Style>
                                    <Style TargetType="{x:Type ContentControl}">
                                        <Setter Property="Margin" Value="5"/>
                                        <Setter Property="VerticalAlignment" Value="Center"/>
                                        <Setter Property="HorizontalAlignment" Value="Right"/>
                                        <Setter Property="FontWeight" Value="Bold"/>
                                        <Setter Property="ContentTemplate">
                                            <Setter.Value>
                                                <DataTemplate>
                                                    <Grid>
                                                        <TextBlock Foreground="White" Margin="0,1,0,0" Text="{Binding}"/>
                                                        <TextBlock Foreground="Black" Margin="0,0,0,1" Text="{Binding}"/>
                                                    </Grid>
                                                </DataTemplate>
                                            </Setter.Value>
                                        </Setter>
                                    </Style>
                                </ContentControl.Style>
                            </ContentControl>
                            <telerik:RadButton Command="telerik:RadScheduleViewCommands.DecreaseVisibleDateLarge">
                                <telerik:RadButton.Style>
                                    <Style TargetType="{x:Type telerik:RadButton}">
                                        <Setter Property="Template">
                                            <Setter.Value>
                                                <ControlTemplate TargetType="{x:Type telerik:RadButton}">
                                                    <Grid>
                                                        <Border x:Name="CheckOuterBorder" BorderBrush="#FF83A5D2" BorderThickness="1" CornerRadius="1">
                                                            <Border.Background>
                                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                    <GradientStop Color="#FFEBF3FF"/>
                                                                    <GradientStop Color="#FFD0F3FF" Offset="1"/>
                                                                    <GradientStop Color="#FFA1C5F2" Offset="0.43"/>
                                                                    <GradientStop Color="#FFCAE1FF" Offset="0.42"/>
                                                                </LinearGradientBrush>
                                                            </Border.Background>
                                                            <Rectangle x:Name="CheckInnerBorder" Stroke="White"/>
                                                        </Border>
                                                        <Path x:Name="IconBackground" Data="M4,0L0,3.5 4,7z" Fill="White" Height="7" Margin="0,1,0,0" Width="4"/>
                                                        <Path x:Name="IconForeground" Data="M4,0L0,3.5 4,7z" Fill="#FF567DB1" Height="7" Margin="0,0,0,1" Width="4"/>
                                                    </Grid>
                                                    <ControlTemplate.Triggers>
                                                        <Trigger Property="IsMouseOver" Value="True">
                                                            <Setter Property="Fill" TargetName="IconForeground" Value="#FF567DB1"/>
                                                            <Setter Property="Fill" TargetName="IconBackground" Value="White"/>
                                                            <Setter Property="BorderBrush" TargetName="CheckOuterBorder" Value="#FFFFC92B"/>
                                                            <Setter Property="Background" TargetName="CheckOuterBorder">
                                                                <Setter.Value>
                                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                        <GradientStop Color="#FFFFFBA3" Offset="1"/>
                                                                        <GradientStop Color="#FFFFFBDA" Offset="0"/>
                                                                        <GradientStop Color="#FFFFD25A" Offset="0.43"/>
                                                                        <GradientStop Color="#FFFEEBAE" Offset="0.42"/>
                                                                    </LinearGradientBrush>
                                                                </Setter.Value>
                                                            </Setter>
                                                            <Setter Property="Stroke" TargetName="CheckInnerBorder" Value="White"/>
                                                        </Trigger>
                                                        <Trigger Property="IsPressed" Value="True">
                                                            <Setter Property="Fill" TargetName="IconForeground" Value="#FF567DB1"/>
                                                            <Setter Property="Fill" TargetName="IconBackground" Value="White"/>
                                                            <Setter Property="BorderBrush" TargetName="CheckOuterBorder">
                                                                <Setter.Value>
                                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                        <GradientStop Color="#FF282828"/>
                                                                        <GradientStop Color="#FF5F5F5F" Offset="1"/>
                                                                    </LinearGradientBrush>
                                                                </Setter.Value>
                                                            </Setter>
                                                            <Setter Property="Background" TargetName="CheckOuterBorder">
                                                                <Setter.Value>
                                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                        <GradientStop Color="#FFFFD74E" Offset="0.996"/>
                                                                        <GradientStop Color="#FFFFDCAB" Offset="0.17"/>
                                                                        <GradientStop Color="#FFFE9227" Offset="0.57"/>
                                                                        <GradientStop Color="#FFFFD18F" Offset="0.56"/>
                                                                        <GradientStop Color="#FFFFBA74" Offset="0"/>
                                                                    </LinearGradientBrush>
                                                                </Setter.Value>
                                                            </Setter>
                                                            <Setter Property="Stroke" TargetName="CheckInnerBorder">
                                                                <Setter.Value>
                                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                        <GradientStop Color="#FFB69A78"/>
                                                                        <GradientStop Color="#FFFFE17A" Offset="0.126"/>
                                                                    </LinearGradientBrush>
                                                                </Setter.Value>
                                                            </Setter>
                                                        </Trigger>
                                                    </ControlTemplate.Triggers>
                                                </ControlTemplate>
                                            </Setter.Value>
                                        </Setter>
                                        <Style.BasedOn>
                                            <Style TargetType="{x:Type FrameworkElement}">
                                                <Setter Property="Margin" Value="2"/>
                                                <Setter Property="Width" Value="22"/>
                                                <Setter Property="Height" Value="22"/>
                                                <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
                                                <Setter Property="HorizontalAlignment" Value="Center"/>
                                                <Setter Property="VerticalAlignment" Value="Center"/>
                                            </Style>
                                        </Style.BasedOn>
                                    </Style>
                                </telerik:RadButton.Style>
                            </telerik:RadButton>
                            <telerik:RadDatePicker x:Name="PART_NavigationPicker" DateTimeWatermarkContent="Enter date" DisplayDate="2011-04-01" InputMode="DatePicker" SelectedValue="{Binding CurrentDate, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
                                <telerik:RadDatePicker.Style>
                                    <Style TargetType="{x:Type telerik:RadDatePicker}">
                                        <Setter Property="Template">
                                            <Setter.Value>
                                                <ControlTemplate TargetType="{x:Type telerik:RadDatePicker}">
                                                    <telerik:RadDropDownButton DropDownIndicatorVisibility="Collapsed" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
                                                        <telerik:RadDropDownButton.DropDownContent>
                                                            <telerik:RadCalendar x:Name="PART_Calendar" Culture="{TemplateBinding Culture}" DisplayDateEnd="{TemplateBinding DisplayDateEnd}" DateSelectionMode="{TemplateBinding DateSelectionMode}" DisplayDateStart="{TemplateBinding DisplayDateStart}" DisplayDate="{Binding DisplayDate, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsReadOnly="{TemplateBinding IsReadOnly}" SelectableDateEnd="{TemplateBinding SelectableDateEnd}" SelectionMode="Single" SelectedDate="{Binding SelectedDate, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" SelectableDateStart="{TemplateBinding SelectableDateStart}">
                                                                <telerik:StyleManager.Theme>
                                                                    <telerik:Office_BlueTheme/>
                                                                </telerik:StyleManager.Theme>
                                                            </telerik:RadCalendar>
                                                        </telerik:RadDropDownButton.DropDownContent>
                                                        <telerik:RadDropDownButton.Style>
                                                            <Style TargetType="{x:Type telerik:RadDropDownButton}">
                                                                <Setter Property="Template">
                                                                    <Setter.Value>
                                                                        <ControlTemplate TargetType="{x:Type telerik:RadDropDownButton}">
                                                                            <Grid>
                                                                                <Border x:Name="CheckOuterBorder" BorderBrush="#FF83A5D2" BorderThickness="1" CornerRadius="1">
                                                                                    <Border.Background>
                                                                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                                            <GradientStop Color="#FFEBF3FF"/>
                                                                                            <GradientStop Color="#FFD0F3FF" Offset="1"/>
                                                                                            <GradientStop Color="#FFA1C5F2" Offset="0.43"/>
                                                                                            <GradientStop Color="#FFCAE1FF" Offset="0.42"/>
                                                                                        </LinearGradientBrush>
                                                                                    </Border.Background>
                                                                                    <Rectangle x:Name="CheckInnerBorder" Stroke="White"/>
                                                                                </Border>
                                                                                <ContentControl x:Name="CalendarIcon" Background="White" Foreground="#FF567DB1" HorizontalContentAlignment="Center" IsTabStop="False" Margin="0,0,0,1">
                                                                                    <ContentControl.Template>
                                                                                        <ControlTemplate TargetType="{x:Type ContentControl}">
                                                                                            <Grid>
                                                                                                <Path x:Name="CalendarIconBackground" Data="M0,0.5L7,0.5 M0,2.5L7,2.5 M0,4.5L7,4.5 M0,6.5L7,6.5 M0.5,0L0.5,7 M2.5,0L2.5,7 M4.5,0L4.5,7 M6.5,0L6.5,7" Height="7" Margin="0,1,0,0" Stroke="{TemplateBinding Background}" Width="7"/>
                                                                                                <Path x:Name="CalendarIconForeground" Data="M0,0.5L7,0.5 M0,2.5L7,2.5 M0,4.5L7,4.5 M0,6.5L7,6.5 M0.5,0L0.5,7 M2.5,0L2.5,7 M4.5,0L4.5,7 M6.5,0L6.5,7" Height="7" Margin="0,0,0,1" Stroke="{TemplateBinding Foreground}" Width="7"/>
                                                                                            </Grid>
                                                                                        </ControlTemplate>
                                                                                    </ContentControl.Template>
                                                                                </ContentControl>
                                                                                <Popup x:Name="DropDownPopup" AllowsTransparency="True" Focusable="False" IsOpen="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" StaysOpen="False">
                                                                                    <ContentPresenter x:Name="DropDownPopupContent" ContentTemplate="{TemplateBinding DropDownContentTemplate}" Content="{TemplateBinding DropDownContent}"/>
                                                                                </Popup>
                                                                            </Grid>
                                                                            <ControlTemplate.Triggers>
                                                                                <Trigger Property="IsMouseOver" Value="True">
                                                                                    <Setter Property="Foreground" TargetName="CalendarIcon" Value="#FF567DB1"/>
                                                                                    <Setter Property="Background" TargetName="CalendarIcon" Value="White"/>
                                                                                    <Setter Property="BorderBrush" TargetName="CheckOuterBorder" Value="#FFFFC92B"/>
                                                                                    <Setter Property="Background" TargetName="CheckOuterBorder">
                                                                                        <Setter.Value>
                                                                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                                                <GradientStop Color="#FFFFFBA3" Offset="1"/>
                                                                                                <GradientStop Color="#FFFFFBDA" Offset="0"/>
                                                                                                <GradientStop Color="#FFFFD25A" Offset="0.43"/>
                                                                                                <GradientStop Color="#FFFEEBAE" Offset="0.42"/>
                                                                                            </LinearGradientBrush>
                                                                                        </Setter.Value>
                                                                                    </Setter>
                                                                                    <Setter Property="Stroke" TargetName="CheckInnerBorder" Value="White"/>
                                                                                </Trigger>
                                                                                <Trigger Property="IsPressed" Value="True">
                                                                                    <Setter Property="Foreground" TargetName="CalendarIcon" Value="#FF567DB1"/>
                                                                                    <Setter Property="Background" TargetName="CalendarIcon" Value="White"/>
                                                                                    <Setter Property="BorderBrush" TargetName="CheckOuterBorder">
                                                                                        <Setter.Value>
                                                                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                                                <GradientStop Color="#FF282828"/>
                                                                                                <GradientStop Color="#FF5F5F5F" Offset="1"/>
                                                                                            </LinearGradientBrush>
                                                                                        </Setter.Value>
                                                                                    </Setter>
                                                                                    <Setter Property="Background" TargetName="CheckOuterBorder">
                                                                                        <Setter.Value>
                                                                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                                                <GradientStop Color="#FFFFD74E" Offset="0.996"/>
                                                                                                <GradientStop Color="#FFFFDCAB" Offset="0.17"/>
                                                                                                <GradientStop Color="#FFFE9227" Offset="0.57"/>
                                                                                                <GradientStop Color="#FFFFD18F" Offset="0.56"/>
                                                                                                <GradientStop Color="#FFFFBA74" Offset="0"/>
                                                                                            </LinearGradientBrush>
                                                                                        </Setter.Value>
                                                                                    </Setter>
                                                                                    <Setter Property="Stroke" TargetName="CheckInnerBorder">
                                                                                        <Setter.Value>
                                                                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                                                <GradientStop Color="#FFB69A78"/>
                                                                                                <GradientStop Color="#FFFFE17A" Offset="0.126"/>
                                                                                            </LinearGradientBrush>
                                                                                        </Setter.Value>
                                                                                    </Setter>
                                                                                </Trigger>
                                                                                <Trigger Property="IsOpen" Value="True">
                                                                                    <Setter Property="Foreground" TargetName="CalendarIcon" Value="#FF567DB1"/>
                                                                                    <Setter Property="Background" TargetName="CalendarIcon" Value="White"/>
                                                                                    <Setter Property="BorderBrush" TargetName="CheckOuterBorder">
                                                                                        <Setter.Value>
                                                                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                                                <GradientStop Color="#FF282828"/>
                                                                                                <GradientStop Color="#FF5F5F5F" Offset="1"/>
                                                                                            </LinearGradientBrush>
                                                                                        </Setter.Value>
                                                                                    </Setter>
                                                                                    <Setter Property="Background" TargetName="CheckOuterBorder">
                                                                                        <Setter.Value>
                                                                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                                                <GradientStop Color="#FFFFD74E" Offset="0.996"/>
                                                                                                <GradientStop Color="#FFFFDCAB" Offset="0.17"/>
                                                                                                <GradientStop Color="#FFFE9227" Offset="0.57"/>
                                                                                                <GradientStop Color="#FFFFD18F" Offset="0.56"/>
                                                                                                <GradientStop Color="#FFFFBA74" Offset="0"/>
                                                                                            </LinearGradientBrush>
                                                                                        </Setter.Value>
                                                                                    </Setter>
                                                                                    <Setter Property="Stroke" TargetName="CheckInnerBorder">
                                                                                        <Setter.Value>
                                                                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                                                <GradientStop Color="#FFB69A78"/>
                                                                                                <GradientStop Color="#FFFFE17A" Offset="0.126"/>
                                                                                            </LinearGradientBrush>
                                                                                        </Setter.Value>
                                                                                    </Setter>
                                                                                    <Setter Property="Visibility" TargetName="CheckOuterBorder" Value="Visible"/>
                                                                                </Trigger>
                                                                            </ControlTemplate.Triggers>
                                                                        </ControlTemplate>
                                                                    </Setter.Value>
                                                                </Setter>
                                                                <Style.BasedOn>
                                                                    <Style TargetType="{x:Type FrameworkElement}">
                                                                        <Setter Property="Margin" Value="2"/>
                                                                        <Setter Property="Width" Value="22"/>
                                                                        <Setter Property="Height" Value="22"/>
                                                                        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
                                                                        <Setter Property="HorizontalAlignment" Value="Center"/>
                                                                        <Setter Property="VerticalAlignment" Value="Center"/>
                                                                    </Style>
                                                                </Style.BasedOn>
                                                            </Style>
                                                        </telerik:RadDropDownButton.Style>
                                                    </telerik:RadDropDownButton>
                                                </ControlTemplate>
                                            </Setter.Value>
                                        </Setter>
                                    </Style>
                                </telerik:RadDatePicker.Style>
                            </telerik:RadDatePicker>
                            <telerik:RadButton Command="telerik:RadScheduleViewCommands.IncreaseVisibleDateLarge">
                                <telerik:RadButton.Style>
                                    <Style TargetType="{x:Type telerik:RadButton}">
                                        <Setter Property="Template">
                                            <Setter.Value>
                                                <ControlTemplate TargetType="{x:Type telerik:RadButton}">
                                                    <Grid>
                                                        <Border x:Name="CheckOuterBorder" BorderBrush="#FF83A5D2" BorderThickness="1" CornerRadius="1">
                                                            <Border.Background>
                                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                    <GradientStop Color="#FFEBF3FF"/>
                                                                    <GradientStop Color="#FFD0F3FF" Offset="1"/>
                                                                    <GradientStop Color="#FFA1C5F2" Offset="0.43"/>
                                                                    <GradientStop Color="#FFCAE1FF" Offset="0.42"/>
                                                                </LinearGradientBrush>
                                                            </Border.Background>
                                                            <Rectangle x:Name="CheckInnerBorder" Stroke="White"/>
                                                        </Border>
                                                        <Path x:Name="IconBackground" Data="M0,0L4,3.5 0,7z" Fill="White" Height="7" Margin="0,1,0,0" Width="4"/>
                                                        <Path x:Name="IconForeground" Data="M0,0L4,3.5 0,7z" Fill="#FF567DB1" Height="7" Margin="0,0,0,1" Width="4"/>
                                                    </Grid>
                                                    <ControlTemplate.Triggers>
                                                        <Trigger Property="IsMouseOver" Value="True">
                                                            <Setter Property="Fill" TargetName="IconForeground" Value="#FF567DB1"/>
                                                            <Setter Property="Fill" TargetName="IconBackground" Value="White"/>
                                                            <Setter Property="BorderBrush" TargetName="CheckOuterBorder" Value="#FFFFC92B"/>
                                                            <Setter Property="Background" TargetName="CheckOuterBorder">
                                                                <Setter.Value>
                                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                        <GradientStop Color="#FFFFFBA3" Offset="1"/>
                                                                        <GradientStop Color="#FFFFFBDA" Offset="0"/>
                                                                        <GradientStop Color="#FFFFD25A" Offset="0.43"/>
                                                                        <GradientStop Color="#FFFEEBAE" Offset="0.42"/>
                                                                    </LinearGradientBrush>
                                                                </Setter.Value>
                                                            </Setter>
                                                            <Setter Property="Stroke" TargetName="CheckInnerBorder" Value="White"/>
                                                        </Trigger>
                                                        <Trigger Property="IsPressed" Value="True">
                                                            <Setter Property="Fill" TargetName="IconForeground" Value="#FF567DB1"/>
                                                            <Setter Property="Fill" TargetName="IconBackground" Value="White"/>
                                                            <Setter Property="BorderBrush" TargetName="CheckOuterBorder">
                                                                <Setter.Value>
                                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                        <GradientStop Color="#FF282828"/>
                                                                        <GradientStop Color="#FF5F5F5F" Offset="1"/>
                                                                    </LinearGradientBrush>
                                                                </Setter.Value>
                                                            </Setter>
                                                            <Setter Property="Background" TargetName="CheckOuterBorder">
                                                                <Setter.Value>
                                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                        <GradientStop Color="#FFFFD74E" Offset="0.996"/>
                                                                        <GradientStop Color="#FFFFDCAB" Offset="0.17"/>
                                                                        <GradientStop Color="#FFFE9227" Offset="0.57"/>
                                                                        <GradientStop Color="#FFFFD18F" Offset="0.56"/>
                                                                        <GradientStop Color="#FFFFBA74" Offset="0"/>
                                                                    </LinearGradientBrush>
                                                                </Setter.Value>
                                                            </Setter>
                                                            <Setter Property="Stroke" TargetName="CheckInnerBorder">
                                                                <Setter.Value>
                                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                        <GradientStop Color="#FFB69A78"/>
                                                                        <GradientStop Color="#FFFFE17A" Offset="0.126"/>
                                                                    </LinearGradientBrush>
                                                                </Setter.Value>
                                                            </Setter>
                                                        </Trigger>
                                                    </ControlTemplate.Triggers>
                                                </ControlTemplate>
                                            </Setter.Value>
                                        </Setter>
                                        <Style.BasedOn>
                                            <Style TargetType="{x:Type FrameworkElement}">
                                                <Setter Property="Margin" Value="2"/>
                                                <Setter Property="Width" Value="22"/>
                                                <Setter Property="Height" Value="22"/>
                                                <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
                                                <Setter Property="HorizontalAlignment" Value="Center"/>
                                                <Setter Property="VerticalAlignment" Value="Center"/>
                                            </Style>
                                        </Style.BasedOn>
                                    </Style>
                                </telerik:RadButton.Style>
                            </telerik:RadButton>
                        </StackPanel>
                    </Grid>
                </Border>
            </Border>
            <telerik:RadTransitionControl x:Name="PART_TranstionControl" Duration="0:0:0.5" Grid.Row="1">
                <telerik:RadTransitionControl.Transition>
                    <telerik:SlideAndZoomTransition MinAlpha="0.1" MinZoom="1" StartSlideAt="0.25" SlideDirection="LeftToRight"/>
                </telerik:RadTransitionControl.Transition>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition x:Name="HeaderColumn" Width="{Binding HeadersLength, RelativeSource={RelativeSource TemplatedParent}}"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition x:Name="HeaderRow" Height="Auto"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <telerik:TimeRulerPanel x:Name="PART_TimeRulerPanel" ClipToBounds="True" Grid.Column="1" Orientation="{TemplateBinding EffectiveOrientation}" Offset="{Binding HorizontalOffset, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="0"/>
                    <telerik:AppointmentsPanel x:Name="PART_ItemsHost" Background="{x:Null}" Grid.ColumnSpan="2" Grid.Column="0" Orientation="{TemplateBinding EffectiveOrientation}" Grid.Row="1" Panel.ZIndex="1"/>
                    <telerik:TimeRulerLinesPanel x:Name="PART_TimeRulerLinesPanel" Background="Transparent" ClipToBounds="True" Grid.Column="1" Orientation="{TemplateBinding EffectiveOrientation}" PixelLength="{TemplateBinding EffectivePixelLength}" Grid.Row="1"/>
                    <telerik:HighlightPanel x:Name="PART_HighlightPanel" Background="Transparent" ClipToBounds="True" Grid.Column="1" HorizontalAlignment="Left" IsHitTestVisible="False" Orientation="{TemplateBinding EffectiveOrientation}" PixelLength="{TemplateBinding EffectivePixelLength}" Grid.Row="1" VerticalAlignment="Top" Panel.ZIndex="1"/>
                    <Border x:Name="AppointmentsBorder" BorderBrush="#FFB3D0F3" BorderThickness="1" Grid.Column="1" Grid.Row="1"/>
                    <Border x:Name="GroupHeadersBorder" BorderBrush="#FF83A5D2" BorderThickness="1" Grid.Column="0" Margin="0,0,-1,0" Grid.Row="1"/>
                    <ScrollBar x:Name="PART_HorizontalScrollBar" Grid.Column="1" LargeChange="{TemplateBinding HorizontalLargeChange}" Maximum="{TemplateBinding ExtentWidth}" Orientation="Horizontal" Grid.Row="2" SmallChange="{TemplateBinding HorizontalSmallChange}" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" ViewportSize="{TemplateBinding ViewportWidth}">
                        <telerik:StyleManager.Theme>
                            <telerik:Office_BlueTheme/>
                        </telerik:StyleManager.Theme>
                    </ScrollBar>
                    <ScrollBar x:Name="PART_VerticalScrollBar" Grid.Column="2" LargeChange="{TemplateBinding VerticalLargeChange}" Maximum="{TemplateBinding ExtentHeight}" Orientation="Vertical" Grid.Row="1" SmallChange="{TemplateBinding VerticalSmallChange}" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" ViewportSize="{TemplateBinding ViewportHeight}">
                        <telerik:StyleManager.Theme>
                            <telerik:Office_BlueTheme/>
                        </telerik:StyleManager.Theme>
                    </ScrollBar>
                    <Grid x:Name="WarningsPanel" Grid.ColumnSpan="3" Grid.Row="0" Grid.RowSpan="3" Panel.ZIndex="2">
                        <Grid x:Name="ViewDefinitionWarning" Background="White">
                            <Grid.Visibility>
                                <Binding Mode="TwoWay" Path="ActiveViewDefinition" RelativeSource="{RelativeSource TemplatedParent}">
                                    <Binding.Converter>
                                        <telerik:InvertedNullToVisibilityConverter/>
                                    </Binding.Converter>
                                </Binding>
                            </Grid.Visibility>
                            <TextBlock FontSize="32" HorizontalAlignment="Center" Text="Please select a View definition" VerticalAlignment="Center"><Run Text="Please select a View definition"/></TextBlock>
                        </Grid>
                        <Grid x:Name="AppointmentSourceWarning" Background="White">
                            <Grid.Visibility>
                                <Binding Mode="TwoWay" Path="AppointmentsSource" RelativeSource="{RelativeSource TemplatedParent}">
                                    <Binding.Converter>
                                        <telerik:InvertedNullToVisibilityConverter/>
                                    </Binding.Converter>
                                </Binding>
                            </Grid.Visibility>
                            <TextBlock Foreground="Black" FontSize="32" HorizontalAlignment="Center" Text="Please provide an AppointmentSource" VerticalAlignment="Center"><Run Text="Please provide an AppointmentSource"/></TextBlock>
                        </Grid>
                    </Grid>
                </Grid>
            </telerik:RadTransitionControl>
        </Grid>
    </Border>
    <ControlTemplate.Triggers>
        <Trigger Property="EffectiveOrientation" Value="Vertical">
            <Setter Property="Width" TargetName="HeaderColumn" Value="Auto"/>
            <Setter Property="Height" TargetName="HeaderRow" Value="{Binding HeadersLength, RelativeSource={RelativeSource TemplatedParent}}"/>
            <Setter Property="Grid.Column" TargetName="PART_ItemsHost" Value="1"/>
            <Setter Property="Grid.ColumnSpan" TargetName="PART_ItemsHost" Value="1"/>
            <Setter Property="Grid.Row" TargetName="PART_ItemsHost" Value="0"/>
            <Setter Property="Grid.RowSpan" TargetName="PART_ItemsHost" Value="2"/>
            <Setter Property="Grid.Column" TargetName="PART_TimeRulerPanel" Value="0"/>
            <Setter Property="Grid.Row" TargetName="PART_TimeRulerPanel" Value="1"/>
            <Setter Property="Offset" TargetName="PART_TimeRulerPanel" Value="{Binding VerticalOffset, RelativeSource={RelativeSource TemplatedParent}}"/>
            <Setter Property="Grid.Row" TargetName="GroupHeadersBorder" Value="0"/>
            <Setter Property="Grid.Column" TargetName="GroupHeadersBorder" Value="1"/>
            <Setter Property="Margin" TargetName="GroupHeadersBorder" Value="0,0,0,-1"/>
            <Setter Property="BorderBrush" TargetName="GroupHeadersBorder" Value="#FF83A5D2"/>
        </Trigger>
    </ControlTemplate.Triggers>
</ControlTemplate>
WHile attempting to modify the style of the Scheduleview component I followed the instructions for editing the template and binding to my UI.

After editing the copy now my scheduleview control does not show the view selections. The group with the date and time picker is shown but no day, week, month selection. If I unbind control to the template normal view selection is restored. I dont understand how to override this part of the control.

In my code I previousely had this in the xaml:
                        <telerik:DayViewDefinition DayStartTime="6:00:00" MinorTickLength="15min" MajorTickLength="1h"/>
                        <telerik:WeekViewDefinition DayStartTime="6:00:00" MinorTickLength="15min" MajorTickLength="1h"/>
This is still in the xaml.

I assumed that editing a copy would start from the same settings as default. What is the fix? I include the template as created by expression blend.

Dani
Telerik team
 answered on 18 Apr 2011
5 answers
607 views
Hi,

How to open a popup in a Gridview on click of button, in RowDetailsTemplet using MVVM pattern.
Maya
Telerik team
 answered on 18 Apr 2011
1 answer
228 views
Hello Telerik,
                       I have one clarification in radcombobox..
How to get Values when Focus is in RadcomboBox?
<telerik:RadComboBox IsEditable="True" Text="{Binding Path=District,Mode=TwoWay, UpdateSourceTrigger=LostFocus, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" Margin="103,5,33,0" Name="rcboDistrict" TabIndex="8" FontSize="11" IsDropDownOpen="False" Grid.Column="2" Grid.Row="1" VerticalAlignment="Top" Height="24" />
In XAML i am setting UpdateSourceTrigger=LostFocus..
if suppose focus is in Radcombobox and client will save the detail.That time radcombobox value not getting..

in this project i am using radmenu for displaying Save,Modify Items..If suppose Focus is in TextBox mean i am Updating manually from the following Code..
this.Dispatcher.BeginInvoke(new Action(() =>
            {
                  if (Keyboard.FocusedElement.GetType() == typeof(TextBox))
                  {
                     BindingExpression exprLastName = ((TextBox)Keyboard.FocusedElement).GetBindingExpression(TextBox.TextProperty);
                  exprLastName.UpdateSource();
             }
               //Implementation
 }));

My problem is i want to Update radComboBox also
The above code i am changing RadComboBox instead of TextBox..But its not working...
I find Debugging in runtime
KeyBoard.FocusedElement.GetType() value is PickerTextBox... But focus is in radComboBox

I don't know why pickerTextBox Comes instead of radcomboBox ?
How to update radCombobox value? any suggestions are more welcome...
(I know UpdateSourceTrigger=PropertyChanged .Here i don't want Bcoz i am doing validation in Business object level.
if suppose i am using Property changed each and every character its goes validation thats why i am avoiding..)
Pana
Telerik team
 answered on 18 Apr 2011
5 answers
281 views
Hello Telerik Team,
                              I have one problem in my WPF project.Let i explain in detail

In my UI contains three TextBoxes..
<Label Content="First _name:" HorizontalAlignment="Right" Margin="0,40,408,247" Target="{Binding ElementName=firstNameTxt}" />
        <TextBox Margin="101,40,101,247" Name="firstNameTxt" Text="{Binding Path=FirstName, ValidatesOnDataErrors=True, =LostFocus}"  />
        <Label Content="_Last name:" HorizontalAlignment="Right" Margin="0,72,408,216" Target="{Binding ElementName=lastNameTxt}" />
        <TextBox Margin="101,72,101,216" Name="lastNameTxt" Text="{Binding Path=LastName, ValidatesOnDataErrors=True, UpdateSourceTrigger=LostFocus}"  />
        <Label Content="E-_mail:" HorizontalAlignment="Right" Margin="0,104,408,184" Target="{Binding ElementName=emailTxt}" />
        <TextBox Margin="101,104,101,184" Name="emailTxt" Text="{Binding Path=Email, ValidatesOnDataErrors=True, UpdateSourceTrigger=LostFocus}" />
All are set into UpdateSourceTrigger=LostFocus;
and also i have standard menu bar
<Menu Height="23" Name="menu1" VerticalAlignment="Top">
            <MenuItem Header="File">
                <MenuItem Header="Save" Click="MenuItem_Click" />
            </MenuItem>
        </Menu>
The menu bar purpose is saving the details to database..
Every time after entered value in textbox atleast one time i change focus to another control then only
the values are updated.Problem is if i enter third Textbox value mean here i change focus to second textbox or first textbox then only Third box value updated.

Here i want to update third box value without changing focus to firstbox or second box.. 
so i make some codes in Codebehind it comes,
public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }
  
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            this.DataContext = Customer.CreateNewCustomer();
        }
  
        private void MenuItem_Click(object sender, RoutedEventArgs e)
        {
              
            if (Keyboard.FocusedElement.GetType() == typeof(TextBox))
            {
               BindingExpression exprLastName = ((TextBox)
                   Keyboard.FocusedElement).GetBindingExpression(TextBox.TextProperty);
               exprLastName.UpdateSource();
            }
            MessageBox.Show("Passed\n" +
                    ((Customer)this.DataContext).FirstName  + "\n" +
                    ((Customer)this.DataContext).LastName  + "\n" +
                    ((Customer)this.DataContext).Email);
         }
    }
The Binding expression binding value when still focus in third TextBox also...(not leaveing focus to other control)

after that i am clicking save in menuItem all values are comes correctly.Third value also updated.

After that i am changing standard menubar to RadMenu .
Here also i am doing same process.but its not return thid textbox value..

I realize where is the mistake comes from 
        if suppose i am using standard menu and the focus is in third textBox
that time i am clicking save means inside save method comes Keyboard.FocusElement=TextBox  (finding using debugging)

        same time if i am using Radmenu and the focus is in third textbox
that time i am clicking save means inside save method comes Keyboard.FocusElement=Save will come not TextBox..

I don't know why Telerik.wimdows.controls.Radmenu Header.save come instead of Textbox
can anybody give correct solution? 
     give me solution in detail..
Thank you.....
 
Pana
Telerik team
 answered on 18 Apr 2011
5 answers
175 views
Hi,

I'm trying to add context help to my application following the method described here
http://www.codeproject.com/Articles/36117/Easy-help-with-WPF.aspx

In the main window I'm using the RadDocking to host some children views. I'm following the standard procedures described in the RadDocking document, using DocumentHost, RadSplitContainer and RadPaneGroup.

When I start the app and press the F1 button without clicking anything else, I expect the mouse click to be originated from the main Window. But when I debug I found that the sender of the keyboard input is from a Telerik.Windows.Controls.RadDock.FakePopup.

I can't find any document regarding this class. And I have no idea what it is and why it took the keyboard focus by default after my app starts.

One thing for sure is, it's invisible.

The only solution is to click somewhere on my main window first to get the focus back to where it should be. Then my F1 works as normal.

Can anyone help with it? Why RadDocking brings a FakePopup in my app and set it on focus? Is it something to do with the floating mode of the dockable panes? Urgently waiting for answers. 

Many thanks!

P.S. I'm going to prepare a demo solution to showcase the point. But actually it's very easy to reproduce. You just need to enable the context help and add a normal RadDocking control in the main window, then put a break point at the HelpProvider's Execute method. During runtime, check the sender and you will see the FakePopup. 
Pana
Telerik team
 answered on 18 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?