Telerik Forums
UI for WPF Forum
0 answers
106 views
Hi,

I am trying to lazy load a child grid that is embedded with a tab strip within the grid. I am unable to do it as I am unable to access the child grid object. I am also unable to do it using WPF binding. Please help as I have deadlines looming. Thanks.
Here is the xaml code.

Thanks.

<UserControl x:Class="CoE.VCS.WPF.Violations.Controls.SupervisorSearch"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:viewModels="clr-namespace:CoE.VCS.WPF.ViewModels"
             mc:Ignorable="d"
             SizeChanged="UserControl_SizeChanged" Loaded="UserControl_Loaded"
             d:DesignWidth="1200" d:DesignHeight="500">

    <UserControl.DataContext>
        <viewModels:SupervisorSearchViewModel />
    </UserControl.DataContext>
   
    <UserControl.Resources>
        <DataTemplate x:Key="TypeItemTemplate">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="{Binding Description}"/>
            </StackPanel>
        </DataTemplate>

        <DataTemplate x:Key="OfficerItemTemplate">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="{Binding OperatorId}"/>
                <TextBlock Text="{Binding OperatorLastName}"/>
                <TextBlock Text=", "/>
                <TextBlock Text="{Binding OperatorFirstName}"/>
            </StackPanel>
        </DataTemplate>
       
        <DataTemplate x:Key="SiteItemTemplate">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="{Binding SiteId}"/>
                <TextBlock Text="{Binding LocationDescription}"/>
            </StackPanel>
        </DataTemplate>

        <DataTemplate x:Key="ReviewerItemTemplate">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="{Binding UserName}"/>
            </StackPanel>
        </DataTemplate>
    </UserControl.Resources>

    <Grid x:Name="LayoutGrid">    
        <Grid.RowDefinitions >
            <RowDefinition Height="25" />
            <RowDefinition Height="180" />
            <RowDefinition Height="*" />
            <RowDefinition Height="55" />
        </Grid.RowDefinitions>

        <TextBlock Grid.Row="0" HorizontalAlignment="Center" Style="{StaticResource ImportantTextBlock}">Search for Violation</TextBlock>

        <Grid Grid.Column="0" Grid.Row="1" Name="SearchCriteria">
            <Grid.ColumnDefinitions >
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="350"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="200"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions >
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
           
            <Label Grid.Column="0" Grid.Row="0">Ticket Number:</Label>
            <Label Grid.Column="0" Grid.Row="1">License Plate:</Label>
            <Label Grid.Column="0" Grid.Row="2">First Name:</Label>
            <Label Grid.Column="0" Grid.Row="3">Last/Company Name:</Label>

            <TextBox Grid.Column="1" Grid.Row="0" Name="textBoxTicketNumber" ToolTip="Enter Ticket Number" HorizontalAlignment="Left" Width="100" />
            <TextBox Grid.Column="1" Grid.Row="1" Name="textBoxLicensePlate"  ToolTip="Enter License Plate" HorizontalAlignment="Left" Width="100" CharacterCasing="Upper" />
            <TextBox Grid.Column="1" Grid.Row="2" Name="textBoxFirstName" ToolTip="Enter First Name" />
            <TextBox Grid.Column="1" Grid.Row="3" Name="textBoxLastName" ToolTip="Enter Last Name or Company Name" />

            <Label Grid.Column="2" Grid.Row="0">Reviewer:</Label>
            <Label Grid.Column="2" Grid.Row="1">Site:</Label>
            <Label Grid.Column="2" Grid.Row="2">Officer:</Label>
            <Label Grid.Column="2" Grid.Row="3">Type:</Label>
           
            <telerik:RadComboBox Grid.Column="3" Grid.Row="0" Name="ReviewerComboBox" ItemTemplate="{StaticResource ReviewerItemTemplate}" />
            <telerik:RadComboBox Grid.Column="3" Grid.Row="1" Name="SiteComboBox" ItemTemplate="{StaticResource SiteItemTemplate}" />
            <telerik:RadComboBox Grid.Column="3" Grid.Row="2" Name="OfficerComboBox" ItemTemplate="{StaticResource OfficerItemTemplate}" />
            <telerik:RadComboBox Grid.Column="3" Grid.Row="3" Name="TypeComboBox" ItemTemplate="{StaticResource TypeItemTemplate}" />

            <Label Grid.Column="4" Grid.Row="0">Start Date:</Label>
            <Label Grid.Column="4" Grid.Row="1">End Date:</Label>

            <telerik:RadDateTimePicker Grid.Column="5" Grid.Row="0" Name="ViolationDateStart" InputMode="DatePicker" Margin="4"/>
            <telerik:RadDateTimePicker Grid.Column="5" Grid.Row="1" Name="ViolationDateEnd" InputMode="DatePicker" Margin="4"/>

            <StackPanel Grid.Column="1" Grid.Row="4" Name="SearchCommands" Grid.ColumnSpan="2" HorizontalAlignment="Left">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="160" />
                        <ColumnDefinition Width="160" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="50"/>
                    </Grid.RowDefinitions>
                    <telerik:RadButton Name="buttonSearch" Margin="6,6,15,6" Click="ButtonSearchClick" IsDefault="True" >
                        <TextBlock TextWrapping="Wrap" TextAlignment="Center">Search for Violations</TextBlock>
                    </telerik:RadButton>
                    <telerik:RadButton Name="buttonClear" Margin="151,6,28,6" Click="ButtonClearClick" Grid.ColumnSpan="2">
                        <TextBlock TextWrapping="Wrap" TextAlignment="Center">Clear Search</TextBlock>
                    </telerik:RadButton>
                </Grid>
            </StackPanel>
        </Grid>

        <telerik:RadGridView Grid.Column="0" Grid.Row="2"
                             x:Name="SearchResultsGrid"
                             RowLoaded="SearchResultsGrid_RowLoaded"
                             ScrollViewer.VerticalScrollBarVisibility ="Visible" 
                             RowIndicatorVisibility="Collapsed"
                             AutoGenerateColumns="False"
                             CanUserDeleteRows="False"
                             CanUserFreezeColumns="False"
                             CanUserInsertRows="False"
                             CanUserReorderColumns="False"
                             CanUserResizeColumns="False"
                             SelectionMode="Multiple" 
                             ShowGroupPanel="True"
                             ShowColumnHeaders="True"
                             SnapsToDevicePixels="True"
                             EnableRowVirtualization="True"
                             ItemsSource="{Binding Path=Results}"
                             Focusable="True"
                             IsReadOnly="True"
                             IsTabStop="False" RowDetailsVisibilityChanged="SearchResultsGrid_RowDetailsVisibilityChanged" RowIsExpandedChanged="SearchResultsGrid_RowIsExpandedChanged">
           
            <telerik:RadGridView.Columns>
                <telerik:GridViewToggleRowDetailsColumn />
                <telerik:GridViewDataColumn x:Name="TicketNumber" DataMemberBinding="{Binding Path=TicketNumber}" Header="Ticket Number"  Width="92" IsReadOnly="True" IsFilterable="False" />
                <telerik:GridViewDataColumn x:Name="FirstName"  DataMemberBinding="{Binding Path=FirstName}" Header="First Name" Width="100" IsReadOnly="True" />
                <telerik:GridViewDataColumn x:Name="LastName"  DataMemberBinding="{Binding Path=LastName}" Header="Last/Company Name" Width="150" IsReadOnly="True" />               
                <telerik:GridViewDataColumn x:Name="ViolationType" DataMemberBinding="{Binding Path=ViolationType}" Header="Violation Type" Width="125"  IsReadOnly="True" />
                <telerik:GridViewDataColumn x:Name="ViolationDateTime" DataMemberBinding="{Binding Path=ViolationDateTime}" DataFormatString="{} {0:dd-MMM-yyyy HH:mm}" Header="Violation Date/Time"  Width="145" IsReadOnly="True" />
                <telerik:GridViewDataColumn x:Name="State" DataMemberBinding="{Binding Path=ViolationState}" Header="Violation State" Width="120"  IsReadOnly="True" />
                <telerik:GridViewDataColumn x:Name="Officer" DataMemberBinding="{Binding Path=Officer}" Header="Officer" Width="110"  IsReadOnly="True" />
                <telerik:GridViewDataColumn x:Name="Site" DataMemberBinding="{Binding Path=Site}" Header="Site" Width="190"  IsReadOnly="True" />
            </telerik:RadGridView.Columns>
            <telerik:RadGridView.RowDetailsTemplate>
                <DataTemplate>
                    <telerik:RadTabControl BackgroundVisibility="Collapsed" x:Name="RadTabMain" Margin="8" VerticalAlignment="Center" Background="Transparent">
                        <telerik:RadTabItem Header="Details" Margin="0,0,0,0" Height="24">
                            <telerik:RadGridView x:Name="DetailsGrid" ItemsSource="{Binding Path=Details}" Height="300" RowIndicatorVisibility="Collapsed" AutoGenerateColumns="False"
               CanUserFreezeColumns="False" BorderThickness="0" CanUserResizeColumns="False"
               ShowGroupPanel="False" BorderBrush="{x:Null}"
               Margin="0" Width="744">
                                <telerik:RadGridView.Columns>
                                    <telerik:GridViewSelectColumn IsGroupable="False" />
                                    <telerik:GridViewDataColumn x:Name="TicketNumber" DataMemberBinding="{Binding Path=TicketNumber}" Header="Ticket Number"  Width="150" IsReadOnly="True" IsFilterable="False" />
                                    <telerik:GridViewDataColumn x:Name="ViolationType" DataMemberBinding="{Binding Path=ViolationType}" Header="Violation Type" Width="200"  IsReadOnly="True" />
                                    <telerik:GridViewDataColumn x:Name="ViolationDateTime" DataMemberBinding="{Binding Path=ViolationDateTime}" DataFormatString="{} {0:dd-MMM-yyyy HH:mm}" Header="Violation Date/Time"  Width="150" IsReadOnly="True" />
                                    <telerik:GridViewDataColumn x:Name="ViolationStatus" DataMemberBinding="{Binding Path=ViolationStatus}" Header="Violation Status" Width="200"  IsReadOnly="True" />
                                    <telerik:GridViewDataColumn x:Name="SiteId" DataMemberBinding="{Binding Path=SiteId}" Header="Site Id" Width="100"  IsReadOnly="True" />
                                    <telerik:GridViewDataColumn x:Name="FirstName"  DataMemberBinding="{Binding Path=FirstName}" Header="First Name" Width="200" IsReadOnly="True" />
                                    <telerik:GridViewDataColumn x:Name="LastName"  DataMemberBinding="{Binding Path=LastName}" Header="Last/Company Name" Width="300" IsReadOnly="True" />
                                    <telerik:GridViewDataColumn x:Name="SiteLocation"  DataMemberBinding="{Binding Path=SiteLocation}" Header="Site Location" Width="300" IsReadOnly="True" />
                                    <telerik:GridViewDataColumn x:Name="SpeedLimit"  DataMemberBinding="{Binding Path=SpeedLimit}" Header="Speed Limit" Width="80" IsReadOnly="True" />
                                    <telerik:GridViewDataColumn x:Name="SpeedThreshold"  DataMemberBinding="{Binding Path=SpeedThreshold}" Header="Speed Threshold" Width="80" IsReadOnly="True" />
                                    <telerik:GridViewDataColumn x:Name="CapturedSpeed"  DataMemberBinding="{Binding Path=CapturedSpeed}" Header="Captured Speed" Width="80" IsReadOnly="True" />
                                    <telerik:GridViewDataColumn x:Name="FineAmount"  DataMemberBinding="{Binding Path=FineAmount}" Header="Fine Amount" Width="80" IsReadOnly="True" />
                                    <telerik:GridViewDataColumn x:Name="CourtDate" DataMemberBinding="{Binding Path=CourtDate}" DataFormatString="{} {0:dd-MMM-yyyy HH:mm}" Header="Court Date" Width="80" IsReadOnly="True" />
                                    <telerik:GridViewDataColumn x:Name="IssueDate" DataMemberBinding="{Binding Path=IssueDate}" DataFormatString="{} {0:dd-MMM-yyyy HH:mm}" Header="Issue Date" Width="80" IsReadOnly="True" />
                                    <telerik:GridViewDataColumn x:Name="ModifiedDateTime" DataMemberBinding="{Binding Path=ModifiedDateTime}" DataFormatString="{} {0:dd-MMM-yyyy HH:mm}" Header="Modified Date/Time" Width="80" IsReadOnly="True" />
                                </telerik:RadGridView.Columns>
                            </telerik:RadGridView>
                        </telerik:RadTabItem>
                        <telerik:RadTabItem Header="History" Height="24">
                            <telerik:RadGridView x:Name="ReviewGrid" Height="300" ItemsSource="{Binding Path=Reviews}" RowIndicatorVisibility="Collapsed" AutoGenerateColumns="False"
               CanUserFreezeColumns="False" BorderThickness="0" CanUserResizeColumns="False"
               ShowGroupPanel="False" BorderBrush="{x:Null}"
               Margin="0" Width="744">
                                <telerik:RadGridView.Columns>
                                    <telerik:GridViewSelectColumn IsGroupable="False" />
                                    <telerik:GridViewDataColumn x:Name="ReviewResult" DataMemberBinding="{Binding Path=ReviewResult}" Header="Review Result"  Width="80" IsReadOnly="True" IsFilterable="False" />
                                    <telerik:GridViewDataColumn x:Name="ViolationStatusReviewTime" DataMemberBinding="{Binding Path=ViolationStatus}" Header="Violation Status" Width="200"  IsReadOnly="True" />
                                    <telerik:GridViewDataColumn x:Name="ReviewedBy" DataMemberBinding="{Binding Path=ReviewedBy}" Header="Reviewed By" Width="200"  IsReadOnly="True" />
                                    <telerik:GridViewDataColumn x:Name="ReviewedDateTime" DataMemberBinding="{Binding Path=ReviewedDateTime}" DataFormatString="{} {0:dd-MMM-yyyy HH:mm}" Header="Reviewed Date/Time" Width="80" IsReadOnly="True" />
                                    <telerik:GridViewDataColumn x:Name="PlateNumber" DataMemberBinding="{Binding Path=PlateNumber}" Header="Plate Number" Width="90"  IsReadOnly="True" />
                                    <telerik:GridViewDataColumn x:Name="Province" DataMemberBinding="{Binding Path=Province}" Header="Province" Width="70"  IsReadOnly="True" />
                                    <telerik:GridViewDataColumn x:Name="RejectionReasonCategory" DataMemberBinding="{Binding Path=RejectionReasonCategory}" Header="Rejection Reason Category" Width="120"  IsReadOnly="True" />
                                    <telerik:GridViewDataColumn x:Name="RejectionReason" DataMemberBinding="{Binding Path=RejectionReason}" Header="Rejection Reason" Width="120"  IsReadOnly="True" />
                                </telerik:RadGridView.Columns>
                            </telerik:RadGridView>
                        </telerik:RadTabItem>
                        <telerik:RadTabItem Header="Comments" Height="24">

                        </telerik:RadTabItem>
                        <telerik:RadTabItem Header="Actions" Height="24">

                        </telerik:RadTabItem>
                    </telerik:RadTabControl>
                </DataTemplate>
            </telerik:RadGridView.RowDetailsTemplate>
        </telerik:RadGridView>

        <StackPanel Grid.Column="0" Grid.Row="3" Name="ResultCommands">
            <Grid>
                <Grid.ColumnDefinitions >
                    <ColumnDefinition Width="146"/>
                    <ColumnDefinition Width="146"/>
                    <ColumnDefinition Width="146"/>
                    <ColumnDefinition Width="146"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="2*"/>                   
                </Grid.ColumnDefinitions>
            <Grid.RowDefinitions >
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <telerik:RadButton Grid.Column="0"  Margin="0, 6, 0, 6" Width="130" HorizontalAlignment="Left" Name="buttonView" Click="ButtonViewClick">
                <TextBlock TextWrapping="Wrap" TextAlignment="Center">View Selected Violations</TextBlock>
            </telerik:RadButton>
                <telerik:RadButton Grid.Column="1"  Margin="0, 6, 0, 6" Width="130" HorizontalAlignment="Left" Name="buttonCourtPackage" Click="ButtonCourtpackagesClick">
                    <TextBlock TextWrapping="Wrap" TextAlignment="Center">Prepare Court Packages</TextBlock>
                </telerik:RadButton>
                <telerik:RadButton Grid.Column="2"  Margin="0, 6, 0, 6" Width="130" HorizontalAlignment="Left" Name="buttonConvert" Click="ButtonConvertClick">
                    <TextBlock TextWrapping="Wrap" TextAlignment="Center">Convert</TextBlock>
                </telerik:RadButton>
                <telerik:RadButton Grid.Column="3"  Margin="0, 6, 0, 6" Width="130" HorizontalAlignment="Left" Name="buttonServeTicket" Click="ButtonServeClick">
                    <TextBlock TextWrapping="Wrap" TextAlignment="Center">Ticket Served</TextBlock>
                </telerik:RadButton>
                <TextBlock Grid.Column="4"  HorizontalAlignment="Right"  Height="21" Name="NumberOfViolationsFound" >Number of Violations found:</TextBlock>
                <TextBlock Grid.Column="5"  Name="NumberOfViolationsFoundTextBlock" Style="{StaticResource BoldTextBlock}" Margin="25, 6, 0, 6" HorizontalAlignment="Left"  Height="21"></TextBlock>
            </Grid>
        </StackPanel>
      
    </Grid>
