Telerik Forums
UI for WPF Forum
2 answers
56 views

I have the following Apply method that has been working:

        protected override void Apply(Telerik.Windows.Controls.TreeMap.RadTreeMapItem treemapItem, object dataItem)
        {
            BranchIntegrationDetails details = dataItem as BranchIntegrationDetails;
            SolidColorBrush brush = PickBrush(details);
           
            // Apply the color
            treemapItem.Background = brush;            // Apply additional text
            IntegrationStatisticsControl statisticsControl = new IntegrationStatisticsControl()
            {
                VerticalAlignment = System.Windows.VerticalAlignment.Bottom,
                HorizontalAlignment = System.Windows.HorizontalAlignment.Right,
                Foreground = ForegroundBrush,
                Margin = new System.Windows.Thickness(0,0,10,0)
            };
            statisticsControl.SetValue(Grid.RowSpanProperty, 2);
            Grid grid = treemapItem.ChildrenOfType<Grid>().ElementAt(1);
            grid.Children.Add(statisticsControl);
        }

The expected output can been in the first picture (see "expected.png").

 When I add the theme file into my app.xaml:

            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="StyleResources.xaml" />
                <ResourceDictionary Source="TelerikTheme/Telerik.Windows.Controls.xaml"/>
                <ResourceDictionary Source="TelerikTheme/Telerik.Windows.Controls.DataVisualization.xaml"/> <!-- this one is bad -->
                <ResourceDictionary Source="TelerikTheme/Telerik.Windows.Controls.Navigation.xaml"/>
            </ResourceDictionary.MergedDictionaries>

The control that I want to apply does not anymore (see "unexpected.png"). The same code is still working, I can see my control is added to the Grid, just I could not know why it is not showing.

Sia
Telerik team
 answered on 05 May 2015
3 answers
238 views

I would like to know the difference between these two types, besides the obvious that one is a generic and the other is not.

Specifically:

1. Why does the generic version not support the same constructors passing an IEnumerable query?

2. Does the non generic version when passed a IEnumerable query inherently know the collection type by the result type of the query?

3. What then is the purpose of the VirtualQueryableCollectionView(IEnumerable, Type) constructor, as the second parameter Type will need to match that of the IEnumerable?

4. Is there a way within the ItemsLoading to force the non generic version to let user code handle the query (ie. e.Handled = true)

The non generic version blocks on the UI thread when requesting new items.  This is very odd coming from Telerik.  .  Even if you don't pass a query on the constructor, the ItemsLoading still blocks while loading nothing.

This blocking UI is very bad, forcing me to use the generic version which allows me to handle the ItemsLoading query (queuing the request on a background thread as is correct).

Thanks,

Mike

 

 

 

 

Dimitrina
Telerik team
 answered on 05 May 2015
1 answer
127 views

Hi all,

I took the style out of blend of the GridViewCheckbox component, but can't seem to find to change this:

I would like to remove the highlight yellow collor. I'm changing my application to another color, but only this yellow highlight color i cant find how to. 

This is the code:

<Style TargetType="{x:Type telerik:GridViewCheckBox}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type telerik:GridViewCheckBox}">
                    <Grid HorizontalAlignment="Left" Height="13" VerticalAlignment="Center" Width="13">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0" Duration="0" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="CheckedPath">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unchecked"/>
                                <VisualState x:Name="Indeterminate">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0" Duration="0" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="IndeterminatePath">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border BorderBrush="#FF989898" BorderThickness="1">
                            <Border BorderBrush="#FFEEEEEE" BorderThickness="1">
                                <Border BorderBrush="#FFB9B9B9" BorderThickness="1" Background="#FFE0E0E0">
                                    <Grid Margin="0">
                                        <Path x:Name="IndeterminatePath" Data="M14.708333,144.5L20.667,144.5" HorizontalAlignment="Center" Height="7" Margin="0" Stretch="Fill" Stroke="#FF8D8D8D" StrokeThickness="1.5" Visibility="Collapsed" VerticalAlignment="Center" Width="7"/>
                                        <Path x:Name="CheckedPath" Data="M32.376187,77.162509L35.056467,80.095277 40.075451,70.02144" HorizontalAlignment="Center" Margin="0" Stretch="Fill" Stroke="#FF8D8D8D" StrokeThickness="1.5" Visibility="Collapsed" VerticalAlignment="Center"/>
                                    </Grid>
                                </Border>
                            </Border>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 

