Telerik Forums
UI for WPF Forum
2 answers
133 views
I have GridViewComboColumn in a GridView. How can I programatically set focus the combox in the current row and open it?
I have button on a form that addes a new row... so I want to set focus to the combobox so the user can begin entereing.... thanks again

<
telerikPresentation:GridViewComboBoxColumn DisplayMemberPath="prod_name" SelectedValueMemberPath="prod_name" DataMemberBinding="{Binding comm_name}" Header="Product" Width="175" />
Jon
Top achievements
Rank 1
 answered on 12 Apr 2010
3 answers
160 views
I created a TreeView by programmatically adding items.

I try to remove an item like this:

 

 

Dim item = treDataSources.GetItemByPath(entiyPath)

 

treDataSources.Items.Remove(item)

The item is found.
But not removed from the tree.
Items.Count does no decrease after the .Remove.

What am I doing wrong.

Tina Stancheva
Telerik team
 answered on 12 Apr 2010
19 answers
408 views
With the assemblies after 27-11-2009 I get the following errors under visual studio 2008:

Could not load type 'Microsoft.Windows.Design.Metadata.ProvideMetadataAttribute' from assembly 'Microsoft.Windows.Design.Extensibility, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

I can build and run the project without problems, but I can't load the xaml designer.

Any ideas?

Thomas

Valentin.Stoychev
Telerik team
 answered on 12 Apr 2010
3 answers
95 views
Hi
    I have 3 tilesviewitems and by expanding 1 tiles 2 move to small, that is fine but the small height adjust itself and cover the height as the height of RadTileView

How can we adjust the small tilesItems to a specific heights?
Valentin.Stoychev
Telerik team
 answered on 12 Apr 2010
5 answers
100 views
I am experimenting with the book control as a replacement for a "rival" book control. The items in this case is a collection of UserControls.

I tried using a simple ItemsControl in a scroll viewer, and all works fine - I have a setup page at the start which queries data that is displayed in subsequent pages and all works properly - in the standard ItemsControl, but not in RadBook. If I simply put an unbound CheckBox on the setup (or any other) page, I find that I can not even click it to change its state, though you do see the mouse-over visual effect.

Help!

James S

Kiril Stanoev
Telerik team
 answered on 12 Apr 2010
3 answers
220 views
As the title says, the item exists within the RadTreeViewItem.Items, yet it returns null, even when searching by index, see the following screen shot:


The RadTreeView is data bound using several HierarchyDataTemplates, I tried this with regular items like so:

        <telerik:RadTreeView> 
            <telerik:RadTreeViewItem x:Name="firstTelerikItem" Header="Item 1" IsExpanded="True"
                <telerik:RadTreeViewItem Header="Item 1.1" x:Name="containerTelerik1_1" /> 
                <telerik:RadTreeViewItem Header="Item 1.2" x:Name="containerTelerik1_2" /> 
                <telerik:RadTreeViewItem Header="Item 1.3" x:Name="containerTelerik1_3" /> 
            </telerik:RadTreeViewItem> 
            <telerik:RadTreeViewItem Header="Item 2" /> 
            <telerik:RadTreeViewItem Header="Item 3" /> 
        </telerik:RadTreeView> 

And in there it works fine, but not with the databound ones.

Lmk, thanks!
Valentin.Stoychev
Telerik team
 answered on 12 Apr 2010
1 answer
95 views
How do I turn off the results of the aggregated functions on the group header?
Maya
Telerik team
 answered on 12 Apr 2010
7 answers
206 views
I have a straightforward scenario with a grid where the columns have been given explicit widths in XAML and the ItemsSource is bound to an ObservableCollection of a business object.
The problem is that when you open this view with the grid, you initially see - for a few seconds - that the set of columns are all there ok and have data but are very narrow (about the width of the 'filter funnel' icon) and then they spring out to the expected width. This does not look good!
Any idea what might be causing this or how I can prevent it happening?

Thanks

James S


Milan
Telerik team
 answered on 12 Apr 2010
7 answers
258 views
Hello. I'm developing an application, and we need a carouse, so I started using the RadCarousel. Now, my carousel will only contain a few images, but i want the carousel to take them from an xml file i've written:
<?xml version="1.0" encoding="utf-8" ?>  
<root>  
  <image url="images\announcementsIcon.png"></image>  
  <image url="images\phoneDirectoryIcon.png"></image>  
  <image url="images\gadgetWallIcon.png"></image>  
  <image url="images\wpaNewsIcon.png"></image>  
  <image url="images\newsIcon.png"></image>  
</root> 