</UserControl >

Manny
Top achievements
Rank 1
 asked on 29 Jul 2011
1 answer
237 views
i'm using the latest version of the WPF controls but it seems that the RTB wants to load an old version of the Telerik.Windows.Documents assembly.

{"Could not load file or assembly 'Telerik.Windows.Documents, Version=2011.1.419.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"Telerik.Windows.Documents, Version=2011.1.419.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7"}

I've examined my project's references and it appears to be referencing the correct version of the 2011.2 controls.

"Locating source for 'c:\TB\102\WPF_Scrum\Release_WPF_40\Sources\Development\Documents\UI\DocumentWebLayoutPresenter.cs'. Checksum: MD5 {e2 9a ab de 97 19 2a fe ba a7 ec a5 15 77 8f 5d}
The file 'c:\TB\102\WPF_Scrum\Release_WPF_40\Sources\Development\Documents\UI\DocumentWebLayoutPresenter.cs' does not exist.
Looking in script documents for 'c:\TB\102\WPF_Scrum\Release_WPF_40\Sources\Development\Documents\UI\DocumentWebLayoutPresenter.cs'...
Looking in the projects for 'c:\TB\102\WPF_Scrum\Release_WPF_40\Sources\Development\Documents\UI\DocumentWebLayoutPresenter.cs'.
The file was not found in a project.
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\crt\src\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\atl\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\'...
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: c:\TB\102\WPF_Scrum\Release_WPF_40\Sources\Development\Documents\UI\DocumentWebLayoutPresenter.cs.
The debugger could not locate the source file 'c:\TB\102\WPF_Scrum\Release_WPF_40\Sources\Development\Documents\UI\DocumentWebLayoutPresenter.cs'."

I'm using only the RTB on the control with HTML binding.

    <Reference Include="Telerik.Windows.Controls, Version=2011.2.712.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7" />
    <Reference Include="Telerik.Windows.Controls.Navigation, Version=2011.2.712.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7" />
    <Reference Include="Telerik.Windows.Data, Version=2011.2.712.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7" />
    <Reference Include="Telerik.Windows.Documents, Version=2011.2.712.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7" />
    <Reference Include="Telerik.Windows.Documents.FormatProviders.Html, Version=2011.2.712.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7" />

Any help would be greatly appreciated.

Regards,

John Hamilton

P.S. I had the Q1 trial installed previous to buying the Dev version. I did uninstall before I installed the latest build of dotnet 4.0's assemblies.
John
Top achievements
Rank 1
 answered on 28 Jul 2011
3 answers
164 views
I copied the code directly from the demo into my project for printing a grid.  It prints, and shows the headers and correct number of rows but does not show any cell text.  What could be wrong???  I was using the Windows7Theme but commented that out and had the same issue.  This is WPF 4.0, WPF Controls 2010.3.1314.40.  I know this is a few versions behind but the last time I checked the 2011 release it had a bug with the TabControl and Prism interaction that I do not have time to work around.

EDIT: I have upgraded my project to the latest WPF Controlss (2011 Q2) and now it works for all columns EXCEPT hyperlinks (or maybe its just related to columns with cell templates).  How can I get hyperlink/celltemplate columns to display?

<telerik:RadGridView.Columns>
  <telerik:GridViewDataColumn Header="Account Number" DataMemberBinding="{Binding AccountNumber}" ShowDistinctFilters="False" >
    <telerik:GridViewDataColumn.CellTemplate>
      <DataTemplate>
        <TextBlock><Hyperlink Command="{Binding DataContext.SelectCommand, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadGridView}}}" CommandParameter="{Binding}"><InlineUIContainer
                  <TextBlock Text="{Binding AccountNumber}"/>
              </InlineUIContainer></Hyperlink></TextBlock>
      </DataTemplate>
    </telerik:GridViewDataColumn.CellTemplate>
    <telerik:GridViewDataColumn.AggregateFunctions>
      <telerik:CountFunction Caption="Count:" />
    </telerik:GridViewDataColumn.AggregateFunctions>
  </telerik:GridViewDataColumn>
  <telerik:GridViewDataColumn Header="Account Name" DataMemberBinding="{Binding AccountName}" Width="*" ShowDistinctFilters="False"  FooterCellStyle="{StaticResource GridNoLinesFooterStyle}"/>
  <telerik:GridViewDataColumn Header="Association" DataMemberBinding="{Binding AssociationName}"  FooterCellStyle="{StaticResource GridNoLinesFooterStyle}"/>
  <telerik:GridViewDataColumn Header="Status" DataMemberBinding="{Binding AccountStatusName}"  FooterCellStyle="{StaticResource GridNoLinesFooterStyle}" />
</telerik:RadGridView.Columns>


Pavel Pavlov
Telerik team
 answered on 28 Jul 2011
1 answer
241 views
I am trying to import HTML with images into a RadRichTextBox using the LoadImageFromUrl event with the following code.  The import runs with no error, and the LoadImageFromUrl delegate was called the correct number of times.  At some point after the import, the app throws an exception.  What am I doing wrong?  Is there a code sample for importing HTML with bitmaps (that are stored in a byte array)?

==>Code<==
HtmlFormatProvider provider = new HtmlFormatProvider();
HtmlImportSettings settings = new HtmlImportSettings();
provider.ImportSettings = settings;
settings.LoadImageFromUrl += new EventHandler<LoadImageEventArgs>(LoadImageFromUrl);
editor.Document = provider.Import(HTML);

void LoadImageFromUrl(object sender, LoadImageEventArgs e)
{
    e.ImageElement.Init(
jpg_image_byte_array, "jpg");
}

==>Exception<==
   at System.Windows.Media.PixelFormat.CreatePixelFormatInfo()
   at System.Windows.Media.PixelFormat.get_InternalBitsPerPixel()
   at System.Windows.Media.Imaging.BitmapSource.GetClosestDUCEFormat(PixelFormat format, BitmapPalette palette)
   at System.Windows.Media.Imaging.BitmapSource.get_DUCECompatiblePtr()
   at System.Windows.Media.Imaging.BitmapSource.UpdateBitmapSourceResource(Channel channel, Boolean skipOnChannelCheck)
   at System.Windows.Media.Imaging.BitmapSource.AddRefOnChannelCore(Channel channel)
   at System.Windows.Media.Imaging.BitmapSource.System.Windows.Media.Composition.DUCE.IResource.AddRefOnChannel(Channel channel)
   at System.Windows.Media.RenderData.System.Windows.Media.Composition.DUCE.IResource.AddRefOnChannel(Channel channel)
   at System.Windows.UIElement.RenderContent(RenderContext ctx, Boolean isOnChannel)
   at System.Windows.Media.Visual.UpdateContent(RenderContext ctx, VisualProxyFlags flags, Boolean isOnChannel)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.UpdateChildren(RenderContext ctx, ResourceHandle handle)
   at System.Windows.Media.Visual.RenderRecursive(RenderContext ctx)
   at System.Windows.Media.Visual.Render(RenderContext ctx, UInt32 childIndex)
   at System.Windows.Media.CompositionTarget.Compile(Channel channel)
   at System.Windows.Media.CompositionTarget.System.Windows.Media.ICompositionTarget.Render(Boolean inResize, Channel channel)
   at System.Windows.Media.MediaContext.Render(ICompositionTarget resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
Ivailo Karamanolev
Telerik team
 answered on 28 Jul 2011
1 answer
171 views
Hi,

I want to apply liststyle of ul to none? after applying this, my indentation reset to 0

<ul start="1" style="list-style-type:none; ">

if i apply this:
<ul start="1" style="list-style-type:disc;>

it works fine, i don't want to see bullets in the text

Regards,
Faheem
Ivailo Karamanolev
Telerik team
 answered on 28 Jul 2011
6 answers
186 views
Hi, just wondering if you could help me out with an example that shows how to databind a WPF treeview to an

ObservableCollection

from an OpenAccess entity diagram. The sql db table simply contains two fields: WBSID (Guid) - PK, Name (varchar(50) &  WBSParentID (Guid).

Thanks Telerik. Al.
Alan
Top achievements
Rank 1
Iron
 answered on 28 Jul 2011
3 answers
167 views
Is it possible to do substring checks?
Our users are used to excel and vba formulas so if they could do something like...

Left(string,length<int>)
Right(string,length<int>)
Mid(string,start<int>,length<int>)

Example usage:
IF((Left(Column,3) = "ABC" OR Right(Column,3) = "DEF"),True,False)
Guru
Top achievements
Rank 2
 answered on 28 Jul 2011
1 answer
162 views

Hello

Is there indication to know when user clicks the Group Footers of the grid?

And then get the aggregation result of the grid?

Best regards

Ehud

Vanya Pavlova
Telerik team
 answered on 28 Jul 2011
1 answer
82 views

Hello

We have coded ui test in our application

And after we  download the new dlls RadControls_for_WPF40_2011_2_0712_Dev

We get this exception from the data pager and the application crash

In the old version of dlls 0427.40 this not happened

This the exception :

System.ArgumentNullException: Value cannot be null.

Parameter name: source

   at System.Linq.Enumerable.Where[TSource](IEnumerable`1 source, Func`2 predicate)

   at Telerik.Windows.Controls.Data.DataPager.DataPagerAutomationPeer.GetChildrenCore()

   at System.Windows.Automation.Peers.AutomationPeer.EnsureChildren()

   at System.Windows.Automation.Peers.AutomationPeer.UpdateChildrenInternal(Int32 invalidateLimit)

   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()

   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()

   at System.Windows.ContextLayoutManager.fireAutomationEvents()

   at System.Windows.ContextLayoutManager.UpdateLayout()

   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)

   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()

   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)

   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)

   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

