Telerik Forums
UI for WPF Forum
9 answers
178 views
I have a Telerik GridView inside a UserControl that's contained in a document panel in a composite WPF application. When I first bring the view into place, I programatically add a default selected item by calling SelectedItems.Add(item) and everything works fine. Once I give another document tab focus in the application, I notice the Unloaded event fires on the Telerik grid. When I return to that view (give the tab focus), the SelectedItems collection does not respond to method calls such as .Clear() or .Add(). No exception is thrown, but nothing happens either. For example, if there are 3 items in the SelectedItems collection and I call .Clear() on it, in the debugger, I inspect the collection only to find it still has the same 3 items in it. 

My question is, what makes SelectedItems stop responding to changes? Is it the fact that somehow the Unloaded event is fired, or is that just a coincedence? I've tried creating the grid in a simple standalone application, but the SelectedItems collection always responds to changes. I can't help but think this is causes by by the underlying FrameworkElement being unloaded. 
Dimitrina
Telerik team
 answered on 05 Jul 2013
5 answers
968 views
Hi!

I have a dataTable and one of its columns is a image (bitmap) column .
I've been trying to  show this images in my GridView by binding it to GridViewImageColumn but I don't get it. 

I read that GridViewImageColumn accepts byte[] and string types so I tryed to use this methods to convert the bitmaps and then put the result in other column and try to bind it to the  GridViewImageColumn: 

Public Shared Function BmpToByte(ByVal _bitmap As System.Drawing.Bitmap) As Byte()
    Dim _ms As New Global.System.IO.MemoryStream()
    _bitmap.Save(_ms, System.Drawing.Imaging.ImageFormat.Bmp)
    Dim _bmpArray As Byte()
    _bmpArray = _ms.ToArray()
    _ms.Flush()
    _ms.Dispose()
    Return _bmpArray
End Function



Public Function BitmapToString(ByVal bImage As Bitmap) As String
    Try
        Dim data As String
        Dim ms As New Global.System.IO.MemoryStream()
        bImage.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp)
        Dim _bmpArray As Byte()
 
        data = Convert.ToBase64String(ms.ToArray())
        Return data
    Catch ex As Exception
        Return String.Empty
    End Try
End Function


The column in my gridView is still empty.....

I've tryed this code:

<telerik:GridViewImageColumn DataMemberBinding="{Binding Logo}" Header="Logo"/>


And this:


<telerik:GridViewDataColumn DataMemberBinding="{Binding Logo}" Header="Logo">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <Image Height="30" Width="30" Source="{Binding Logo}"></Image>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>


I would really appreciate any help....



Yoan
Telerik team
 answered on 05 Jul 2013
3 answers
137 views
I'm looking for a command button in WPF, but it doesn't appear as if there is one.

I would like my command buttons' styling to match the other Telerik controls in the window. Would I be better off trying to match the style with the standard Visual Studio WPF command button or the Telerik WinForms Command Button?


Pavel R. Pavlov
Telerik team
 answered on 05 Jul 2013
5 answers
323 views
Hello,
I am building an application that plots points taken from the USB COM port, into C#, then i want to display these data, it reads a sample every 4 ms, the Y-axis is the value read, and the X-axis is the time.
Can it be done using your Grid View/ Live data control ? 
And is there a better control that i am not baying attention to ?
Any help is appreciated, 

Thanks in advance.
Regards,
Nada.
Nikolay
Telerik team
 answered on 05 Jul 2013
3 answers
88 views
I'm working on a project(appointment scheduler and clinic management system) for several months now using WPF Telerik controls and OpenAccess ORM.
But I have no idea how use RadScheduleView and OpenAccess ORM.
I really need an example which demonstrates how to use these two tools together.
Yana ,Kalin and  the other Telerik guys , please Help ..
Thanks in advance
hiwa
Hiwa
Top achievements
Rank 2
 answered on 04 Jul 2013
1 answer
329 views
When I used Telerik WPF VS Extension to convert my project to Telerik WPF project there was a check box to 'Add referenced assemblies' to project.

