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.
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;
}
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
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.
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.
<
telerik:RadGridView
Name
=
"RadgridHoover"
DockPanel.Dock
=
"Top"
BorderThickness
=
"1,0,0,0"
BorderBrush
=
"LightGray"
CanUserDeleteRows
=
"True"
CanUserInsertRows
=
"True"
ShowColumnHeaders
=
"True"
ShowGroupPanel
=
"{Binding IsShowGroupPanel, Mode=TwoWay}"
AlternateRowBackground
=
"WhiteSmoke"
AlternationCount
=
"2"
AutoGenerateColumns
=
"False"
SelectionMode
=
"Multiple"
IsReadOnly
=
"True"
IsFilteringAllowed
=
"True"
EditTriggers
=
"CurrentCellClick"
SelectionUnit
=
"FullRow"
EnableColumnVirtualization
=
"False"
EnableRowVirtualization
=
"True"
RowIndicatorVisibility
=
"Collapsed"
GridLinesVisibility
=
"Both"
behaviors:GridColumnsBindingBehavior.Columns
=
"{Binding Columns, Mode=TwoWay}"
ItemsSource
=
"{Binding MembersTable, Mode=TwoWay}"
SelectedItem
=
"{Binding SelectedItem}"
caliburn:Message.Attach
=
"[Event SelectionChanged] = [Action MembersGridSelectionChanged($executionContext)];[Event DataLoaded] = [Action GridDataLoaded($executionContext)];[Event LoadingRowDetails] = [Action LoadingRowDetails($executionContext)]"
DataLoadMode
=
"Asynchronous"
>
</
telerik:RadGridView
>
We have 2 Radlistboxes within a usercontrol. We can drag and drop items between both with no issues and can reorder within each listbox with no issues either. Each radlistbox is highly stylized with grid's within each to create the look we need and to position data when drag and drop occurs.
What we would like to do is allow items from radlistbox1 to be dragged into radlistbox2. However, we do not want the item from radlistbox1 to be removed. Is there a built in function that would allow us to do this relatively simply?
All examples (in documentation) and demo wpf drag and drop but remove items. Let's see an example that matches what we need. Documentation and forums have not given us an ideas on how to implement this functionality.
Any code examples would be helpful also.
Thanks
See partial Code below for the user control
<UserControl.Resources>
<Style x:Key="DraggableListBoxItem" TargetType="telerik:RadListBoxItem">
<Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True" />
<Style.Triggers>
<DataTrigger Binding="{Binding ExhibitType}" Value="CE">
<Setter Property="BorderBrush" Value="#DAF2CB"></Setter>
<Setter Property="Background" Value="#F2F7EF"></Setter>
<Setter Property="Margin" Value="0,2,0,2"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</UserControl.Resources>
<telerik:RadListBox x:Name="RadListBox1" TabIndex="1" Grid.Row="0" Margin="0,5,0,0" FontSize="11"
SelectionMode="Multiple"
ItemContainerStyle="{StaticResource DraggableListBoxItem}">
<telerik:RadListBox.ItemTemplate>
<DataTemplate>
<Grid telerik:DragDropManager.AllowDrag="True" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Button x:Name="btnPreviewReportLayoutImage" Click="btnPreviewReportLayoutImage_Click"
Height="16" Width="16" Margin="3 0 3 0" Grid.Column="0"
ToolTip="Click On Image To View Report Layout" HorizontalAlignment="Left">
<Button.Template>
<ControlTemplate>
<Image Source="../Images/ReportImage2.png" />
</ControlTemplate>
</Button.Template>
</Button>
<TextBlock Text="{Binding Name}" TextWrapping="Wrap" Grid.Column="1"></TextBlock>
</Grid>
</DataTemplate>
</telerik:RadListBox.ItemTemplate>
<telerik:RadListBox.DragVisualProvider>
<telerik:ScreenshotDragVisualProvider />
</telerik:RadListBox.DragVisualProvider>
<telerik:RadListBox.DragDropBehavior>
<telerik:ListBoxDragDropBehavior />
</telerik:RadListBox.DragDropBehavior>
</telerik:RadListBox>
<telerik:RadListBox x:Name="RadListBox2" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="5" Margin="2,5,2,2" FontSize="11"
AllowDrop="True" SelectionMode="Multiple"
ItemContainerStyle="{StaticResource DraggableListBoxItem}"
ScrollViewer.CanContentScroll="True">
<telerik:RadListBox.ItemTemplate>
<DataTemplate>
<Grid telerik:DragDropManager.AllowDrag="True" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="400" />
<ColumnDefinition Width="80" />
<ColumnDefinition Width="80" />
<ColumnDefinition Width="140" />
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Name}" TextWrapping="Wrap"></TextBlock>
<ComboBox x:Name="cbGroupLevel" Grid.Column="1" SelectedValuePath="Content" SelectedValue="{Binding Grouping}" Margin="0 0 15 0" >
<ComboBoxItem>E</ComboBoxItem>
<ComboBoxItem>P</ComboBoxItem>
<ComboBoxItem>-</ComboBoxItem>
</ComboBox>
<ComboBox x:Name="cbTOCLevel" Grid.Column="2" SelectedValuePath="Content" SelectedValue="{Binding TOCLevel}" Margin="0 0 15 0">
<ComboBoxItem>0</ComboBoxItem>
<ComboBoxItem>1</ComboBoxItem>
<ComboBoxItem>2</ComboBoxItem>
<ComboBoxItem>3</ComboBoxItem>
<ComboBoxItem>4</ComboBoxItem>
</ComboBox>
<ComboBox x:Name="cbPortfolios" Grid.Column="3" SelectedValuePath="Content"
SelectedValue="{Binding Portfolios}" Margin="0 0 15 0">
<ComboBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<CheckBox IsChecked="{Binding IsSelected}" Width="20" VerticalAlignment="Center" />
</StackPanel>
</DataTemplate>
</ComboBox.ItemTemplate>
<ComboBoxItem IsSelected="True">All</ComboBoxItem>
<ComboBoxItem>Placeholder</ComboBoxItem>
<ComboBoxItem>Placeholder</ComboBoxItem>
<ComboBoxItem>Placeholder</ComboBoxItem>
<ComboBoxItem>Placeholder with a very long name.......................</ComboBoxItem>
<ComboBoxItem>Placeholder</ComboBoxItem>
<ComboBoxItem>Placeholder</ComboBoxItem>
<ComboBoxItem>Placeholder</ComboBoxItem>
</ComboBox>
<TextBlock Grid.Column="4" Text="{Binding TOCTitle}"></TextBlock>
</Grid>
</DataTemplate>
</telerik:RadListBox.ItemTemplate>
<telerik:RadListBox.DragVisualProvider>
<telerik:ScreenshotDragVisualProvider />
</telerik:RadListBox.DragVisualProvider>
<telerik:RadListBox.DragDropBehavior>
<telerik:ListBoxDragDropBehavior AllowReorder="True"/>
</telerik:RadListBox.DragDropBehavior>
</telerik:RadListBox>
I have a custom usercontrol that is replacing the ContentTemplate for a RadDiagramShape. This usercontrol has a listbox containing other usercontrols.
I'm wondering how I can have the RadDiagram drag and selection events captured for the parent shape when clicking on items in the inner listbox?
Thanks