Hello,
I wrote a simple WPF application which uses Telerik's (2016.1.217.45) RadPane.
The pane contains a User control.
This user control contains a LED image.
When the user control is displayed without pane, the image is OK.
But - When the user control is displayed inside a pane, the image is cut off at its left side.
Can you please help ?
How can I attach a zip with the project ?
Thank you,
Zvika

Hi,
I need to dynamically modify the date and time format displayed by a RadDateTimePicker, in the InputBox and the Clock view.
I am able to change the format of the date and time displayed in the Input box using this code:
var culture = new CultureInfo("en-US"); // or "fr-FR"
var dtfInfo = new DateTimeFormatInfo();
dtfInfo.ShortDatePattern = "M/d/yyyy"; // or "yyyy-MM-dd" for fr-FR
dtfInfo.LongDatePattern = "M/d/yyyy"; // idem
dtfInfo.DateSeparator = "/"; // "-" for fr-FR
dtfInfo.ShortTimePattern = "h:mm tt"; // HH:mm for fr-FR
dtfInfo.LongTimePattern = "h:mm tt"; // idem
dtfInfo.TimeSeparator = ":";
culture.DateTimeFormat = dtfInfo;
System.Threading.Thread.CurrentThread.CurrentCulture = culture;
System.Threading.Thread.CurrentThread.CurrentUICulture = culture;
However, it seems this code has no effect on the format of the time items displayed by the Clock view , opened after the change of date and time patterns.
How to customize the formatting of the time items displayed in the Clock ?
I am testing with either "en-US" or "fr-FR" cultures.
Thx,
Alain

Hello Telerik,
I'm using a RadDiagram with a custom template for RadDiagramConnection. The function of this template is to rotate some text linked to the connector.
The following code is the style of my custom RadDiagramConnection :
<Style TargetType="diagramscontrols:RadDiagramConnection" x:Key="RadDiagramConnectionStyle_RotateText"> <!--<Setter Property="Background" Value="{StaticResource DiagramShape_Connection_Background}"/> <Setter Property="Stroke" Value="{StaticResource DiagramShape_Connection_BorderBrush}"/>--> <Setter Property="StrokeThickness" Value="1"/> <!--<Setter Property="ZIndex" Value="{StaticResource connectionZIndex}"/>--> <Setter Property="HorizontalContentAlignment" Value="Stretch"/> <Setter Property="VerticalContentAlignment" Value="Stretch"/> <Setter Property="FocusVisualStyle" Value="{x:Null}"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="diagramscontrols:RadDiagramConnection"> <Grid x:Name="RootTemplate" MinHeight="0" HorizontalAlignment="Stretch"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="SelectionStates"> <VisualState x:Name="Selected"/> <VisualState x:Name="SelectedInGroup"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedInGroupPath" Storyboard.TargetProperty="Visibility" Duration="0"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="Unselected"/> <VisualState x:Name="SelectedAsGroup"/> </VisualStateGroup> <VisualStateGroup x:Name="EditMode"> <VisualState x:Name="NormalMode"/> <VisualState x:Name="NormalEditMode"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="NormalContent" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Collapsed</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="EditContent" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="TextBoxEditMode"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="NormalContent" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Collapsed</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="EditTextBox" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Path x:Name="DeferredPath" Stroke="{TemplateBinding Stroke}" Opacity="0.7" Fill="{TemplateBinding Background}" StrokeThickness="{TemplateBinding StrokeThickness}" StrokeDashArray="2 2"/> <Path x:Name="SelectedInGroupPath" Visibility="Collapsed" Stroke="{StaticResource DiagramShape_Selected_BorderBrush}" /> <Path Stroke="{TemplateBinding Stroke}" Fill="{TemplateBinding Background}" StrokeThickness="{TemplateBinding StrokeThickness}" x:Name="GeometryPath" StrokeDashArray="{TemplateBinding StrokeDashArray}"/> <Grid x:Name="EdittingElement" RenderTransformOrigin="0.5 0.5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <!--TextBlock.TextAlignment="{Binding Tag.TextAlignement, RelativeSource={RelativeSource AncestorType=diagramscontrols:RadDiagramConnection}}"--> <Grid.RenderTransform> <RotateTransform> <RotateTransform.Angle> <MultiBinding Converter="{StaticResource BoundsToAngleConverter}"> <Binding Path="StartPoint" RelativeSource="{RelativeSource AncestorType=diagramscontrols:RadDiagramConnection}" /> <Binding Path="EndPoint" RelativeSource="{RelativeSource AncestorType=diagramscontrols:RadDiagramConnection}" /> </MultiBinding> </RotateTransform.Angle> </RotateTransform> </Grid.RenderTransform> <Border Background="Transparent"/> <TextBlock x:Name="NormalContent" Foreground="{TemplateBinding Foreground}" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" Text="{TemplateBinding Content}" TextAlignment="{Binding Tag.TextAlignement, RelativeSource={RelativeSource AncestorType=diagramscontrols:RadDiagramConnection}}" HorizontalAlignment="{Binding Tag.HorizontalTextAlignement, RelativeSource={RelativeSource AncestorType=diagramscontrols:RadDiagramConnection}}" VerticalAlignment="Center" /> <!--<ContentPresenter x:Name="NormalContent" />--> <ContentPresenter x:Name="EditContent" Visibility="Collapsed" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding EditTemplate}"/> <TextBox x:Name="EditTextBox" Visibility="Collapsed" Style="{StaticResource EditTextBoxStyle_Connection}" > <TextBox.InputBindings> <KeyBinding Key="Enter" Command="ApplicationCommands.NotACommand"/> </TextBox.InputBindings> </TextBox> </Grid> </Grid> </ControlTemplate> </Setter.Value> </Setter></Style>
However, I want that the text will be above of the connector. Moreover, I have some bad behaviors depending on the position of the Connector. I attached a file (arrowTexts) to show you these bad behaviors. Tell me if you want more examples.
I want to know if you can help me to find a solution to have the good text position.
Thank you very much !