When I checked that and chose the few assemblies I needed in my project, I discoverd that ALL the Telerik WPF assemblies have been copied to ...\lib\RCWPF\2013.2.611.40, not just the referenced assemblies as the check box stated. Also ALL the language assemblies were copied as well eventhough I do not intend to use localization.

When I build my solution now only the assemblies I referenced are copied to bin/Debug folders so why did the WPF VS Extenstion copy ALL the WPF assemblies to my solution and can I just waste my time tracking down assemblies I do not need and delete them?

Also, all the localization assemblies are copied to bin/Debug eventhoug I do not need them... why is that and how do I get rid of localization assemblies? Can I just delete them?
Petar
Telerik team
 answered on 04 Jul 2013
3 answers
134 views
Are there plans to implement animations for the WPF TileList control as has been done with the AJAX TileList control? If this has already been implemented, I can't seem to find the documentation on it.
Maya
Telerik team
 answered on 04 Jul 2013
6 answers
370 views
Hi  all,

I use GridView + DataPager with QueryableCollectionView , mainly do CURD operations, everything worked well but add new item.
Please note I assign IQueryable source to QueryableCollectionView for solving huge data performance issue.  When I call gridVIew's BeginInsert();  , one new row will be shown in first row of GridView.  That's fine, but there are some questions. 

1. The insert row will disappear if I click another row(With setting ActionOnLostFocus = ActionOnLostFocus.None),   I cannot find it in grid view any more. because I have added it to EF ObjectContext, so if I do this once and then SaveChanges() , the two entries will be inserted into database! 
I have used AddingNewDataItem Event , but I still can not find the new item in QueryableCollectionView and GridView.Items

 public void AddingNewDataItem(object sender, GridViewAddingNewEventArgs e)
        {
            var entity = copyItem ?? new TOrginal();
            copyItem = null;
            IntializeNewItem(entity);

            var model = new TModel { Model = entity };
            CurrentItem = model;
            e.NewObject = model;
           // AddModelToCollection(e, model);

            if (CheckItemIsNew(CurrentItem)) return;
            CommonManager.Add(entity);
        }

next..I also try to insert Item into QueryableCollectionView directly, the gridview even do not show new item..

So I only can do delete it from EF context when CurrentItem change...

2. How to make Insert Row always visible when Adding new Row and Click other rows of this grid.??? 

Can you please give me some hint? It driven me crazy.

If you cannot solve this, can you please give me one solution for big data and CURD mechanism. 

Dimitrina
Telerik team
 answered on 04 Jul 2013
2 answers
135 views
Hi there,

I followed this discussion and link to get the styled validation running and it's almost there, there's just one (well, maybe two) issue(s) I can't really put my finger on right now.

The style used is taken from the thread above, verbatim.

First is too 'eager' styling after INotifyDataErrorInfo completes (since I'm using INotifyDataErrorInfo to validate each row's view model - so effectively all cells - in the intercepted 'RowEditEnded' event) , here's a reference picture and here's one after row view model validation . failed. Notice how all rows are lit up? None of them have the sliding popup on the exclamation marker, nor the popup with error, so I bet it's an easy style fix, but right now I don't have the time to explore it on my own, so I'm asking at the source.

[EDIT]: Peculiar thing, it seems to happen only on the first validation, then it works as expected.

Other thing is this errors marker, since the validation returns a List<string>, how could I easily customize this template to either not show the pop-up at all or show the error list?





TechInsights
Top achievements
Rank 1
 answered on 04 Jul 2013
1 answer
385 views
Hi !

We try to make an autocompletebox where some of the items could be disabled individually.

We first try to make a BoxesItemTemplate but the item’s “little cross” which delete the selected items from the list where not in there.

So we decided to make a Style/template for the complete “autocompletebox”.
In this style we define the item container style in order not to have the "little cross":