What is the problem?

Best regards

Ehud

 

Ivan Ivanov
Telerik team
 answered on 28 Jul 2011
1 answer
1.2K+ views
Greetings-
I am trying to tailor a RadComboBox to look behave visually like our mock ups. I have achieved about 80% of what I am looking to do, but I could use some assistance with the last part...as I am not even sure it is possible to do.


I would like the foreground color or font face to be white on the combo box, but have the list below it be black. The reason is that we have a dark gradient for the RadComboBox style, but a white background for the dropdown list. Is there any way to achieve this through the new version of the controls in Expression Blend or through XAML?

I have pasted my XAML for MainWindow and AppResources so you can see where I am at thus far.

Your help would be much appreciated.
Regards...

<Window
    x:Class="Controls.MainWindow"
    x:Name="Window"
    Title="MainWindow"
    Width="640" Height="480">
 
    <Grid x:Name="LayoutRoot">
        <!--<telerik:RadGridView Style="{DynamicResource RadGridView}"></telerik:RadGridView-->
 
        <telerik:RadComboBox EmptyText="Please Select from List" Foreground="{DynamicResource ComboBoxText}" Height="25" Width="200" Style="{DynamicResource GreenComboBoxStyle}" FontWeight="Bold" Padding="5,0">
                <telerik:RadComboBoxItem Foreground="Black">Item One</telerik:RadComboBoxItem>
                <telerik:RadComboBoxItem Foreground="Black">Item Two</telerik:RadComboBoxItem>
                <telerik:RadComboBoxItem Foreground="Black">Item Three</telerik:RadComboBoxItem>
                <telerik:RadComboBoxItem Foreground="Black">Item Foure</telerik:RadComboBoxItem>
        </telerik:RadComboBox>
 
    </Grid>