I used Blend to import this as an XML data source and declare it on the carousel ItemSource property as a static resource, and then tried to link each image inside the CarouselDataRecordPresenter to the url attributs but didnt succed. I'm not sure what am I doing wrong, I was trying to follow these instructions but they didnt help me. And my second problem, is that,trying to get it going and adding the images to carousel hardcoded, I couldnt get the reflection effect to work. Here's the code. Please help. Thank you

                <telerik:RadCarousel x:Name="naxosCarousel" Height="150" HorizontalAlignment="Center" MaxWidth="774" ScrollViewer.HorizontalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden">  
                    <telerik:RadCarousel.ReflectionSettings>  
                        <telerik:ReflectionSettings Visibility="Visible" Opacity="1" HiddenPercentage="0.2" HeightOffset="6" Angle="10"/>  
                    </telerik:RadCarousel.ReflectionSettings>  
                    <Image Source="images\phoneDirectoryIcon.png"/>  
                    <Image Source="images\newsIcon.png"/>  
                    <Image Source="images\gadgetWallIcon.png"/>  
                    <Image Source="images\wpaNewsIcon.png"/>  
                    <Image Source="images\announcementsIcon.png"/>  
                </telerik:RadCarousel> 

Potecaru Tudor
Top achievements
Rank 1
 answered on 12 Apr 2010
1 answer
189 views
I have defined ComboBoxes for filtering in the grid header style (see XAML below).
How can I access the ComboBoxes from code?

a)
I do not understand how to loop through the grids columns an access the ComboBox in each columns header.