<telerik1:AutoCompleteBoxesItemsControl.ItemContainerStyle>
  <Style TargetType="{x:Type telerik1:RadAutoCompleteBoxItem}">
     <Setter Property="Template">
         <Setter.Value>
            <ControlTemplate TargetType="{x:Type telerik1:RadAutoCompleteBoxItem}">
                <Border CornerRadius="1" x:Name="Bd" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding                         BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
                   <StackPanel Orientation="Horizontal">
                     <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding                       VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                                                 
                    </StackPanel>
                </Border>
           </ControlTemplate>
        </Setter.Value>
    </Setter>
  </Style>
</telerik1:AutoCompleteBoxesItemsControl.ItemContainerStyle>
And we did a BoxesItemTemplate in which we put a button for the "little cross" that should delete the item when pressed. But then we were enabled to bind to the delete command (the command that delete the item).
On our button we try some things like :
Command="telerik:RadAutoCompleteBoxCommands.RemoveItem"
But it does not work. I suppose we do not give the write arguments (perhaps the "item" as parametter)

Do you have any solution?

FOR INFORMATION:
The AutoCompleteBox object:
<telerik1:RadAutoCompleteBox Grid.Row="0"
                                    x:Name="RadAutoCompleteBox" Height="30" Margin="5"
                                    TextSearchPath="SearchString"
                                    TextSearchMode="Contains"
                                    AutoCompleteMode="Suggest"
                                    DropDownItemTemplate="{StaticResource CustomDropDownItemTemplate}"
                                    SearchTextChanged="RadAutoCompleteBox_OnSearchTextChanged" Style="{DynamicResource RadAutoCompleteBoxGinkgoStyle}"
                                    >
 
            <telerik1:RadAutoCompleteBox.BoxesItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding DisplayString}"/>
                        <Button Width="10" Height="10" Margin="3,0,0,0" Click="Button_Click"  Cursor="Arrow">
                            <Button.Template>
                                <ControlTemplate>
                                    <Grid>
                                        <Rectangle Stroke="Black"  />
                                        <Path Data="M0,0 L100,100" Margin="2,2,2,2" Stretch="Fill" Stroke="Black"/>
                                        <Path Data="M100,0 L0,100" Margin="2,2,2,2" Stretch="Fill" Stroke="Black" />
                                    </Grid>
                                </ControlTemplate>
                            </Button.Template>
                        </Button>
                    </StackPanel>
                </DataTemplate>
           </telerik1:RadAutoCompleteBox.BoxesItemTemplate>
       </telerik1:RadAutoCompleteBox>



The complete style/template:

<Style x:Key="RadAutoCompleteBoxGinkgoStyle" TargetType="{x:Type telerik1:RadAutoCompleteBox}">
           <Setter Property="IsTabStop" Value="False"/>
           <Setter Property="TextBoxStyle">
               <Setter.Value>
                   <Style TargetType="{x:Type telerik1:RadWatermarkTextBox}">
                       <Setter Property="BorderThickness" Value="0"/>
                       <Setter Property="Margin" Value="3,3,0,0"/>
                       <Setter Property="Padding" Value="0"/>
                       <Setter Property="BorderBrush" Value="Transparent"/>
                       <Setter Property="Background" Value="Transparent"/>
                       <Setter Property="Template">
                           <Setter.Value>
                               <ControlTemplate TargetType="{x:Type telerik1:RadWatermarkTextBox}">
                                   <Grid x:Name="RootElement" Cursor="IBeam">
                                       <VisualStateManager.VisualStateGroups>
                                           <VisualStateGroup x:Name="CommonStates">
                                               <VisualState x:Name="Normal">
                                                   <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>
                                               </VisualState>
                                               <VisualState x:Name="MouseOver">
                                                   <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>
                                               </VisualState>
                                               <VisualState x:Name="Disabled">
                                                   <Storyboard>
                                                       <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/>
                                                       <DoubleAnimation Duration="0" To="0.6" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_ContentHost"/>
                                                   </Storyboard>
                                               </VisualState>
                                           </VisualStateGroup>
                                           <VisualStateGroup x:Name="WatermarkStates">
                                               <VisualState x:Name="WatermarkHidden">
                                                   <Storyboard>
                                                       <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="WatermarkVisualElement"/>
                                                   </Storyboard>
                                               </VisualState>
                                               <VisualState x:Name="WatermarkVisible"/>
                                           </VisualStateGroup>
                                       </VisualStateManager.VisualStateGroups>
                                       <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Opacity="1"/>
                                       <Border x:Name="MouseOverVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" IsHitTestVisible="False" Opacity="0" Grid.RowSpan="2" Visibility="Collapsed"/>
                                       <Border x:Name="DisabledVisualElement" BorderBrush="#FF989898" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" IsHitTestVisible="False" Opacity="0"/>
                                       <ScrollViewer x:Name="PART_ContentHost" BorderThickness="0" IsTabStop="False" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                                           <telerik1:StyleManager.Theme>
                                               <telerik1:Office_BlackTheme/>
                                           </telerik1:StyleManager.Theme>
                                       </ScrollViewer>
                                       <Border x:Name="FocusVisual" BorderBrush="#FFFFC92B" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" CornerRadius="1" IsHitTestVisible="False" Opacity="0" Grid.RowSpan="2">
                                           <Border BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0"/>
                                       </Border>
                                       <ContentControl x:Name="WatermarkVisualElement" BorderThickness="{TemplateBinding BorderThickness}" ContentTemplate="{TemplateBinding WatermarkTemplate}" Content="{TemplateBinding WatermarkContent}" FontStyle="Italic" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="False" IsTabStop="False" Margin="{TemplateBinding Padding}" Opacity="0.5" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                   </Grid>
                               </ControlTemplate>
                           </Setter.Value>
                       </Setter>
                       <Style.BasedOn>
                           <Style TargetType="{x:Type telerik1:RadWatermarkTextBox}">
                               <Setter Property="Foreground" Value="Black"/>
                               <Setter Property="Padding" Value="5,3"/>
                               <Setter Property="VerticalContentAlignment" Value="Center"/>
                               <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
                               <Setter Property="AllowDrop" Value="True"/>
                               <Setter Property="IsTabStop" Value="True"/>
                               <Setter Property="BorderBrush" Value="#FF848484"/>
                               <Setter Property="Background" Value="White"/>
                               <Setter Property="BorderThickness" Value="1"/>
                               <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
                               <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
                               <Setter Property="SnapsToDevicePixels" Value="True"/>
                               <Setter Property="Template">
                                   <Setter.Value>
                                       <ControlTemplate TargetType="{x:Type telerik1:RadWatermarkTextBox}">
                                           <Grid x:Name="RootElement" Cursor="IBeam">
                                               <VisualStateManager.VisualStateGroups>
                                                   <VisualStateGroup x:Name="CommonStates">
                                                       <VisualState x:Name="Normal">
                                                           <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>
                                                       </VisualState>
                                                       <VisualState x:Name="MouseOver">
                                                           <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>
                                                       </VisualState>
                                                       <VisualState x:Name="Disabled">
                                                           <Storyboard>
                                                               <DoubleAnimation Duration="0" To="0.6" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/>
                                                               <DoubleAnimation Duration="0" To="0.6" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_ContentHost"/>
                                                           </Storyboard>
                                                       </VisualState>
                                                       <VisualState x:Name="ReadOnly">
                                                           <Storyboard>
                                                               <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ReadOnlyVisualElement"/>
                                                           </Storyboard>
                                                       </VisualState>
                                                   </VisualStateGroup>
                                                   <VisualStateGroup x:Name="FocusStates">
                                                       <VisualState x:Name="Focused">
                                                           <Storyboard>
                                                               <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisual"/>
                                                           </Storyboard>
                                                       </VisualState>
                                                       <VisualState x:Name="Unfocused"/>
                                                   </VisualStateGroup>
                                                   <VisualStateGroup x:Name="WatermarkStates">
                                                       <VisualState x:Name="WatermarkHidden">
                                                           <Storyboard>
                                                               <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="WatermarkVisualElement"/>
                                                           </Storyboard>
                                                       </VisualState>
                                                       <VisualState x:Name="WatermarkVisible"/>
                                                   </VisualStateGroup>
                                               </VisualStateManager.VisualStateGroups>
                                               <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="1" Opacity="1"/>
                                               <Border x:Name="ReadOnlyVisualElement" Background="#5EC9C9C9" CornerRadius="1" Opacity="0"/>
                                               <Border x:Name="MouseOverVisual" BorderBrush="#FFFFC92B" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" CornerRadius="1" IsHitTestVisible="False" Opacity="0" Grid.RowSpan="2" Visibility="Collapsed"/>
                                               <Border x:Name="DisabledVisualElement" BorderBrush="#FF989898" BorderThickness="{TemplateBinding BorderThickness}" Background="#FFE0E0E0" CornerRadius="1" IsHitTestVisible="False" Opacity="0"/>
                                               <ScrollViewer x:Name="PART_ContentHost" BorderThickness="0" Cursor="Arrow" IsTabStop="False" Margin="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                                                   <telerik1:StyleManager.Theme>
                                                       <telerik1:Office_BlackTheme/>
                                                   </telerik1:StyleManager.Theme>
                                               </ScrollViewer>
                                               <Border x:Name="FocusVisual" BorderBrush="#FFFFC92B" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" CornerRadius="1" IsHitTestVisible="False" Opacity="0" Grid.RowSpan="2">
                                                   <Border BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0"/>
                                               </Border>
                                               <ContentControl x:Name="WatermarkVisualElement" BorderThickness="{TemplateBinding BorderThickness}" ContentTemplate="{TemplateBinding WatermarkTemplate}" Content="{TemplateBinding WatermarkContent}" Foreground="{TemplateBinding Foreground}" FontStyle="Italic" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="False" IsTabStop="False" Margin="2,0,0,0" Opacity="0.5" Padding="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                                                   <ContentControl.Template>
                                                       <ControlTemplate TargetType="{x:Type ContentControl}">
                                                           <Border BorderThickness="{TemplateBinding BorderThickness}">
                                                               <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Margin="{TemplateBinding Padding}"/>
                                                           </Border>
                                                       </ControlTemplate>
                                                   </ContentControl.Template>
                                               </ContentControl>
                                           </Grid>
                                       </ControlTemplate>
                                   </Setter.Value>
                               </Setter>
                           </Style>
                       </Style.BasedOn>
                   </Style>
               </Setter.Value>
           </Setter>
           <Setter Property="Template">
               <Setter.Value>
                   <ControlTemplate TargetType="{x:Type telerik1:RadAutoCompleteBox}">
                       <Grid>
                           <VisualStateManager.VisualStateGroups>
                               <VisualStateGroup x:Name="CommonStates">
                                   <VisualState x:Name="Normal"/>
                                   <VisualState x:Name="MouseOver">
                                       <Storyboard>
                                           <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisual"/>
                                       </Storyboard>
                                   </VisualState>
                                   <VisualState x:Name="Disabled">
                                       <Storyboard>
                                           <DoubleAnimation Duration="0" To="0.6" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/>
                                       </Storyboard>
                                   </VisualState>
                               </VisualStateGroup>
                               <VisualStateGroup x:Name="FocusStates">
                                   <VisualState x:Name="Unfocused"/>
                                   <VisualState x:Name="Focused">
                                       <Storyboard>
                                           <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisual"/>
                                       </Storyboard>
                                   </VisualState>
                               </VisualStateGroup>
                           </VisualStateManager.VisualStateGroups>
                           <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="1"/>
                           <Border x:Name="MouseOverVisual" BorderBrush="#FFFFC92B" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1" Opacity="0"/>
                           <Border x:Name="FocusVisual" BorderBrush="#FFFFC92B" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="1" IsHitTestVisible="False" Opacity="0">
                               <Border BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0"/>
                           </Border>
                           <Border x:Name="DisabledVisualElement" BorderBrush="#FF989898" BorderThickness="{TemplateBinding BorderThickness}" Background="#FFE0E0E0" CornerRadius="1" IsHitTestVisible="False" Opacity="0"/>
                           <ScrollViewer x:Name="PART_ScrollViewer" BorderThickness="0" Background="Transparent" Height="{TemplateBinding Height}" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" IsTabStop="False" Margin="{TemplateBinding BorderThickness}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                               <telerik1:StyleManager.Theme>
                                   <telerik1:Office_BlackTheme/>
                               </telerik1:StyleManager.Theme>
                               <telerik1:AutoCompleteBoxesItemsControl x:Name="PART_Boxes"
                                                                      BoxesItemTemplate="{TemplateBinding BoxesItemTemplate}"
                                                                      DisplayMemberPath="{TemplateBinding DisplayMemberPath}"
                                                                      Foreground="{TemplateBinding Foreground}"
                                                                      Height="{TemplateBinding Height}"
                                                                      ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                                                                      IsTabStop="False"
                                                                      Margin="{TemplateBinding Padding}"
                                                                      ScrollViewer.VerticalScrollBarVisibility="Disabled" >
                                   <telerik1:AutoCompleteBoxesItemsControl.ItemsPanel>
                                       <ItemsPanelTemplate>
                                           <telerik1:AutoCompleteBoxesWrapPanel IsItemsHost="True" Width="{Binding ActualWidth, ElementName=WatermarkTextBox}"/>
                                       </ItemsPanelTemplate>
                                  </telerik1:AutoCompleteBoxesItemsControl.ItemsPanel>
 
                                   <telerik1:AutoCompleteBoxesItemsControl.ItemContainerStyle>
                                       <Style TargetType="{x:Type telerik1:RadAutoCompleteBoxItem}">
                                           <Setter Property="Template">
                                               <Setter.Value>
                                                   <ControlTemplate TargetType="{x:Type telerik1:RadAutoCompleteBoxItem}">
                                                       <Border CornerRadius="1" x:Name="Bd" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
                                                           <StackPanel Orientation="Horizontal">
                                                               <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                                                
                                                           </StackPanel>
                                                            
                                                       </Border>
                                                   </ControlTemplate>
                                               </Setter.Value>
                                           </Setter>
                                       </Style>
                                  </telerik1:AutoCompleteBoxesItemsControl.ItemContainerStyle>
 
                              </telerik1:AutoCompleteBoxesItemsControl>
                           </ScrollViewer>
                           <Popup x:Name="PART_Popup">
                               <Grid x:Name="PopupRoot">
                                   <telerik1:RadListBox x:Name="PART_ListBox"
                                                        CanKeyboardNavigationSelectItems="{x:Null}"
                                                        IsTabStop="False"
                                                        ItemTemplate="{TemplateBinding DropDownItemTemplate}"
                                                        IsTextSearchEnabled="True"
                                                        MaxHeight="{TemplateBinding MaxDropDownHeight}"
                                                        MinWidth="{TemplateBinding MinDropDownWidth}"
                                                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                                        SelectedValueBinding="{x:Null}"
                                                        TextBinding="{x:Null}"
                                                        ItemsSource="{TemplateBinding FilteredItems}">
 
                                       <telerik1:StyleManager.Theme>
                                           <telerik1:Office_BlackTheme/>
                                       </telerik1:StyleManager.Theme>
                                   </telerik1:RadListBox>
                               </Grid>
                           </Popup>
                       </Grid>
                   </ControlTemplate>
               </Setter.Value>
           </Setter>
           <Setter Property="BorderBrush" Value="#FF848484"/>
           <Setter Property="BorderThickness" Value="1"/>
           <Setter Property="Background" Value="White"/>
           <Setter Property="Padding" Value="0,0,3,3"/>
           <Setter Property="Cursor" Value="IBeam"/>
           <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
           <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
           <Setter Property="SnapsToDevicePixels" Value="True"/>
       </Style>

Vladi
Telerik team
 answered on 04 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?