Telerik Forums
UI for WPF Forum
1 answer
96 views
Hi,

We have a WPF RadTreeListView in one of our RichText box we are able to succesfully export this to XAML and save to DB.
But when we import the xaml from DB to show it back as a document we are getting the following error:

'No matching constructor found on type 'Telerik.Windows.Controls.TreeListView.TreeListViewKeyboardCommandProvider'. You can use the Arguments or FactoryMethod directives to construct this type.'

Please help us as this is very critical for our project.
Dimitrina
Telerik team
 answered on 23 Jul 2013
1 answer
299 views
Hi Support,

I am trying to bind datatable to spreadsheet, but it does not show records into the spreadsheet control. Following is the source code:

DataTable result = somemethod();
        excelsheet.DataContext = result;

Am I missing something. Please let me know.

Thanks.
Andrew
Telerik team
 answered on 23 Jul 2013
2 answers
176 views
Hello,

I observe strange bahavior with hyperlink when you press "Backspace" button. More detail.
Open RadRichTextBox sample in "Demos - RadControls for WPF". In opened document place caret in place after last hyperlink letter (for example, after http://www.telerik.com). Press "Backspace" button. Instead delete the last letter, disappears hyperlink underline. If you press "Backspace" button again - last hyperlink letter will be deleted.

Is it possible to realize standard behavior (delete last letter after first "Backspace" button press)?
Andrey
Top achievements
Rank 1
 answered on 23 Jul 2013
3 answers
278 views
HI,

I would like to know if there is a way to change the color of an event's background when it is highlighted/hovered over and when it is selected, preferably without having to resort to creating a ControlTemplate.  Right now, I know how to change every other property of the event within a intrinsic style for EventContainer, and using style triggers i can change these properties depending on the state of the event.  However, the Background property doesn't appear to work when using triggers.  An example:  Here is my EventContainer Style:

<Style TargetType="g:EventContainer">
    <Setter Property="Background" Value="Green"/>
    <Setter Property="Foreground" Value="White"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Style.Triggers>
        <Trigger Property="IsMouseOver" Value="True">
            <Setter Property="Foreground" Value="Red"/>
            <Setter Property="BorderThickness" Value="0"/>
        </Trigger>
        <Trigger Property="IsFocused" Value="True">
            <Setter Property="Foreground" Value="Red"/>
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="Background" Value="Blue"/>
        </Trigger>
    </Style.Triggers>
</Style>

When the event is hovered over, the title text of the event correctly changes from white to red, as defined in the style, but when the event is selected, the background does not change from green to blue.  As I stated, I would like to avoid using ControlTemplate if it is possible, as ControlTemplates require a lot of extra useless markup, and a knowledge of the underlying infrastructure, which is impossible to get for the Telerik libraries.  
Ventzi
Telerik team
 answered on 23 Jul 2013
5 answers
401 views
I have panes that are docked, and for example have a size of 640 * 480 while docked. When I move the pane outside the application the floating pane now gets a different size, 220 * 300.

I want to keep the size equal, the floating pane should keep the size of the docked pane. I tried setting RadDocking.SetFloatingSize on the splitcontainer, but that does not help.

How can I solve this?
Yana
Telerik team
 answered on 23 Jul 2013
1 answer
77 views
I am attempting a simple example. I have a class with appropriate method to return a list of user objects. I've declaratively bound it to the autocompletebox. When I debug it, the select method does get called, but does not display anything?

I used the same code on some other machine, it works. 

Does this need 4.5? as one of the box has it (where it works) and other does not.

Alek
Telerik team
 answered on 23 Jul 2013
0 answers
57 views


Hello,

I have resolution problem in my application designed in MVVM pattern.When I reduce the resolution of screen,scroll apears but  some part of application hides inside scroll .The behaviour should be like a scroll bar should appear and visit shuould not hide.
How can I avoid hiding of screen.

Thanx in advance

Sanket
Top achievements
Rank 1
 asked on 23 Jul 2013
3 answers
222 views
Hi,

I want to style a diagram shape so I use VS2012 which generates me the following style.
<Style x:Key="RadDiagramShapeStyle1" TargetType="{x:Type telerik:RadDiagramShape}">
    <Setter Property="Foreground" Value="#FF333333"/>
    <Setter Property="Background">
        <Setter.Value>
            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFFFB356" Offset="1"/>
                <GradientStop Color="#FFFFDEDE"/>
                <GradientStop Color="#FFFF5D00" Offset="0.5"/>
            </LinearGradientBrush>
        </Setter.Value>
    </Setter>
    <Setter Property="BorderBrush" Value="#FFB84600"/>
    <Setter Property="FontSize" Value="11"/>
    <Setter Property="ZIndex" Value="2"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="StrokeThickness" Value="1"/>
    <Setter Property="Padding" Value="4"/>
    <Setter Property="StrokeDashArray" Value="1 0"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Geometry" Value="M0,0L60,0 60,40 0,40z"/>
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="{x:Type telerik:RadDiagramShape}">
                <Grid>
                    <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.TargetProperty="Visibility" Storyboard.TargetName="ActiveSelectedBorder">
                                        <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.TargetProperty="Visibility" Storyboard.TargetName="ConnectorsControl">
                                        <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.TargetProperty="Visibility" Storyboard.TargetName="SelectedBorder">
                                        <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.TargetProperty="Visibility" Storyboard.TargetName="NormalContent">
                                        <DiscreteObjectKeyFrame KeyTime="0">
                                            <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Collapsed</Visibility>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EditContent">
                                        <DiscreteObjectKeyFrame KeyTime="0">
                                            <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                            <VisualState x:Name="TextBoxEditMode">
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="NormalContent">
                                        <DiscreteObjectKeyFrame KeyTime="0">
                                            <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Collapsed</Visibility>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EditTextBox">
                                        <DiscreteObjectKeyFrame KeyTime="0">
                                            <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                        </VisualStateGroup>
                    </VisualStateManager.VisualStateGroups>
                    <Grid>
                        <Path x:Name="Geometry" Data="{TemplateBinding Geometry}" Fill="{TemplateBinding Background}" Opacity="{TemplateBinding Opacity}" Stretch="Fill" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding StrokeThickness}" StrokeDashArray="{TemplateBinding StrokeDashArray}"/>
                        <Border x:Name="SelectedBorder" BorderBrush="#FFADD6FF" BorderThickness="1" Visibility="Collapsed"/>
                        <Border x:Name="ActiveSelectedBorder" BorderBrush="#7FC92931" BorderThickness="2" Visibility="Collapsed"/>
                        <ContentPresenter x:Name="NormalContent" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" telerik:DiagramBehaviors.TextWrapping="Wrap" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        <Primitives:ConnectorsControl x:Name="ConnectorsControl" ItemContainerStyle="{TemplateBinding ConnectorStyle}" Visibility="Collapsed"/>
                    </Grid>
                    <Grid x:Name="PART_RotationalPart">
                        <ContentPresenter x:Name="EditContent" ContentTemplate="{TemplateBinding EditTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Visibility="Collapsed" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        <TextBox x:Name="EditTextBox" AcceptsReturn="True" Visibility="Collapsed">
                            <TextBox.Style>
                                <Style TargetType="{x:Type TextBox}">
                                    <Setter Property="TextWrapping" Value="Wrap"/>
                                    <Setter Property="TextAlignment" Value="Center"/>
                                    <Setter Property="FontSize" Value="11"/>
                                    <Setter Property="FontFamily" Value="Segoe UI"/>
                                    <Setter Property="Foreground" Value="Black"/>
                                    <Setter Property="HorizontalAlignment" Value="Stretch"/>
                                    <Setter Property="VerticalAlignment" Value="Center"/>
                                    <Setter Property="Margin" Value="5"/>
                                    <Setter Property="Padding" Value="2"/>
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate TargetType="{x:Type TextBox}">
                                                <Grid x:Name="RootElement">
                                                    <Rectangle Fill="White" Stroke="#FF767676" StrokeDashArray="3 3" UseLayoutRounding="True"/>
                                                    <ScrollViewer x:Name="PART_ContentHost" BorderThickness="0" Background="Transparent" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
                                                        <telerik:StyleManager.Theme>
                                                            <telerik:Office_BlackTheme/>
                                                        </telerik:StyleManager.Theme>
                                                    </ScrollViewer>
                                                </Grid>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </TextBox.Style>
                        </TextBox>
                    </Grid>
                </Grid>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>


