Telerik Forums
UI for WPF Forum
1 answer
279 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
166 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
621 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
234 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
288 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
178 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
2 answers
210 views
Hello,
I'm facing an issue while filtering the loaded data using the inbuilt column filter. The specific error message I get is as follows:

System.Windows.Data Error: 8 : Cannot save value from target back to source. BindingExpression:Path=IsActive; DataItem='DistinctValueViewModel' (HashCode=49992105); target element is 'CheckBox' (Name=''); target property is 'IsChecked' (type 'Nullable`1') NullReferenceException:'System.NullReferenceException: Object reference not set to an instance of an object.

at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.ArrangeOverride(Size finalSize) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:line 1517

at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)

at System.Windows.UIElement.Arrange(Rect finalRect)

at System.Windows.ContextLayoutManager.UpdateLayout()

at System.Windows.UIElement.UpdateLayout()

at Telerik.Windows.Controls.GridView.GridViewDataControl.ItemsSourceChanged(Boolean sourceChanged) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 3157

at Telerik.Windows.Controls.GridView.GridViewDataControl.OnItemsChanged(NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 8052

at Telerik.Windows.Controls.GridView.BaseItemsControl.OnItemCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\ItemsControl\BaseItemsControl.cs:line 691

at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)

at Telerik.Windows.Data.DataItemCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\DataItemCollection.cs:line 653

at Telerik.Windows.Data.DataItemCollection.OnCollectionViewCollectionChanged(NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\DataItemCollection.cs:line 641

at Telerik.Windows.Data.DataItemCollection.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\DataItemCollection.cs:line 1034

at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\WeakEvents\WeakEvent.cs:line 32

at Telerik.Windows.Data.QueryableCollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:line 669

at Telerik.Windows.Data.QueryableCollectionView.RefreshOverride() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:line 818

at Telerik.Windows.Data.QueryableCollectionView.RefreshInternal() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:line 765

at Telerik.Windows.Data.QueryableCollectionView.RefreshOrDefer() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:line 759

at Telerik.Windows.Data.QueryableCollectionView.InvalidatePagingAndRefresh() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:line 384

at Telerik.Windows.Data.QueryableCollectionView.OnFilterDescriptorsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:line 419

at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)

at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)

at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\RadObservableCollection.cs:line 143

at Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\ObservableItemCollection.cs:line 91

at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)

at Telerik.Windows.Data.RadObservableCollection`1.InsertItem(Int32 index, T item) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\RadObservableCollection.cs:line 189

at System.Collections.ObjectModel.Collection`1.Insert(Int32 index, T item)

at System.Collections.ObjectModel.Collection`1.System.Collections.IList.Insert(Int32 index, Object value)

at Telerik.Windows.Data.CollectionHelper.Insert(IList target, IEnumerable newItems, Int32 startingIndex, IEqualityComparer itemComparer) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\CollectionHelper.cs:line 334

at Telerik.Windows.Data.ObservableCollectionManager.HandleCollectionChanged(IList sender, NotifyCollectionChangedEventArgs args) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\Synchronization\ObservableCollectionManager.cs:line 105

at Telerik.Windows.Data.ObservableCollectionManager.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs args) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\Synchronization\ObservableCollectionManager.cs:line 86

at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\WeakEvents\WeakEvent.cs:line 32

at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)

at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)

at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\RadObservableCollection.cs:line 143

at Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\ObservableItemCollection.cs:line 91

at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)

at Telerik.Windows.Data.RadObservableCollection`1.InsertItem(Int32 index, T item) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\RadObservableCollection.cs:line 189

at System.Collections.ObjectModel.Collection`1.Add(T item)

at Telerik.Windows.Controls.GridView.FilteringViewModel.OnPropertyChanged(Object sender, PropertyChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Filtering\FilteringViewModel.cs:line 541

at System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)

at Telerik.Windows.Controls.ViewModelBase.OnPropertyChanged(String propertyName) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\Common\ViewModelBase.cs:line 56

at Telerik.Windows.Controls.GridView.FilteringViewModel.Activate(IFilterDescriptor filter) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Filtering\FilteringViewModel.cs:line 589

at Telerik.Windows.Controls.GridView.FilteringViewModel.OnDistinctValuesItemChanged(Object sender, ItemChangedEventArgs`1 e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Filtering\FilteringViewModel.cs:line 558

at Telerik.Windows.Data.ObservableItemCollection`1.RaiseGenericItemChanged(ItemChangedEventArgs`1 e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\ObservableItemCollection.cs:line 69

at Telerik.Windows.Data.ObservableItemCollection`1.OnItemChanged(ItemChangedEventArgs`1 e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\ObservableItemCollection.cs:line 51