What do i miss??

Stefan
Telerik team
 answered on 05 May 2015
5 answers
92 views
How do I make all column headers have text wrapping?
Stefan
Telerik team
 answered on 05 May 2015
1 answer
315 views

Hi everybody.

    - I'm new with Telerik WPF and I used a RadPageView in Winforms and I can't find it in WPF!!, I wanna make like this menu in attache.

and thank's for help.

Martin Ivanov
Telerik team
 answered on 05 May 2015
1 answer
186 views

Hi,

I am developing many widgets on one screen. I have used MVP DP so whether or not to create instances of widgets (maybe based on role) are determined by presenter.

One control is RadHtmlChart:PieSeries which also has <asp:Timer> and the other is RadProgressBar. 
The Timer postbacks the entire page, not just the PieControl which is OK.

This is the presenter.cs code for the PieSeries which correctly repaints the UI when the timer goes off.
The presenter.cs code for the ProgressBar is identical.
However, it only works the first time databind. Every other postback the new "PercentagteValue" is assigned correctly but the control doesn't seem to overwrite it's older value. 

For now i got it to work by declaratively creating the control on the widget page instead of dynamically creating it in the presenter.

I've seen posts on set_value using javascript but was wondering why these two controls act differently?

public async Task GetPieSnapShot()
{
   IEnumerable<PieData> pieResult = await Model.GetPieData();
   PieSeries myPieControl = (PieSeries)LoadControl("~/UserControls/PieSeriesControl.ascx");
   myPieControl.DataSource = pieResult.ToList();
   View.PieWidget = myPieControl;
}

 

 

Pramod
Top achievements
Rank 1
 answered on 04 May 2015
3 answers
345 views

Hi,

I'm using V2015.1.225.45 of Telerik and and I have a problem using the Office2013 as with different controls. Our project is a DLL and we create a "GenericStyles.xaml" file which contain all of our customs styles. So, in our application, in each UserControl, we have added the following piece of code to reference our Custom Styles: 

 

            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/ChristieInnoMed.Framework.UI.ChristieControls;component/Resources/Controls/GenericStyles.xaml"/>

In our custom styles file, many sections are underline in blue with the error message: " Object reference not set to an instance of an object.". If you look in our GenericStyles.xam file, as an example, look at the section "x:Key="TextBoxErrorTemplate".