</Window>
<ResourceDictionary
    xmlns:Telerik_Windows_Controls_Chromes="clr-namespace:Telerik.Windows.Controls.Chromes;assembly=Telerik.Windows.Controls">
     
    <LinearGradientBrush x:Key="GreenComboBox" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF2E7015" Offset="0"/>
        <GradientStop Color="#FF5EAD42" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="GreenComboBoxBorder" Color="#FFADADAD"/>
     
    <LinearGradientBrush x:Key="BlueGradientHeader" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF0387CE" Offset="0"/>
        <GradientStop Color="#FF95CDEB" Offset="1"/>
    </LinearGradientBrush>
 
     
    <Style x:Key="GreenComboBoxStyle" TargetType="{x:Type telerik:RadComboBox}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type telerik:RadComboBox}">
                    <Grid x:Name="VisualRoot">
                        <Border Background="{TemplateBinding Background}" CornerRadius="1" IsHitTestVisible="False"/>
                        <telerik:RadToggleButton x:Name="PART_DropDownButton" ClickMode="Press" IsTabStop="False" Margin="0" Padding="0">
                            <telerik:StyleManager.Theme>
                                <telerik:Office_BlackTheme/>
                            </telerik:StyleManager.Theme>
                            <telerik:RadToggleButton.Template>
                                <ControlTemplate TargetType="{x:Type telerik:RadToggleButton}">
                                    <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}"/>
                                </ControlTemplate>
                            </telerik:RadToggleButton.Template>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <Telerik_Windows_Controls_Chromes:ButtonChrome x:Name="GreenComboBox" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" CornerRadius="1" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsDropDownOpen}" RenderFocused="{TemplateBinding IsFocused}" RenderEnabled="{TemplateBinding IsEnabled}">
                                    <telerik:StyleManager.Theme>
                                        <telerik:Office_BlackTheme/>
                                    </telerik:StyleManager.Theme>
                                </Telerik_Windows_Controls_Chromes:ButtonChrome>
                                <ContentControl x:Name="DropDownIcon" Background="White" Grid.Column="1" Foreground="Black" IsTabStop="False">
                                    <ContentControl.Template>
                                        <ControlTemplate TargetType="{x:Type ContentControl}">
                                            <Grid Margin="5,0">
                                                <Path x:Name="BackgroundIcon" Data="M0,0L2,0 1,1z" Fill="{TemplateBinding Background}" Height="3" Margin="0,2,0,0" Stretch="Fill" Width="5"/>
                                                <Path x:Name="ForegroundIcon" Data="M0,0L2,0 1,1z" Fill="{TemplateBinding Foreground}" Height="3" Margin="0,1" Stretch="Fill" Width="5"/>
                                            </Grid>
                                        </ControlTemplate>
                                    </ContentControl.Template>
                                </ContentControl>
                                <ContentPresenter x:Name="Content" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" Content="{TemplateBinding SelectionBoxItem}" Grid.Column="0" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="False" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            </Grid>
                        </telerik:RadToggleButton>
                        <Popup x:Name="PART_Popup" AllowsTransparency="True" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="White" CornerRadius="1" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding MinDropDownWidth}">
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="*"/>
                                    </Grid.RowDefinitions>
                                    <telerik:RadButton x:Name="PART_ClearButton" Content="{TemplateBinding ClearSelectionButtonContent}" Margin="-1,-1,-1,0" Grid.Row="0" Visibility="{TemplateBinding ClearSelectionButtonVisibility}">
                                        <telerik:StyleManager.Theme>
                                            <telerik:Office_BlackTheme/>
                                        </telerik:StyleManager.Theme>
                                    </telerik:RadButton>
                                    <ScrollViewer x:Name="PART_ScrollViewer" BorderThickness="0" CanContentScroll="True" Padding="0,1,0,0" Grid.Row="1" VerticalScrollBarVisibility="Auto">
                                        <telerik:StyleManager.Theme>
                                            <telerik:Office_BlackTheme/>
                                        </telerik:StyleManager.Theme>
                                        <ItemsPresenter/>
                                    </ScrollViewer>
                                </Grid>
                            </Border>
                        </Popup>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" TargetName="Content" Value="0.5"/>
                            <Setter Property="Foreground" TargetName="DropDownIcon" Value="#FF8D8D8D"/>
                            <Setter Property="Background" TargetName="DropDownIcon" Value="White"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="True"/>
                                <Condition Property="IsMouseOver" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Foreground" TargetName="DropDownIcon" Value="Black"/>
                            <Setter Property="Background" TargetName="DropDownIcon" Value="White"/>
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="True"/>
                                <Condition Property="IsDropDownOpen" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Foreground" TargetName="DropDownIcon" Value="Black"/>
                            <Setter Property="Background" TargetName="DropDownIcon" Value="White"/>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="EditableTemplate">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type telerik:RadComboBox}">
                    <Grid x:Name="VisualRoot">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <Border x:Name="Background" Background="White" Grid.Column="0" CornerRadius="1,0,0,1" IsHitTestVisible="False"/>
                        <Border Background="{TemplateBinding Background}" Grid.ColumnSpan="2" CornerRadius="1" IsHitTestVisible="False"/>
                        <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" CornerRadius="1" IsHitTestVisible="False"/>
                        <Border x:Name="MouseOverVisual" BorderBrush="#FFFFC92B" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" CornerRadius="1" IsHitTestVisible="False" Opacity="0" Visibility="Collapsed"/>
                        <telerik:PickerTextBox x:Name="PART_EditableTextBox" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="0" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsReadOnly="{TemplateBinding IsReadOnly}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
                            <telerik:StyleManager.Theme>
                                <telerik:Office_BlackTheme/>
                            </telerik:StyleManager.Theme>
                        </telerik:PickerTextBox>
                        <Border x:Name="FocusVisual" BorderBrush="#FFFFC92B" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" CornerRadius="1" IsHitTestVisible="False" Visibility="Collapsed">
                            <Border BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0"/>
                        </Border>
                        <telerik:RadToggleButton x:Name="PART_DropDownButton" ClickMode="Press" Grid.Column="1" IsTabStop="False" Margin="0" Padding="0">
                            <telerik:StyleManager.Theme>
                                <telerik:Office_BlackTheme/>
                            </telerik:StyleManager.Theme>
                            <telerik:RadToggleButton.Template>
                                <ControlTemplate TargetType="{x:Type telerik:RadToggleButton}">
                                    <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}"/>
                                </ControlTemplate>
                            </telerik:RadToggleButton.Template>
                            <Grid>
                                <Telerik_Windows_Controls_Chromes:ButtonChrome x:Name="GreenComboBox" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0,1,1,0" RenderMouseOver="{Binding IsMouseOver, ElementName=PART_DropDownButton}" RenderPressed="{TemplateBinding IsDropDownOpen}" RenderFocused="{TemplateBinding IsKeyboardFocusWithin}" RenderActive="{TemplateBinding IsMouseOver}" RenderEnabled="{TemplateBinding IsEnabled}">
                                    <telerik:StyleManager.Theme>
                                        <telerik:Office_BlackTheme/>
                                    </telerik:StyleManager.Theme>
                                </Telerik_Windows_Controls_Chromes:ButtonChrome>
                                <ContentControl x:Name="DropDownIcon" Background="White" Grid.Column="1" Foreground="Black" IsTabStop="False">
                                    <ContentControl.Template>
                                        <ControlTemplate TargetType="{x:Type ContentControl}">
                                            <Grid Margin="5,0">
                                                <Path x:Name="BackgroundIcon" Data="M0,0L2,0 1,1z" Fill="{TemplateBinding Background}" Height="3" Margin="0,2,0,0" Stretch="Fill" Width="5"/>
                                                <Path x:Name="ForegroundIcon" Data="M0,0L2,0 1,1z" Fill="{TemplateBinding Foreground}" Height="3" Margin="0,1" Stretch="Fill" Width="5"/>
                                            </Grid>
                                        </ControlTemplate>
                                    </ContentControl.Template>
                                </ContentControl>
                            </Grid>
                        </telerik:RadToggleButton>
                        <TextBlock x:Name="Watermark" HorizontalAlignment="Left" IsHitTestVisible="False" Margin="5,0,0,0" Opacity="0.5" Text="{TemplateBinding EmptyText}" Visibility="Collapsed" VerticalAlignment="Center"/>
                        <Popup x:Name="PART_Popup" AllowsTransparency="True" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="White" CornerRadius="1" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding MinDropDownWidth}">
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="*"/>
                                    </Grid.RowDefinitions>
                                    <telerik:RadButton x:Name="PART_ClearButton" Content="{TemplateBinding ClearSelectionButtonContent}" Margin="-1,-1,-1,0" Grid.Row="0" Visibility="{TemplateBinding ClearSelectionButtonVisibility}">
                                        <telerik:StyleManager.Theme>
                                            <telerik:Office_BlackTheme/>
                                        </telerik:StyleManager.Theme>
                                    </telerik:RadButton>
                                    <ScrollViewer x:Name="PART_ScrollViewer" BorderThickness="0" CanContentScroll="True" Padding="0,1,0,0" Grid.Row="1" VerticalScrollBarVisibility="Auto">
                                        <telerik:StyleManager.Theme>
                                            <telerik:Office_BlackTheme/>
                                        </telerik:StyleManager.Theme>
                                        <ItemsPresenter/>
                                    </ScrollViewer>
                                </Grid>
                            </Border>
                        </Popup>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="BorderBrush" TargetName="Border" Value="#FF989898"/>
                            <Setter Property="Foreground" TargetName="PART_EditableTextBox" Value="#FF8D8D8D"/>
                            <Setter Property="Foreground" TargetName="DropDownIcon" Value="#FF8D8D8D"/>
                            <Setter Property="Background" TargetName="DropDownIcon" Value="White"/>
                            <Setter Property="BorderBrush" TargetName="Border" Value="#FF989898"/>
                            <Setter Property="Background" TargetName="Background" Value="#FFE0E0E0"/>
                        </Trigger>
                        <Trigger Property="IsWatermarkVisible" Value="True">
                            <Setter Property="Visibility" TargetName="Watermark" Value="Visible"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="True"/>
                                <Condition Property="IsMouseOver" Value="True"/>
                            </MultiTrigger.Conditions>
                            <MultiTrigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisual">
                                            <LinearDoubleKeyFrame KeyTime="0:0:0.115" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="MouseOverVisual">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </BeginStoryboard>
                            </MultiTrigger.EnterActions>
                            <MultiTrigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisual">
                                            <LinearDoubleKeyFrame KeyTime="0:0:0.15" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="MouseOverVisual">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0.15">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </BeginStoryboard>
                            </MultiTrigger.ExitActions>
                            <Setter Property="Foreground" TargetName="DropDownIcon" Value="Black"/>
                            <Setter Property="Background" TargetName="DropDownIcon" Value="White"/>
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="True"/>
                                <Condition Property="IsDropDownOpen" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="BorderBrush" TargetName="Border">
                                <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="Foreground" TargetName="DropDownIcon" Value="Black"/>
                            <Setter Property="Background" TargetName="DropDownIcon" Value="White"/>
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                                <Condition Property="IsDropDownOpen" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Visibility" TargetName="FocusVisual" Value="Visible"/>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="NonEditableTemplate">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type telerik:RadComboBox}">
                    <Grid x:Name="VisualRoot">
                        <Border Background="{TemplateBinding Background}" CornerRadius="1" IsHitTestVisible="False"/>
                        <telerik:RadToggleButton x:Name="PART_DropDownButton" ClickMode="Press" IsTabStop="False" Margin="0" Padding="0" Background="{DynamicResource GreenComboBox}">
                            <telerik:StyleManager.Theme>
                                <telerik:Office_BlackTheme/>
                            </telerik:StyleManager.Theme>
                            <telerik:RadToggleButton.Template>
                                <ControlTemplate TargetType="{x:Type telerik:RadToggleButton}">
                                    <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}"/>
                                </ControlTemplate>
                            </telerik:RadToggleButton.Template>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <Telerik_Windows_Controls_Chromes:ButtonChrome x:Name="GreenComboBox" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" CornerRadius="1" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsDropDownOpen}" RenderFocused="{TemplateBinding IsFocused}" RenderEnabled="{TemplateBinding IsEnabled}" Background="{DynamicResource GreenComboBox}">
                                    <telerik:StyleManager.Theme>
                                        <telerik:Office_BlackTheme/>
                                    </telerik:StyleManager.Theme>
                                </Telerik_Windows_Controls_Chromes:ButtonChrome>
                                <ContentControl x:Name="DropDownIcon" Background="White" Grid.Column="1" Foreground="Black" IsTabStop="False">
                                    <ContentControl.Template>
                                        <ControlTemplate TargetType="{x:Type ContentControl}">
                                            <Grid Margin="5,0">
                                                <Path x:Name="BackgroundIcon" Data="M0,0L2,0 1,1z" Fill="{TemplateBinding Background}" Height="3" Margin="0,2,0,0" Stretch="Fill" Width="5"/>
                                                <Path x:Name="ForegroundIcon" Data="M0,0L2,0 1,1z" Fill="{TemplateBinding Foreground}" Height="3" Margin="0,1" Stretch="Fill" Width="5"/>
                                            </Grid>
                                        </ControlTemplate>
                                    </ContentControl.Template>
                                </ContentControl>
                                <ContentPresenter x:Name="Content" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" Content="{TemplateBinding SelectionBoxItem}" Grid.Column="0" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="False" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            </Grid>
                        </telerik:RadToggleButton>
                        <Popup x:Name="PART_Popup" AllowsTransparency="True" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="White" CornerRadius="1" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding MinDropDownWidth}">
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="*"/>
                                    </Grid.RowDefinitions>
                                    <telerik:RadButton x:Name="PART_ClearButton" Content="{TemplateBinding ClearSelectionButtonContent}" Margin="-1,-1,-1,0" Grid.Row="0" Visibility="{TemplateBinding ClearSelectionButtonVisibility}" Background="{DynamicResource GreenComboBox}">
                                        <telerik:StyleManager.Theme>
                                            <telerik:Office_BlackTheme/>
                                        </telerik:StyleManager.Theme>
                                    </telerik:RadButton>
                                    <ScrollViewer x:Name="PART_ScrollViewer" BorderThickness="0" CanContentScroll="True" Padding="0,1,0,0" Grid.Row="1" VerticalScrollBarVisibility="Auto">
                                        <telerik:StyleManager.Theme>
                                            <telerik:Office_BlackTheme/>
                                        </telerik:StyleManager.Theme>
                                        <ItemsPresenter/>
                                    </ScrollViewer>
                                </Grid>
                            </Border>
                        </Popup>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" TargetName="Content" Value="0.5"/>
                            <Setter Property="Foreground" TargetName="DropDownIcon" Value="#FF8D8D8D"/>
                            <Setter Property="Background" TargetName="DropDownIcon" Value="White"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="True"/>
                                <Condition Property="IsMouseOver" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Foreground" TargetName="DropDownIcon" Value="Black"/>
                            <Setter Property="Background" TargetName="DropDownIcon" Value="White"/>
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="True"/>
                                <Condition Property="IsDropDownOpen" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Foreground" TargetName="DropDownIcon" Value="Black"/>
                            <Setter Property="Background" TargetName="DropDownIcon" Value="White"/>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="MinHeight" Value="22"/>
        <Setter Property="Padding" Value="4,0"/>
        <Setter Property="Foreground" Value="Black"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="#FFADADAD"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    </Style>
     
     
    <Style x:Key="RadGridView" TargetType="{x:Type telerik:RadGridView}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type telerik:RadGridView}">
                    <AdornerDecorator>
                        <Border x:Name="PART_MasterGridContainer" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
                            <Grid x:Name="HierrarchyBackground" Background="{TemplateBinding Background}">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition/>
                                    <ColumnDefinition x:Name="ScrollBarColumn" MinWidth="0" Width="0"/>
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition x:Name="PART_AttachedBehaviorRow" Height="Auto"/>
                                    <RowDefinition/>
                                    <RowDefinition x:Name="ScrollBarRow" Height="0" MinHeight="0"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <telerik:GridViewGroupPanel x:Name="PART_GroupPanel" BorderBrush="#FF848484" Background="{DynamicResource GreenComboBox}" Grid.ColumnSpan="2" Foreground="White" IsTabStop="False" Grid.Row="0" FontSize="14" FontFamily="Segoe UI">
                                    <telerik:StyleManager.Theme>
                                        <telerik:Office_BlackTheme/>
                                    </telerik:StyleManager.Theme>
                                </telerik:GridViewGroupPanel>
                                <telerik:GridViewScrollViewer x:Name="PART_ItemsScrollViewer" Background="Transparent" CanContentScroll="True" Grid.ColumnSpan="2" Grid.Row="2" Grid.RowSpan="2" Style="{DynamicResource GridViewScrollViewerStyle}">
                                    <telerik:GridViewScrollViewer.FooterRow>
                                        <telerik:GridViewFooterRow x:Name="PART_FooterRow" IsTabStop="False" IndentLevel="{TemplateBinding GroupCount}">
                                            <telerik:StyleManager.Theme>
                                                <telerik:Office_BlackTheme/>
                                            </telerik:StyleManager.Theme>
                                        </telerik:GridViewFooterRow>
                                    </telerik:GridViewScrollViewer.FooterRow>
                                    <telerik:GridViewScrollViewer.HeaderRow>
                                        <telerik:GridViewHeaderRow x:Name="PART_HeaderRow" IsTabStop="False" IndentLevel="{TemplateBinding GroupCount}" Background="{DynamicResource BlueGradientHeader}">
                                        </telerik:GridViewHeaderRow>
                                    </telerik:GridViewScrollViewer.HeaderRow>
                                    <telerik:GridViewScrollViewer.NewRow>
                                        <telerik:GridViewNewRow x:Name="PART_AddNewRow" IsTabStop="False" IndentLevel="{TemplateBinding GroupCount}" Visibility="Collapsed">
                                            <telerik:StyleManager.Theme>
                                                <telerik:Office_BlackTheme/>
                                            </telerik:StyleManager.Theme>
                                        </telerik:GridViewNewRow>
                                    </telerik:GridViewScrollViewer.NewRow>
 
                                    <telerik:GridViewVirtualizingPanel x:Name="PART_GridViewVirtualizingPanel"/>
                                </telerik:GridViewScrollViewer>
                                <telerik:ScrollPositionIndicator x:Name="PART_ScrollPositionIndicator" Grid.ColumnSpan="2" ContentTemplate="{TemplateBinding ScrollPositionIndicatorTemplate}" HorizontalAlignment="Right" IsHitTestVisible="False" IsTabStop="False" Margin="0,0,28,0" Grid.Row="2">
 
                                    <telerik:ScrollPositionIndicator.Visibility>
                                        <Binding Mode="TwoWay" Path="IsScrolling" RelativeSource="{RelativeSource TemplatedParent}">
                                            <Binding.Converter>
                                                <telerik:BooleanToVisibilityConverter/>
                                            </Binding.Converter>
                                        </Binding>
                                    </telerik:ScrollPositionIndicator.Visibility>
                                </telerik:ScrollPositionIndicator>
                                <Border x:Name="PART_FrozenColumnsPreview" Background="#33000000" HorizontalAlignment="Left" Grid.Row="1" Grid.RowSpan="4" Visibility="Collapsed" VerticalAlignment="Stretch" Width="6"/>
                                <telerik:GridViewLoadingIndicator x:Name="PART_GridViewLoadingIndicator" Grid.ColumnSpan="2" IsTabStop="False" Grid.RowSpan="4" Visibility="Collapsed">
                                    <telerik:StyleManager.Theme>
                                        <telerik:Office_BlackTheme/>
                                    </telerik:StyleManager.Theme>
                                </telerik:GridViewLoadingIndicator>
                            </Grid>
                        </Border>
                    </AdornerDecorator>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsBusy" Value="True">
                            <Setter Property="Visibility" TargetName="PART_GridViewLoadingIndicator" Value="Visible"/>
                        </Trigger>
                        <Trigger Property="IsBusy" Value="False">
                            <Setter Property="Visibility" TargetName="PART_GridViewLoadingIndicator" Value="Collapsed"/>
                        </Trigger>
                        <Trigger Property="ShowColumnFooters" Value="False">
                            <Setter Property="Visibility" TargetName="PART_FooterRow" Value="Collapsed"/>
                        </Trigger>
                        <Trigger Property="ShowColumnHeaders" Value="False">
                            <Setter Property="Visibility" TargetName="PART_HeaderRow" Value="Collapsed"/>
                        </Trigger>
                        <Trigger Property="ShowGroupPanel" Value="False">
                            <Setter Property="Visibility" TargetName="PART_GroupPanel" Value="Collapsed"/>
                        </Trigger>
                        <Trigger Property="ComputedVerticalScrollBarVisibility" SourceName="PART_ItemsScrollViewer" Value="Collapsed">
                            <Setter Property="Width" TargetName="ScrollBarColumn" Value="0"/>
                        </Trigger>
                        <Trigger Property="ComputedHorizontalScrollBarVisibility" SourceName="PART_ItemsScrollViewer" Value="Collapsed">
                            <Setter Property="Height" TargetName="ScrollBarRow" Value="0"/>
                            <Setter Property="Grid.RowSpan" TargetName="PART_ItemsScrollViewer" Value="1"/>
                        </Trigger>
                        <Trigger Property="ShowInsertRow" Value="True">
                            <Setter Property="Visibility" TargetName="PART_AddNewRow" Value="Visible"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Background" Value="White"/>
        <Setter Property="BorderBrush" Value="#FF848484"/>
        <Setter Property="Foreground" Value="Black"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="AlternateRowBackground" Value="#FFF4F4F4"/>
        <Setter Property="VerticalGridLinesBrush" Value="#FFCBCBCB"/>
        <Setter Property="HorizontalGridLinesBrush" Value="#FFCBCBCB"/>
        <Setter Property="GroupPanelBackground">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFDFDFDF" Offset="1"/>
                    <GradientStop Color="#FFBABABA"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="GroupPanelForeground" Value="Black"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style x:Key="GridViewScrollViewerStyle" TargetType="{x:Type telerik:GridViewScrollViewer}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type telerik:GridViewScrollViewer}">
                    <Grid x:Name="PART_RootPanel" Background="{TemplateBinding Background}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Grid.Row="2"/>
                        <ScrollBar x:Name="PART_VerticalScrollBar" BorderThickness="1,0,0,0" Grid.Column="1" IsTabStop="False" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Orientation="Vertical" Grid.Row="0" Grid.RowSpan="4" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}">
                            <telerik:StyleManager.Theme>
                                <telerik:Office_BlackTheme/>
                            </telerik:StyleManager.Theme>
                        </ScrollBar>
                        <ScrollBar x:Name="PART_HorizontalScrollBar" BorderThickness="0,1,0,0" Grid.Column="0" IsTabStop="False" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" Orientation="Horizontal" Grid.Row="4" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}">
                            <telerik:StyleManager.Theme>
                                <telerik:Office_BlackTheme/>
                            </telerik:StyleManager.Theme>
                        </ScrollBar>
                        <Rectangle Grid.Column="1" Grid.Row="4">
                            <Rectangle.Fill>
                                <RadialGradientBrush Center="0,0" GradientOrigin="0,0" RadiusY="1" RadiusX="1">
                                    <GradientStop Color="#FF848484" Offset="0.066"/>
                                    <GradientStop Color="#FFBFBFBF" Offset="0.066"/>
                                    <GradientStop Color="#FFF0F0F0" Offset="0.29"/>
                                </RadialGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <SolidColorBrush x:Key="ComboBoxText" Color="White"/>
</ResourceDictionary>
Dani
Telerik team
 answered on 28 Jul 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
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?