at Telerik.Windows.Data.ObservableItemCollection`1.OnItemPropertyChanged(Object sender, PropertyChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\ObservableItemCollection.cs:line 110

at System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)

at Telerik.Windows.Controls.ViewModelBase.OnPropertyChanged(String propertyName) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\Common\ViewModelBase.cs:line 56

at Telerik.Windows.Controls.GridView.DistinctValueViewModel.set_IsActive(Boolean value) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Filtering\DistinctValueViewModel.cs:line 27'

 

 


Can anyone help me out here? Please do let me know if any other information is required.
Sourav
Top achievements
Rank 1
 answered on 18 Apr 2011
4 answers
486 views
On the top  left corner there is a blank header cell above the row indicator columns. How do I style this?

Also I've managed to style the column header cells, but when I drag them into the grouped row the style changes back to the original blue. How do I apply styles to those little group labels?
Joshua
Top achievements
Rank 1
 answered on 18 Apr 2011
1 answer
316 views
Hi

I have a gridview binding from the databse , i added a select column and a progress bar (through Gridview Data column)
I managed to insert a telerik progress bar inside my gridview , Now i want when i press a button outside that grid , a loop is made on the selected rows and the progress bar of this selected cell is only changing value ,once the loop get to the next row , the previous row progress is 100% and the next row is to be processed and so on

How can i achieve that ?

Below is my Gridview

Thanks in advance


  </Grid>
            <telerik:RadGridView Name="mailGridView" Width="700" Height="250" ItemsSource="{Binding testingreturn}" RowIndicatorVisibility="Collapsed" IsReadOnly="False"
                                         
                                                     ShowColumnHeaders="True" ShowGroupPanel="False"
                                                    
                                                    
                                                     AutoGenerateColumns="False" CanUserInsertRows="False"
                                                     CanUserFreezeColumns="False" CanUserDeleteRows="False"
                                                     CanUserResizeColumns="False" CanUserReorderColumns="False"
                                                     SelectionMode="Extended" AllowDrop="False"
                                                     EnableColumnVirtualization="False"
                                                     EnableRowVirtualization="False" AreRowDetailsFrozen="True" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
                <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding From_Name}" Header="From" IsReadOnly="True" />
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Subject}" Header="Subject" IsReadOnly="True" />
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Email_Date}" Header="Sent Date" IsReadOnly="True" />
                    <telerik:GridViewSelectColumn />
                    <telerik:GridViewDataColumn>
                        <telerik:GridViewDataColumn.CellStyle>
                            <Style TargetType="telerik:GridViewCell">
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="telerik:GridViewCell">
                                            <telerik:RadProgressBar Name="progressBar"  Height="15" Width="50" DataContext="{Binding}"></telerik:RadProgressBar>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </telerik:GridViewDataColumn.CellStyle>
                    </telerik:GridViewDataColumn>
                </telerik:RadGridView.Columns>
            </telerik:RadGridView>
haytham hosny
Top achievements
Rank 1
 answered on 17 Apr 2011
0 answers
216 views
Hi Telerik Team,
    I have a scenario in my application as follows:
I have a two combo boxes. One ComboBox has Control Types(such as TextBox, RadButton, ...). If I select any Control Type, the corresponding Control Names which I used in my application will display in the second ComboBox.
(For your understanding purpose : I'm using two RadButtons namely Button1 and Button2 in my application. If I select RadButton in first ComboBox, the names "Button1" and "Button2" will display in the second ComboBox). It is done.

Similarly, I wanna get the MenuItem's Names I used under RadGridView. But it is not getting the MenuItems. Please kindly reply me how to acheive this.

The following is the code I've used to get the names of the selected control type:

 

Private

 

 

Sub GetControlNames(ByVal oControl As Object)
Try
    
If IsNothing(oControl) Then GoTo lable1

 

    Dim child As Object 
    
If oControl.GetType.Name = "String" Then GoTo lable1 
    For Each child In LogicalTreeHelper.GetChildren(oControl)

 

        If sSelectedControl = child.GetType.Name Then 
            
cmbControlsName.Items.Add(child.Name)

 

        End If 
        
GetControlNames(child)

 

    Next

 

 

 

lable1:

    Catch ex As Exception 
        
ShowMessage(ex.Message)

 

 

 

    End Try
End Sub

 

 

Note: I have the above said two ComboBoxes and a Frame in one Page and the Frame will load another page namely Page1 in it. The content of the Frame will be passed as the argument for the above function.

Here, I have used the Recursive function(well you know). When the RadGridView is passed as the argument of the function, it jumps to the label "lable1" from "For Each" statement. So, it means the RadGridView doesn't have children. Then, how can I get the MenuItem I've used under RadGridView. Please let me know the solution.

Thanks and Regards,
Azharshah H
Software Developer

azhar
Top achievements
Rank 1
 asked on 16 Apr 2011
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
Expander
Slider
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
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?