Our GenericStyles.xaml look like:

 <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:sys="clr-namespace:System;assembly=mscorlib"
                    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                    xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls">
    
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/System.Windows.xaml" />
        <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.xaml" />
        <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Input.xaml" />
        <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Navigation.xaml" />
    </ResourceDictionary.MergedDictionaries>
   
    <Style x:Key="ListBoxNoFocusSelectStyle" TargetType="{x:Type ListBoxItem}">
        <Style.Resources>
            <!-- SelectedItem with focus -->
            <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}"
                       Color="Transparent" />
            <!-- SelectedItem without focus -->
            <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}"
                       Color="Transparent" />
            <!-- SelectedItem text foreground -->
            <SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}"
                       Color="Black" />
        </Style.Resources>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    </Style>

    <!-- Textbox error template -->
    <Style x:Key="TextBoxErrorTemplate" TargetType="{x:Type TextBox}" BasedOn="{StaticResource TextBoxStyle}">        
        <Setter Property="Validation.ErrorTemplate">
            <Setter.Value>
                <ControlTemplate>
                    <DockPanel>
                        <Grid DockPanel.Dock="Right"
                              Width="16"
                              Height="16"
                              VerticalAlignment="Center"
                              Margin="5 0 0 0"
                              ToolTip="{Binding ElementName=ErrorAdorner, Path=AdornedElement.(Validation.Errors)[0].ErrorContent}">
                            <Ellipse Width="16" Height="16" Fill="Red"/>
                            <Ellipse Width="3" Height="8" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0 2 0 0" Fill="White"/>
                            <Ellipse Width="2" Height="2" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 2" Fill="White"/>
                        </Grid>
                        <Border BorderBrush="Red" BorderThickness="2" CornerRadius="2">
                            <AdornedElementPlaceholder x:Name="ErrorAdorner"/>
                        </Border>
                    </DockPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="CustomExpanderStyle" TargetType="telerik:RadExpander" BasedOn="{StaticResource RadExpanderStyle}">
        <Setter Property="Padding" Value="10" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadExpander">
                    <Grid HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStateGroup">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="HeaderPanel" Storyboard.TargetProperty="Opacity" To="0.5"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="HeaderStateGroup">
                                <VisualState x:Name="NormalHeader"/>
                                <VisualState x:Name="MouseOverHeader">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="NormalCircle" Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)"/>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterCircle" Storyboard.TargetProperty="Stroke" Duration="0:0:0">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Office2013Resource ResourceKey=AccentMainBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterCircle" Storyboard.TargetProperty="Fill" Duration="0:0:0">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Office2013Resource ResourceKey=EffectAccentLowBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="arrow" Storyboard.TargetProperty="Fill" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Office2013Resource ResourceKey=InvertedBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="PressedHeader">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterCircle" Storyboard.TargetProperty="Fill" Duration="0:0:0">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Office2013Resource ResourceKey=EffectAccentHighBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterCircle" Storyboard.TargetProperty="Stroke" Duration="0:0:0">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Office2013Resource ResourceKey=AccentMainBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="arrow" Storyboard.TargetProperty="Fill" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Office2013Resource ResourceKey=InvertedBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="HeaderOrientationGroup">
                                <VisualState x:Name="HorizontalOrientation">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderContentTransform" Storyboard.TargetProperty="LayoutTransform">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <RotateTransform Angle="0"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderContentTransform" Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>1</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="VerticalOrientation">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderContentTransform" Storyboard.TargetProperty="LayoutTransform">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <RotateTransform Angle="90"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderContentTransform" Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>1</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ExpandStateGroup">
                                <VisualState x:Name="Expanded">
                                    <Storyboard>
                                        <DoubleAnimation                                            
                                    Storyboard.TargetName="arrow"
                                    Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)"
                                    To="180"
                                    Duration="0:0:0.2"/>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderButton" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Office2013Resource ResourceKey=InvertedBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Collapsed">
                                    <Storyboard>
                                        <DoubleAnimation
                                    Storyboard.TargetName="arrow"
                                    Duration="0:0:0.2"
                                    Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)"
                                    To="0"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ExpandDirectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition>
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="(Grid.Row)">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <sys:Int32>0</sys:Int32>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="(Grid.Column)">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <sys:Int32>0</sys:Int32>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderButton" Storyboard.TargetProperty="(Grid.Row)">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <sys:Int32>0</sys:Int32>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderButton" Storyboard.TargetProperty="(Grid.Column)">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <sys:Int32>0</sys:Int32>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="col0" Storyboard.TargetProperty="Width">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <GridLength>Auto</GridLength>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="col1" Storyboard.TargetProperty="Width">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <GridLength>Auto</GridLength>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="row0" Storyboard.TargetProperty="Height">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <GridLength>Auto</GridLength>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="row1" Storyboard.TargetProperty="Height">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <GridLength>Auto</GridLength>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="DirectionLeft">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="col0" Storyboard.TargetProperty="Width">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <GridLength>*</GridLength>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="row0" Storyboard.TargetProperty="Height">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <GridLength>*</GridLength>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderButton" Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>1</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Storyboard.TargetName="arrowPanel" Storyboard.TargetProperty="(FrameworkElement.RenderTransform).Angle" To="90" Duration="0:0:0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="DirectionRight">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="col1" Storyboard.TargetProperty="Width">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <GridLength>*</GridLength>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="row0" Storyboard.TargetProperty="Height">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <GridLength>*</GridLength>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>1</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Storyboard.TargetName="arrowPanel" Storyboard.TargetProperty="(FrameworkElement.RenderTransform).Angle" To="-90" Duration="0:0:0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="DirectionUp">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="col0" Storyboard.TargetProperty="Width">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <GridLength>*</GridLength>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="row0" Storyboard.TargetProperty="Height">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <GridLength>*</GridLength>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderButton" Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>1</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Storyboard.TargetName="arrowPanel" Storyboard.TargetProperty="(FrameworkElement.RenderTransform).Angle" To="180" Duration="0:0:0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="DirectionDown">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="col0" Storyboard.TargetProperty="Width">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <GridLength>*</GridLength>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="row1" Storyboard.TargetProperty="Height">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <GridLength>*</GridLength>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>1</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <!--<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">-->
                        <Border BorderBrush="{telerik:Office2013Resource ResourceKey=AccentBrush}" BorderThickness="1" Background="{TemplateBinding Background}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition x:Name="row0" Height="Auto"/>
                                    <RowDefinition x:Name="row1" Height="Auto"/>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition x:Name="col0" Width="Auto"/>
                                    <ColumnDefinition x:Name="col1" Width="Auto"/>
                                </Grid.ColumnDefinitions>

                                <Border Background="{telerik:Office2013Resource ResourceKey=AccentBrush}" Grid.ColumnSpan="2"/>
                                <telerik:RadToggleButton x:Name="HeaderButton"
                            TabIndex="{TemplateBinding TabIndex}"
                            HorizontalAlignment="{TemplateBinding HorizontalHeaderAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalHeaderAlignment}"
                            HorizontalContentAlignment="{TemplateBinding HorizontalHeaderAlignment}"
                            VerticalContentAlignment="{TemplateBinding VerticalHeaderAlignment}"
                            Template="{StaticResource ToggleTemplate}"
                            Background="Transparent"
                            IsChecked="{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                            ClickMode="{TemplateBinding ClickMode}"
                            FontSize="{TemplateBinding FontSize}"
                            FontStyle="{TemplateBinding FontStyle}"
                            FontWeight="{TemplateBinding FontWeight}"
                            FontFamily="{TemplateBinding FontFamily}"
                            FontStretch="{TemplateBinding FontStretch}"
                            Foreground="{TemplateBinding Foreground}">
                                    <telerik:RadToggleButton.FocusVisualStyle>
                                        <Style>
                                            <Setter Property="Control.Template">
                                                <Setter.Value>
                                                    <ControlTemplate>
                                                        <Border>
                                                            <Rectangle Margin="0" SnapsToDevicePixels="True" Stroke="Black" StrokeThickness="1" StrokeDashArray="1 2"/>
                                                        </Border>
                                                    </ControlTemplate>
                                                </Setter.Value>
                                            </Setter>
                                        </Style>
                                    </telerik:RadToggleButton.FocusVisualStyle>
                                    <Grid x:Name="HeaderPanel" Background="Transparent">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition Height="*"/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="*"/>
                                        </Grid.ColumnDefinitions>
                                        <Grid>
                                            <Ellipse x:Name="NormalCircle"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Width="22"
                                        Height="22"
                                        Fill="{telerik:Office2013Resource ResourceKey=BasicBrush}"
                                        Stroke="{telerik:Office2013Resource ResourceKey=HighDarkBrush}"
                                        StrokeThickness="1"/>
                                            <Ellipse x:Name="OuterCircle" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="{x:Null}" Fill="{x:Null}" Width="22" Height="22" StrokeThickness="1"/>
                                            <Grid RenderTransformOrigin="0.5 0.5" x:Name="arrowPanel">
                                                <Grid.RenderTransform>
                                                    <RotateTransform/>
                                                </Grid.RenderTransform>
                                                <Path x:Name="arrow"
                                            Stretch="None"
                                            RenderTransformOrigin="0.5,0.5"
                                            Width="8"
                                            Height="4"
                                            Data="M0,0 L0.67,0 4,2.67 7.25,0 8,0 8,0.67 4,4 0,0.75 z"
                                            Fill="{telerik:Office2013Resource ResourceKey=StrongBrush}">
                                                    <Path.RenderTransform>
                                                        <TransformGroup>
                                                            <RotateTransform Angle="0"/>
                                                            <TranslateTransform/>
                                                        </TransformGroup>
                                                    </Path.RenderTransform>
                                                </Path>
                                            </Grid>
                                        </Grid>
                                        <telerikPrimitives:LayoutTransformControl RenderTransformOrigin=".5 .5" x:Name="HeaderContentTransform">
                                            <ContentPresenter x:Name="HeaderContent"
                                        Grid.Column="1"
                                        Margin="5 0"
                                        VerticalAlignment="Center"
                                        HorizontalAlignment="Stretch"
                                        UseLayoutRounding="True"
                                        Content="{TemplateBinding Header}"
                                        ContentTemplate="{TemplateBinding HeaderTemplate}"
                                        TextBlock.Foreground="{telerik:Office2013Resource ResourceKey=LowLightBrush}"/>
                                        </telerikPrimitives:LayoutTransformControl>
                                    </Grid>
                                </telerik:RadToggleButton>
                                <ContentPresenter x:Name="Content"                                                  
                            Margin="{TemplateBinding Padding}"
                            Visibility="Collapsed"
                            UseLayoutRounding="True"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="CustomGroupBox" TargetType="GroupBox">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="GroupBox">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>

                        <Border Grid.Row="0" 
                                BorderThickness="1"
                                BorderBrush="{telerik:Office2013Resource ResourceKey=AccentBrush}"
                                Background="{telerik:Office2013Resource ResourceKey=AccentBrush}">
                            <Label Foreground="{telerik:Office2013Resource ResourceKey=LowLightBrush}">
                                <ContentPresenter Margin="0"
                                                  ContentSource="Header"
                                                  RecognizesAccessKey="True" />
                            </Label>
                        </Border>

                        <Border Grid.Row="1"
                                BorderThickness="1,0,1,1"
                                BorderBrush="{telerik:Office2013Resource ResourceKey=AccentBrush}">
                            <ContentPresenter Margin="10" />
                        </Border>

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="CustomScrollViewer" TargetType="ScrollViewer" BasedOn="{StaticResource ScrollViewerStyle}">
        <Setter Property="Padding" Value="10" />
    </Style>

    <Style x:Key="CustomTabControl" TargetType="telerik:RadTabControl" BasedOn="{StaticResource RadTabControlStyle}">
        <Setter Property="Padding" Value="10" />
    </Style>

    <Style x:Key="CustomTabItemStyle" TargetType="telerik:RadTabItem" BasedOn="{StaticResource RadTabItemStyle}">
        <Setter Property="Height" Value="35" />
    </Style>

    <Style x:Key="CustomGridSplitter" TargetType="GridSplitter">
        <Setter Property="Background" Value="{telerik:Office2013Resource ResourceKey=AccentBrush}" />
        <Setter Property="Width" Value="10" />
    </Style>

    <Style x:Key="CustomLabelTitle" TargetType="Label">
        <Setter Property="Background" Value="{telerik:Office2013Resource ResourceKey=AccentBrush}" />
        <Setter Property="Foreground" Value="{telerik:Office2013Resource ResourceKey=LowLightBrush}" />
        <Setter Property="FontSize" Value="18" />
        <Setter Property="FontWeight" Value="SemiBold" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Label">
                    <Border x:Name="_brdMain" 
                                        BorderThickness="{TemplateBinding BorderThickness}"
                                        BorderBrush="{TemplateBinding BorderBrush}" 
                                        Background="{TemplateBinding Background}"                                        
                                        CornerRadius="0,0,0,0"
                                        Padding="5 0 0 0"
                                        >
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="CustomCheckBox" TargetType="CheckBox" BasedOn="{StaticResource CheckBoxStyle}">        
        <Setter Property="LayoutTransform">
            <Setter.Value>
                <ScaleTransform ScaleX="1.5" ScaleY="1.5" />                
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="CustomCheckBoxText" TargetType="TextBlock">
        <Setter Property="Margin" Value="-15 0 0 0" />
        <Setter Property="VerticalAlignment" Value="Center" />
    </Style>
    
    <Style x:Key="CustomRadioButton" TargetType="RadioButton" BasedOn="{StaticResource RadioButtonStyle}">
        <Setter Property="LayoutTransform">
            <Setter.Value>
                <ScaleTransform ScaleX="1.5" ScaleY="1.5" />
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="SmallWidthTextBox" TargetType="TextBox" BasedOn="{StaticResource TextBoxStyle}">
        <Setter Property="Width" Value="50" />
    </Style>

    <Style x:Key="CustomOkButtonContent" TargetType="ContentControl">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <StackPanel Orientation="Horizontal">
                        <Image Margin="5 0 0 0" Source="pack://application:,,,/ChristieInnoMed.Framework.UI.ChristieControls;component/Resources/Images/Save48x48.png" Height="24" Width="24" />
                        <TextBlock Margin="5 0 5 0" Text="Ok" VerticalAlignment="Center" />
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <DataTemplate x:Key="ToolTipTemplate">
        <Grid Width="210">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>

            <Border BorderBrush="White" Opacity="0.75" BorderThickness="1" Background="Black" UseLayoutRounding="True"/>
            <StackPanel>                
                <TextBlock Text="{Binding Title}" Foreground="White" Margin="5 5 5 10" FontFamily="Segoe UI" FontSize="11" FontWeight="SemiBold" />
                <TextBlock Text="{Binding Description}" Margin="5" FontFamily="Segoe UI" FontSize="11" TextWrapping="Wrap" Foreground="White"/>
            </StackPanel>
            <Path Data="M0,0L7,14L14,0" Fill="White" Stretch="Fill" Width="14" Height="7" UseLayoutRounding="True" Stroke="White" VerticalAlignment="Bottom" HorizontalAlignment="Center"  Grid.Row="1" Margin="0 -1 0 0"/>
        </Grid>
    </DataTemplate>