This style works "somehow" but when I use it on a diagramshape and select the shape at runtime I no longer have the "connectors adorner".

Furthermore (I think this is a more common problem) I'm no longer theme aware.
I set my theme at runtime - "unstyled" controls change their appearance - but styled ones do not.

The primary problem is that I want to change some behaviour and need to style the control - without loosing the connector adorner.

Manfred
Zarko
Telerik team
 answered on 22 Jul 2013
3 answers
156 views
Hi,

my approach (using MVVM) is something like your "OrgChart" example.

Assume this example, where you start with the CEO predefined.
Then from a list the user can drag employees to  the chart.
Employees can change their position (by being dragged to a different "chief / leader").
Every Employee is assigned to another one.
There are kind of employees which may not "rule" others (let's say trainees). These employees can't act as "drop destination"

So the rules are:
- One node is fixed (CEO)
- the user must drop the new / existing Node on an existing one
- depending on the node type dropping is enabled or not (Visual feedback should be provided - like containers do)

After a drop operation I recalculate the Org-Model add / remove connectors and redraw the chart.

Is there an easy way to achieve this?

Manfred
Zarko
Telerik team
 answered on 22 Jul 2013
1 answer
138 views

hi

I used Blend 2012, when I retemplate the control (without doing anything to the generated style) i loss the top left radTickBar

attached image of it working, not working and code (not working but remove style={} and it works)

I am using 2012.3.1017.40

thanks
martin

     <telerik1:RadSlider Height="100"
   HandlesVisibility="Visible"
   TickPlacement="TopLeft"
   TickFrequency="1"
   IsSnapToTickEnabled="True"
   SelectionStart="0"  
   SelectionEnd="21"  
   MinimumRangeSpan="1"
   Minimum="0"
   SmallChange="1"
   LargeChange="1"
   Maximum="21"
   IsSelectionRangeEnabled="True" Style="{DynamicResource NotWorkingStyle}" >
   <telerik1:RadSlider.TickTemplate>
    <DataTemplate>
     <Grid>
      <TextBlock Text="{Binding}" FontSize="11"/>
     </Grid>
    </DataTemplate>
   </telerik1:RadSlider.TickTemplate>
  </telerik1:RadSlider>
Tina Stancheva
Telerik team
 answered on 22 Jul 2013
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
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?