b)
I the ComboBoxes SelectionChanged event I do not understand how to determine the grid column of the ComboBox raising the event.

       <Style x:Key="GridViewHeaderCellFilterStyle" TargetType="{x:Type telerik:GridViewHeaderCell}">  
                <Setter Property="Template">  
                    <Setter.Value> 
                        <ControlTemplate TargetType="{x:Type telerik:GridViewHeaderCell}">  
                            <Grid x:Name="PART_HeaderCellGrid">  
                                  
                                <Grid.ColumnDefinitions> 
                                    <ColumnDefinition Width="*"/>  
                                    <ColumnDefinition Width="Auto"/>  
                                </Grid.ColumnDefinitions> 
 
                     <!-- Modification Start--> 
                            <Grid.RowDefinitions> 
                                <RowDefinition Height="Auto" /> 
                                <RowDefinition Height="*" /> 
                            </Grid.RowDefinitions> 
                            <Grid Grid.Row="1" Grid.ColumnSpan="2" Height="20">  
                                    <Grid.ColumnDefinitions> 
                                        <ColumnDefinition Width="Auto"/>  
                                        <ColumnDefinition Width="*"/>  
                                    </Grid.ColumnDefinitions> 
                                <telerik:RadComboBox Grid.Column="0" x:Name="cboOperator" SelectionChanged="cboOperator_SelectionChanged"  FontWeight="Normal">  
                                        <telerik:RadComboBoxItem Content="=" IsSelected="True"></telerik:RadComboBoxItem> 
                                        <telerik:RadComboBoxItem Content="&lt;"></telerik:RadComboBoxItem> 
                                        <telerik:RadComboBoxItem Content="&lt;="></telerik:RadComboBoxItem> 
                                        <telerik:RadComboBoxItem Content="&gt;"></telerik:RadComboBoxItem> 
                                        <telerik:RadComboBoxItem Content="&gt;="></telerik:RadComboBoxItem> 
                                        <telerik:RadComboBoxItem Content="in"></telerik:RadComboBoxItem> 
                                        <telerik:RadComboBoxItem Content="like"></telerik:RadComboBoxItem> 
                                    </telerik:RadComboBox> 
                                <telerik:RadComboBox Grid.Column="1" x:Name="cboValue"  HorizontalAlignment="Stretch" IsEditable="True" IsReadOnly="False" FontWeight="Normal"></telerik:RadComboBox> 
                                 
                            </Grid> 
 
                      <!-- Modification End --> 
 
 
                            <Border x:Name="GridViewHeaderCell" Grid.ColumnSpan="2" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">  
                                    <Border Background="{TemplateBinding Background}" BorderBrush="#FF4B4B4B" BorderThickness="1"/>  
                                </Border> 
                                <Border x:Name="GridViewHeaderCell_Over" Opacity="0" Grid.ColumnSpan="2" BorderBrush="#FFFFC92B" BorderThickness="{TemplateBinding BorderThickness}">  
                                    <Border BorderBrush="White" BorderThickness="1">  
                                        <Border.Background> 
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">  
                                                <GradientStop Color="#FFFFFBA3" Offset="1"/>  
                                                <GradientStop Color="#FFFFFBDA" Offset="0"/>  
                                                <GradientStop Color="#FFFFD25A" Offset="0.43"/>  
                                                <GradientStop Color="#FFFEEBAE" Offset="0.42"/>  
                                            </LinearGradientBrush> 
                                        </Border.Background> 
                                    </Border> 
                                </Border> 
                                <Border x:Name="GridViewHeaderCell_Selected" Opacity="0" Grid.ColumnSpan="2" BorderThickness="{TemplateBinding BorderThickness}">  
                                    <Border.BorderBrush> 
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">  
                                            <GradientStop Color="#FF616161" Offset="0"/>  
                                            <GradientStop Color="#FF989898" Offset="1"/>  
                                        </LinearGradientBrush> 
                                    </Border.BorderBrush> 
                                    <Border BorderThickness="1">  
                                        <Border.Background> 
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">  
                                                <GradientStop Color="#FFFFD74E" Offset="0.996"/>  
                                                <GradientStop Color="#FFFFDCAB" Offset="0.17"/>  
                                                <GradientStop Color="#FFFFB062" Offset="0.57"/>  
                                                <GradientStop Color="#FFFFD18F" Offset="0.56"/>  
                                                <GradientStop Color="#FFFFBA74"/>  
                                            </LinearGradientBrush> 
                                        </Border.Background> 
                                        <Border.BorderBrush> 
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">  
                                                <GradientStop Color="#FFB69A78"/>  
                                                <GradientStop Color="#FFFFE17A" Offset="0.126"/>  
                                            </LinearGradientBrush> 
                                        </Border.BorderBrush> 
                                    </Border> 
                                </Border> 
                                <ContentControl x:Name="ContentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Foreground="{TemplateBinding Foreground}" Grid.Column="0"/>  
                                <Path x:Name="PART_SortIndicator" Fill="Black" Stretch="Fill" HorizontalAlignment="Center" Margin="0,3,0,0" VerticalAlignment="Top" Width="5" Height="3" Opacity="0" RenderTransformOrigin="0.5,0.5" Grid.ColumnSpan="2" Data="M0,0L1,0 2,0 3,0 4,0 5,0 5,1 4,1 4,2 3,2 3,3 2,3 2,2 1,2 1,1 0,1 0,0z">  
                                    <Path.RenderTransform> 
                                        <TransformGroup> 
                                            <ScaleTransform ScaleX="1" ScaleY="-1"/>  
                                            <SkewTransform AngleX="0" AngleY="0"/>  
                                            <RotateTransform Angle="0"/>  
                                            <TranslateTransform X="0" Y="0"/>  
                                        </TransformGroup> 
                                    </Path.RenderTransform> 
                                </Path> 
                                <!--<telerik:FilteringDropDown x:Name="PART_DistinctFilterControl" Margin="0,0,8,0" IsTabStop="False" Visibility="{TemplateBinding FilteringUIVisibility}" Grid.Column="1">  
                                    <telerik:StyleManager.Theme> 
                                        <telerik:Office_BlackTheme/> 
                                    </telerik:StyleManager.Theme> 
                                </telerik:FilteringDropDown>--> 
                                <Thumb x:Name="PART_LeftHeaderGripper" HorizontalAlignment="Left" Grid.ColumnSpan="2">  
                                    <Thumb.Style> 
                                        <Style TargetType="{x:Type Thumb}">  
                                            <Setter Property="Width" Value="8"/>  
                                            <Setter Property="Background" Value="Transparent"/>  
                                            <Setter Property="BorderBrush" Value="Transparent"/>  
                                            <Setter Property="BorderThickness" Value="0"/>  
                                            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>  
                                            <Setter Property="VerticalContentAlignment" Value="Stretch"/>  
                                            <Setter Property="Padding" Value="0"/>  
                                            <Setter Property="Cursor" Value="SizeWE"/>  
                                            <Setter Property="Template">  
                                                <Setter.Value> 
                                                    <ControlTemplate TargetType="{x:Type Thumb}">  
                                                        <Border HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}"/>  
                                                    </ControlTemplate> 
                                                </Setter.Value> 
                                            </Setter> 
                                        </Style> 
                                    </Thumb.Style> 
                                </Thumb> 
                                <Thumb x:Name="PART_RightHeaderGripper" HorizontalAlignment="Right" Grid.ColumnSpan="2">  
                                    <Thumb.Style> 
                                        <Style TargetType="{x:Type Thumb}">  
                                            <Setter Property="Width" Value="8"/>  
                                            <Setter Property="Background" Value="Transparent"/>  
                                            <Setter Property="BorderBrush" Value="Transparent"/>  
                                            <Setter Property="BorderThickness" Value="0"/>  
                                            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>  
                                            <Setter Property="VerticalContentAlignment" Value="Stretch"/>  
                                            <Setter Property="Padding" Value="0"/>  
                                            <Setter Property="Cursor" Value="SizeWE"/>  
                                            <Setter Property="Template">  
                                                <Setter.Value> 
                                                    <ControlTemplate TargetType="{x:Type Thumb}">  
                                                        <Border HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}"/>  
                                                    </ControlTemplate> 
                                                </Setter.Value> 
                                            </Setter> 
                                        </Style> 
                                    </Thumb.Style> 
                                </Thumb> 
                            </Grid> 
                            <ControlTemplate.Triggers> 
                                <MultiTrigger> 
                                    <MultiTrigger.EnterActions> 
                                        <BeginStoryboard> 
                                            <Storyboard> 
                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GridViewHeaderCell_Over" Storyboard.TargetProperty="Opacity">  
                                                    <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1"/>  
                                                </DoubleAnimationUsingKeyFrames> 
                                            </Storyboard> 
                                        </BeginStoryboard> 
                                    </MultiTrigger.EnterActions> 
                                    <MultiTrigger.ExitActions> 
                                        <BeginStoryboard> 
                                            <Storyboard> 
                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GridViewHeaderCell_Over" Storyboard.TargetProperty="Opacity">  
                                                    <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0"/>  
                                                </DoubleAnimationUsingKeyFrames> 
                                            </Storyboard> 
                                        </BeginStoryboard> 
                                    </MultiTrigger.ExitActions> 
                                    <MultiTrigger.Conditions> 
                                        <Condition Property="IsMouseOver" Value="True"/>  
                                        <Condition Property="SortingState" Value="None"/>  
                                    </MultiTrigger.Conditions> 
                                    <Setter Property="Foreground" Value="Black"/>  
                                </MultiTrigger> 
                                <Trigger Property="SortingState" Value="Ascending">  
                                    <Setter Property="Foreground" Value="Black"/>  
                                    <Setter Property="Opacity" TargetName="PART_SortIndicator" Value="1"/>  
                                    <Setter Property="LayoutTransform" TargetName="PART_SortIndicator">  
                                        <Setter.Value> 
                                            <ScaleTransform ScaleX="1" ScaleY="1"/>  
                                        </Setter.Value> 
                                    </Setter> 
                                    <Setter Property="Opacity" TargetName="GridViewHeaderCell_Selected" Value="1"/>  
                                </Trigger> 
                                <Trigger Property="SortingState" Value="Descending">  
                                    <Setter Property="Foreground" Value="Black"/>  
                                    <Setter Property="Opacity" TargetName="PART_SortIndicator" Value="1"/>  
                                    <Setter Property="LayoutTransform" TargetName="PART_SortIndicator">  
                                        <Setter.Value> 
                                            <ScaleTransform ScaleX="1" ScaleY="-1"/>  
                                        </Setter.Value> 
                                    </Setter> 
                                    <Setter Property="Opacity" TargetName="GridViewHeaderCell_Selected" Value="1"/>  
                                </Trigger> 
                                <Trigger Property="SortingState" Value="None">  
                                    <Setter Property="Opacity" TargetName="PART_SortIndicator" Value="0"/>  
                                </Trigger> 
                            </ControlTemplate.Triggers> 
                        </ControlTemplate> 
                    </Setter.Value> 
                </Setter> 
                <Setter Property="Background">  
                    <Setter.Value> 
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">  
                            <GradientStop Color="#FF5B5B5B" Offset="1"/>  
                            <GradientStop Color="#FF868686"/>  
                            <GradientStop Color="#FF4F4F4F" Offset="0.42"/>  
                            <GradientStop Color="#FF0E0E0E" Offset="0.43"/>  
                        </LinearGradientBrush> 
                    </Setter.Value> 
                </Setter> 
                <Setter Property="BorderBrush" Value="#FF848484"/>  
                <Setter Property="BorderThickness" Value="0,0,1,1"/>  
                <Setter Property="VerticalContentAlignment" Value="Center"/>  
                <Setter Property="HorizontalContentAlignment" Value="Stretch"/>  
                <Setter Property="Padding" Value="5,0,3,0"/>  
                <Setter Property="Foreground" Value="White"/>  
                <Setter Property="DropMarkPen">  
                    <Setter.Value> 
                        <Pen Brush="White" Thickness="2"/>  
                    </Setter.Value> 
                </Setter> 
                <Setter Property="SnapsToDevicePixels" Value="True"/>  
            </Style> 

Vlad
Telerik team
 answered on 12 Apr 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?