Telerik Forums
UI for WPF Forum
1 answer
80 views
Hello! The MouseEnter event isn`t  firing on PointSeries3D.  How can this effect be achieved?
Martin Ivanov
Telerik team
 answered on 02 May 2018
2 answers
66 views

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

jen
Top achievements
Rank 1
 answered on 01 May 2018
3 answers
130 views

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.

Stefan
Telerik team
 answered on 01 May 2018
1 answer
180 views

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

Dinko | Tech Support Engineer
Telerik team
 answered on 01 May 2018
3 answers
380 views

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.

Stefan
Telerik team
 answered on 30 Apr 2018
5 answers
795 views
I searched in your forum without any solution. In your documentation I found no hint for my problem. By trying your Testproject I could reproduce my problem.

I am using the latest version of Visual Studio 2017 with Resharper. Also I am using the latest official version of your zipped Binaries. But I have no installation of your Control Suite and also no GAC-Registration. The assemlies are referenced from a Binaries-Folder.

Do you have any hint for me?

Best regards,
Ronny
Dilyan Traykov
Telerik team
 answered on 30 Apr 2018
3 answers
96 views

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.

 

Petar Mladenov
Telerik team
 answered on 30 Apr 2018
12 answers
545 views
We are using RadContextMenu inside WPF RadGridview. We have few menu items. When i click on a menuitem we do some processing. 

It is not closing after click. Do i have to close it manually?

We are using Telerik.Windows.Controls.dll file version 2011.1.315.40.

Thanks
Ram
Vladimir Stoyanov
Telerik team
 answered on 27 Apr 2018
1 answer
43 views

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

 

Dilyan Traykov
Telerik team
 answered on 27 Apr 2018
2 answers
206 views

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

Martin Ivanov
Telerik team
 answered on 27 Apr 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?