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.
Hi,
I have been working on hosting winforms inside WPF, so I was running this sample project:
https://github.com/telerik/xaml-sdk/tree/master/Docking/WinFormsInsideDocking
But it only works when it uses Telerik.Windows.Themes.Office_Black, otherwise it gives error of Static Resource "PaneGroup_PaneFrameStyle" not found.
I'm using Telerik.Windows.Themes.Office2016 and need to implement the same style which is implemented in the sample project.
Kindly let me know, what needs to be changed for 2016 theme.
Thanks,
Tayyaba
I would like to use the RadCalculatorPicker in the following fashion:
In a dialog box or form, the user should be able to tab to the RadCalculatorPicker or click on its TextBox and the border should highlight as other controls do and the entire text should be selected.
From this point, the user should be able to freely edit the text in the TextBox, as long as it remains numeric, and the text should remain as he edits it and be reflected in the calculator when it is pulled down.
The user should be able to tab or mouse away from the TextBox, perform operations on other controls and subsequently return to the TextBox, whereupon the text in the TextBox should remain as it was when he left it. The Value should match this text.
While the user may/should be prevented from entering non-numeric characters, he should be able to leave the TextBox empty (""). It's not necessary that the control return a double? for the Value, as I can wrap the control with my own code to do so, but being able to have an empty TextBox is desired.
In short, I want the control to function as a normal TextBox (with numeric characters only) until the user clicks on the dropdown button, at which point the calculator appears and, starting with the string in the TextBox, functions as it does today.
I can derive a UserControl from this to perform some of what I want to do, but the TextBox and calculator seem to be very tightly bound and it appears that programming it to function as I desire would be a PITA, if possible at all.
Is there a way to make the control function in this manner? If not, would you consider making changes to it or creating a new control in the future that would work this way? The justification for it is to speed keyboard entry of numeric data while allowing the power of a calculator to be readily at hand.
Thanks