Hello,
I have a RadTileView that is bound to a list of items, so that the tiles are automatically generated. I need to set the PreviewTileStateChanged and TileStateChanged events on the generated tiles. How can I do this?
I can't find any sort of 'tile created' event, and I can't set events in the ItemContainerStyle
Hello,
I cannot succeed to show any border for any control rather than RadLayoutControl in my runtime theme changable wpf application. What may be the reason for this, no matter what I try, I cannot show any border.
Hi!
Our users want to be able to use floating panes as separate windows.
So I was just wondering if there is an easy way to prevent floating panes (ToolWindows) from being minimized when the main window is minimized?
Kind regards,
Fredrik

I dont want users do grouping in my RadGridView, but I want the GroupPanel visible (ShowGroupPanel = true), because I will use that horizontal bar as a grid-integrated toolbar, and place some custom functionality buttons there. (like export excel, refresh grid etc.)
How can I achieve that? Thanks.
Hi Telerik,
I'm using a custom RadDiagramTextShape in RadDiagram :
<Style TargetType="diagramscontrols:RadDiagramTextShape"> <Setter Property="Background" Value="Transparent"/> <Setter Property="BorderBrush" Value="Transparent"/> <Setter Property="StrokeThickness" Value="1"/> <Setter Property="RenderTransformOrigin" Value="0.5 0.5"/> <Setter Property="FontSize" Value="{StaticResource DiagramShapeFontSize}"/> <Setter Property="FontFamily" Value="Segoe UI"/> <!--<Setter Property="TextBlock.TextAlignment" Value="{Binding Tag.HorizontalTextAlignement, RelativeSource={RelativeSource AncestorType=diagramscontrols:RadDiagramTextShape}}"/> <Setter Property="TextBlock.TextWrapping" Value="Wrap"/>--> <Setter Property="HorizontalContentAlignment" Value="Stretch"/> <Setter Property="VerticalContentAlignment" Value="Stretch"/> <Setter Property="diagrams:DiagramBehaviors.TextWrapping" Value="Wrap"/> <Setter Property="ZIndex" Value="2"/> <Setter Property="Padding" Value="4"/> <Setter Property="FocusVisualStyle" Value="{x:Null}"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="diagramscontrols:RadDiagramTextShape"> <Grid UseLayoutRounding="True"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="MouseStates"> <VisualState x:Name="Normal"/> <VisualState x:Name="MouseOver"/> </VisualStateGroup> <VisualStateGroup x:Name="ActiveConectionStates"> <VisualState x:Name="NormalActiveConnectionState"/> <VisualState x:Name="ActiveConnectionInsideShape"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ActiveSelectedBorder" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> </VisualStateGroup> <VisualStateGroup x:Name="ConnectorsAdornerVisibilityStates"> <VisualState x:Name="ConnectorsAdornerCollapsed"/> <VisualState x:Name="ConnectorsAdornerVisible"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ConnectorsControl" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> </VisualStateGroup> <VisualStateGroup x:Name="SelectionStates"> <VisualState x:Name="Selected"/> <VisualState x:Name="SelectedInGroup"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="SelectedInGroupBorder" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="Unselected"/> <VisualState x:Name="SelectedAsGroup"/> </VisualStateGroup> <VisualStateGroup x:Name="EditMode"> <VisualState x:Name="NormalMode"> </VisualState> <VisualState x:Name="NormalEditMode"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="NormalContent" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Collapsed</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="EditContent" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="TextBoxEditMode"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="NormalContent" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Collapsed</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="EditTextBox" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Grid> <Border Background="{TemplateBinding Background}" Visibility="Visible" BorderThickness="{Binding ElementName=RectangleBorder, Path=StrokeThickness, FallbackValue=1}"> <Border.BorderBrush> <VisualBrush> <VisualBrush.Visual> <Rectangle StrokeDashArray="{TemplateBinding StrokeDashArray}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding StrokeThickness}" Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualWidth}" Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}" x:Name="RectangleBorder"/> </VisualBrush.Visual> </VisualBrush> </Border.BorderBrush> </Border> <Border x:Name="SelectedInGroupBorder" Visibility="Collapsed" BorderBrush="{StaticResource DiagramShape_Selected_BorderBrush}" BorderThickness="2"/> <Border x:Name="ActiveSelectedBorder" Visibility="Collapsed" BorderBrush="{StaticResource DiagramShape_ActiveSelected_BorderBrush}" BorderThickness="2"/> <TextBlock x:Name="NormalContent" Margin="{TemplateBinding Padding}" HorizontalAlignment="{Binding Tag.HorizontalTextAlignement, RelativeSource={RelativeSource AncestorType=diagramscontrols:RadDiagramTextShape}}" TextAlignment="{Binding Tag.TextAlignement, RelativeSource={RelativeSource AncestorType=diagramscontrols:RadDiagramTextShape}}" VerticalAlignment="Center" diagrams:DiagramBehaviors.TextWrapping="Wrap" TextWrapping="Wrap" Text="{TemplateBinding Content}"/> <primitives:ConnectorsControl x:Name="ConnectorsControl" ItemsSource="{TemplateBinding Connectors}" Visibility="Collapsed" ItemContainerStyle="{TemplateBinding ConnectorStyle}"/> </Grid> <Grid x:Name="PART_RotationalPart" Margin="2"> <ContentPresenter x:Name="EditContent" Visibility="Collapsed" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding EditTemplate}" /> <TextBox x:Name="EditTextBox" BorderThickness="0" Margin="0" Style="{StaticResource EditTextBoxStyle}" VerticalAlignment="Stretch" Visibility="Collapsed"> <TextBox.InputBindings> <KeyBinding Key="Enter" Command="ApplicationCommands.NotACommand"/> </TextBox.InputBindings> </TextBox> </Grid> </Grid> </ControlTemplate> </Setter.Value> </Setter></Style><Style TargetType="TextBox" x:Key="EditTextBoxStyle"> <Setter Property="TextWrapping" Value="Wrap"/> <Setter Property="AcceptsReturn" Value="True"/> <Setter Property="TextAlignment" Value="Center"/> <Setter Property="HorizontalAlignment" Value="Stretch"/> <Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="Margin" Value="4"/> <Setter Property="FontSize" Value="11"/> <Setter Property="FontFamily" Value="Segoe UI"/> <Setter Property="Foreground" Value="Black"/> <Setter Property="Padding" Value="2"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="TextBox"> <Grid x:Name="RootElement" UseLayoutRounding="True"> <Rectangle Stroke="{StaticResource DiagramShape_EditTextBox_BorderBrush}" StrokeDashArray="3 3" Fill="{StaticResource DiagramShape_EditTextBox_Background}"/> <ScrollViewer Padding="{TemplateBinding Padding}" BorderThickness="0" Background="Transparent" Foreground="{TemplateBinding Foreground}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" x:Name="PART_ContentHost"/> </Grid> </ControlTemplate> </Setter.Value> </Setter></Style>
My nominal scenario is :
1- Select Text tool
2- Select size of the shape (drag the mouse in the diagram)
3- Write text in the TextBlock in the shape
4- Open settings of the shape, and select Background and BorderBrush
5- Shape is saved (with Serialization and after in database)
The problem is when I'm going in settings (step 4) without wrote text (step 3). In this case, the shape is unusable (If I click on it, I can't update the text), and not saved (when I leave the diagram and go back, the shape isn't here).
I can't access to fired events and I don't know where come from this problem.
Can you help me ?
Thank you.