</ResourceDictionary>

 

Thank's

Alain

Evgenia
Telerik team
 answered on 04 May 2015
6 answers
526 views
Hi,

Can you please update the location for Telerik WPF Nuget packages ?

Thanks,
Abbas K
Dimitrina
Telerik team
 answered on 04 May 2015
3 answers
118 views

I am the lead developer for a WPF application used internally by my company.  It includes an automated error reporting subsystem, and our users occasionally throw this exception:

Stack
trace: at
System.Windows.Controls.ItemContainerGenerator.ContainerFromIndex(Int32 index)
at
Telerik.Windows.Controls.RadTreeView.UpdateTabStopOnSelectionFromUI(IEnumerable`1
selectedItems) at Telerik.Windows.Controls.RadTreeView.OnCollapsed(Object
sender, RadRoutedEventArgs e)

 

Originally I used a RadTreeView in the application where the users were throwing this exception, but after weeks of trying to track it down unsuccessfully I replaced the control with a stock TreeView.  Now there is no RadTreeView *anywhere* the users cause this, but the number of these exceptions hasn't diminished at all.

 

I am using 2015.1.401.45 release on .NET 4.5.1.

Milena
Telerik team
 answered on 04 May 2015
2 answers
300 views

Hi all ,,

 am using MVVM and Telerik controls ,

 I have RadGrid with one Column as checkbox template.

My requiremnt is to select only One checkbox in the Grid ,So if one  Row is Selected the others is Unselected Immediately or show Message that one Row is Selected.

is there any way to uses this scenario in MVVM or Code Behind.  

Stefan
Telerik team
 answered on 04 May 2015
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?