Telerik Forums
UI for WPF Forum
3 answers
160 views
Hello,

I have a problem with the ScheduleViewDragDropBehavior class.
I want to be able to drop anything in my RadScheduleView, in an empty slot OR in an appointment.

Here is my dragDropBehavior class :
public class CPlanningTelerikDragDropBehavior : Telerik.Windows.Controls.ScheduleViewDragDropBehavior
       {
           
           public override void Drop(DragDropState state)
           {/*Drop code*/
 
               base.Drop(state);
           }
       }

But i don't know how to determine if the destination is an appointment or an empty slot.

Is there any way to do that ?

Regards,
Philippe.
Yana
Telerik team
 answered on 09 Apr 2012
5 answers
334 views
Does the RadRichTextBox support a 'paste plain text' mode?

If a user wants to paste in text that is formatted as a table, I would like it to just paste the data in the tables, becuase our reporting technology cannot handle html tables.

Any ideas if this can be done? I don't see anything in the Demos about special paste functions
Ivailo Karamanolev
Telerik team
 answered on 09 Apr 2012
2 answers
209 views
Hello,

I have created a contentTemplate and an editTemplate for my control which inherits from RadDiagramShape. All works well with the other controls, but once I click on the RadRichTextbox in the editTemplate, the control switches back to the contentTemplate. So it is impossible to edit the text of the RadRichTextbox during runtime.

To make it more clear:
diagramItem -> editmode -> mouse click on the RadRichTextbox -> diagramitem immediately goes out of edit mode.

The RadRichTextbox has not been modified, and the control doesn't have any special events. All buttons, the watermarkTextbox and the normal Textbox work as they should.

Am I missing something or is the functionality not yet implemented in the RadDiagram component?

Regards,
James
James
Top achievements
Rank 1
 answered on 09 Apr 2012
5 answers
123 views
Hi,

Here is the my xaml code.
<
Window x:Class="WpfApp.MainWindow"
        Title="MainWindow" Height="200" Width="525"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
 
    <Grid x:Name="grid">
        <telerik:RadGridView Name="radGridView1" ItemsSource="{Binding DataList}" Grid.Row="1" />
    </Grid>
</Window>

I would like to know how to detect the scrollbar exist or not in gridview ?
Vlad
Telerik team
 answered on 09 Apr 2012
6 answers
404 views
Hi All,

In my WPF application, I have two windows which are the free floating windows, I need to dock them to the right side of the screen and also want to make them free floating... How to do that using RadDocking? 

Regards,
Swati
Swati
Top achievements
Rank 1
 answered on 09 Apr 2012
1 answer
152 views
Hi,
I have a problem with RadtransitionControl:
I set the transition property in the XAML as :

SlideAndZoomTransition

 

 

MinAlpha="1.0" MinZoom="1.0" StartSlideAt="0.2" LayoutAnimation="Animated" SlideDirection="LeftToRight"


My goal is to change the slideDirection at runtime from LeftToRight to RightToLeft, but I can' t access the RadTransitionControl object.

this is the xaml of my project:

<

 

 

Window x:Class="Kribi3D_BenchMark.MainWindow"

 

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

 

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

 

xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"

 

Title="" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" ShowInTaskbar="False" WindowStyle="None" VerticalContentAlignment="Center" VerticalAlignment="Center" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Height="750px" Width="1350px" SnapsToDevicePixels="True">

 

 

<Window.Background>

 

 

<ImageBrush ImageSource="/Kribi3D_BenchMark;component/images/Kribi_Bench_mirino.png" />

 

 

</Window.Background>

 

 

<Window.Resources>

 

 

<ControlTemplate x:Key="FrameTemplate" TargetType="{x:Type Frame}" x:Name="template">

 

 

<telerik:RadTransitionControl Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Duration="00:00:02" FlowDirection="LeftToRight" UseLayoutRounding="True" TransitionStatusChanged="transition_TransitionStatusChanged" x:Name="transition" HorizontalAlignment="Center" HorizontalContentAlignment="Center" IsManipulationEnabled="True">

 

 

<telerik:RadTransitionControl.Transition>

 

 

<telerik:SlideAndZoomTransition MinAlpha="1.0" MinZoom="1.0" StartSlideAt="0.2" LayoutAnimation="Animated" SlideDirection="LeftToRight"/>

 

 

</telerik:RadTransitionControl.Transition>

 

 

</telerik:RadTransitionControl>

 

 

</ControlTemplate>

 

 

<Style x:Key="RadButtonStyle1" TargetType="{x:Type telerik:RadButton}">

 

 

<Setter Property="BorderThickness" Value="1"/>

 

 

<Setter Property="BorderBrush" Value="#FF848484"/>

 

 

<Setter Property="Background">

 

 

<Setter.Value>

 

 

<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">

 

 

<GradientStop Color="White" Offset="0"/>

 

 

<GradientStop Color="Gainsboro" Offset="0.5"/>

 

 

<GradientStop Color="#FFADADAD" Offset="0.5"/>

 

 

<GradientStop Color="#FFD4D4D4" Offset="1"/>

 

 

</LinearGradientBrush>

 

 

</Setter.Value>

 

 

</Setter>

 

 

<Setter Property="Foreground" Value="Black"/>

 

 

<Setter Property="HorizontalContentAlignment" Value="Center"/>

 

 

<Setter Property="VerticalContentAlignment" Value="Center"/>

 

 

<Setter Property="Padding" Value="3"/>

 

 

<Setter Property="CornerRadius" Value="1"/>

 

 

<Setter Property="Template">

 

 

<Setter.Value>

 

 

<ControlTemplate TargetType="{x:Type telerik:RadButton}">

 

 

<Grid SnapsToDevicePixels="True">

 

 

<Border x:Name="OuterBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}">

 

 

<Border x:Name="InnerBorder" BorderBrush="White" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="{TemplateBinding InnerCornerRadius}"/>

 

 

</Border>

 

 

<ContentPresenter x:Name="Content" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>

 

 

<Border x:Name="CommonStatesWrapper">

 

 

<Border x:Name="FocusVisual" BorderBrush="#FFFFC92B" BorderThickness="0" Background="Transparent" CornerRadius="{TemplateBinding CornerRadius}" Opacity="0" Visibility="Collapsed">

 

 

<Border x:Name="FocusInnerVisual" BorderBrush="Transparent" BorderThickness="1" CornerRadius="{TemplateBinding InnerCornerRadius}"/>

 

 

</Border>

 

 

</Border>

 

 

</Grid>

 

 

<ControlTemplate.Triggers>

 

 

<Trigger Property="IsMouseOver" Value="True">

 

 

<Setter Property="BorderBrush" TargetName="OuterBorder" Value="Transparent"/>

 

 

<Setter Property="BorderBrush" TargetName="InnerBorder" Value="White"/>

 

 

</Trigger>

 

 

<Trigger Property="IsPressed" Value="True">

 

 

<Setter Property="Opacity" TargetName="CommonStatesWrapper" Value="0"/>

 

 

<Setter Property="BorderBrush" TargetName="OuterBorder" Value="Transparent"/>

 

 

<Setter Property="BorderBrush" TargetName="InnerBorder">

 

 

<Setter.Value>

 

 

<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">

 

 

<GradientStop Color="#FFB69A78"/>

 

 

<GradientStop Color="#FFFFE17A" Offset="0.126"/>

 

 

</LinearGradientBrush>

 

 

</Setter.Value>

 

 

</Setter>

 

 

</Trigger>

 

 

<MultiTrigger>

 

 

<MultiTrigger.Conditions>

 

 

<Condition Property="IsBackgroundVisible" Value="False"/>

 

 

<Condition Property="IsMouseOver" Value="False"/>

 

 

</MultiTrigger.Conditions>

 

 

<Setter Property="Opacity" TargetName="OuterBorder" Value="1"/>

 

 

</MultiTrigger>

 

 

<Trigger Property="IsEnabled" Value="False">

 

 

<Setter Property="Opacity" TargetName="Content" Value="1"/>

 

 

<Setter Property="BorderBrush" TargetName="OuterBorder" Value="Transparent"/>

 

 

<Setter Property="Background" TargetName="InnerBorder" Value="Transparent"/>

 

 

<Setter Property="BorderBrush" TargetName="InnerBorder" Value="Transparent"/>

 

 

</Trigger>

 

 

<Trigger Property="IsFocused" Value="True">

 

 

<Setter Property="Visibility" TargetName="FocusVisual" Value="Visible"/>

 

 

<Setter Property="Opacity" TargetName="FocusVisual" Value="0"/>

 

 

</Trigger>

 

 

</ControlTemplate.Triggers>

 

 

</ControlTemplate>

 

 

</Setter.Value>

 

 

</Setter>

 

 

</Style>

 

 

</Window.Resources>

 

 

<Grid Height="672" telerik:StyleManager.Theme="Office_Black" VerticalAlignment="Bottom" HorizontalAlignment="Center">

 

 

<Frame HorizontalAlignment="Left" Name="frame1" VerticalAlignment="Stretch" Width="1350" NavigationUIVisibility="Hidden" Template="{StaticResource FrameTemplate}" Margin="0,0,0,58" HorizontalContentAlignment="Center" VerticalContentAlignment="Stretch" Height="614" SnapsToDevicePixels="False" Focusable="False" IsHitTestVisible="True" IsTabStop="False" />

 

 

<telerik:RadButton Height="48" HorizontalAlignment="Right" Margin="0,620,1192,0" Name="backfromTest" Tag="Bench" VerticalAlignment="Top" Width="48" Click="backfromTest_Click" BorderThickness="0" Style="{DynamicResource RadButtonStyle1}">

 

 

<telerik:RadButton.Background>

 

 

<ImageBrush ImageSource="/Kribi3D_BenchMark;component/images/Kribi_Bench_tasto_back.png" />

 

 

</telerik:RadButton.Background>

 

 

</telerik:RadButton>

 

 

<Image Height="65" HorizontalAlignment="Left" Margin="12,-68,0,0" Name="image1" Stretch="Fill" VerticalAlignment="Top" Width="533" Source="/Kribi3D_BenchMark;component/images/Kribi_Bench_logo.png" />

 

 

<Image Height="65" HorizontalAlignment="Left" Margin="1128,-68,0,0" Name="image2" Stretch="Fill" VerticalAlignment="Top" Width="200" Source="/Kribi3D_BenchMark;component/images/Kribi_Bench_Inartis.png" />

 

 

<telerik:RadButton Height="48" HorizontalAlignment="Right" Margin="0,620,1260,0" Name="radButton1" VerticalAlignment="Top" Width="48" BorderBrush="#00000000" BorderThickness="0" Click="radButton1_Click" Style="{DynamicResource RadButtonStyle1}" >

 

 

<telerik:RadButton.Background>

 

 

<ImageBrush ImageSource="images/Kribi_Bench_tasto_close.png"/>

 

 

</telerik:RadButton.Background>

 

 

</telerik:RadButton>

 

 

</Grid>

</

 

 

Window>


Yana
Telerik team
 answered on 09 Apr 2012
1 answer
38 views
Hi,
I want to Manipulate the "Legend Label" to have different FieldName at run time on the basis of selection of Radio Button which would be either "Value" or "Percent".

As, such in case of Value it would be:-
<telerik:ItemMapping DataPointMember="LegendLabel" FieldName="ChartLegendValue"/>
and in case of "Percent" it would be:-
<telerik
:ItemMapping DataPointMember="LegendLabel" FieldName="ChartLegendPercent"/>

How can i achieve this functionality ?
Can i use a data trigger / style or some other way?

Thanks in advance.
Yavor
Telerik team
 answered on 09 Apr 2012
1 answer
128 views
Hello,
I've got no problem persisitng RadGridView in a Caliburn Micro MVVM pattern...it's ok it works and I'm happy on this... but it doesn't persist gridview with hierachical child tempate

what it's best to do? have I to extend the GridViewCustomPropertyProvider from the demo's suite?
Thanks
Tina Stancheva
Telerik team
 answered on 09 Apr 2012
1 answer
263 views
Hello,
I have application with two windows. Each window have RadTabControl. I want to drag and drop tabs from one window to anoter.
How can i do it ?
Tina Stancheva
Telerik team
 answered on 09 Apr 2012
1 answer
170 views
Hi,

I am using RadTreeView on the left side of the screen and showing relative data in RadChart on the right of the screen. I am using MVVM design pattern (WPF), but facing few problems (as mentioned below) while zooming chart data.

1. I am NOT able to bind values for RangeEnd and RangeStart with MVVM property for zooming my chart data. My XAML code looks like:
<telerik:ChartDefaultView.ChartArea>
                                                <telerik:ChartArea Loaded="ChartArea_Loaded">
                                                        <telerik:ChartArea.ZoomScrollSettingsY>
                                                            <telerik:ZoomScrollSettings />
                                                        </telerik:ChartArea.ZoomScrollSettingsY>
                                                        <telerik:ChartArea.ZoomScrollSettingsX>
                                                            <telerik:ZoomScrollSettings MinZoomRange="0.01" RangeEnd="{Binding ChartRangeEnd, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" RangeStart="{Binding ChartRangeStart, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ScrollMode="ScrollAndZoom"  />
                                                        </telerik:ChartArea.ZoomScrollSettingsX>
                                                    <telerik:ChartArea.AxisX>
                                                        <telerik:AxisX IsDateTime="True"
                                                               AutoRange="True"
                                                               Step="1"
                                                               LabelStep="1"
                                                               DefaultLabelFormat="dd-MMM HH:mm"
                                                               LabelRotationAngle="30" StripLinesVisibility="Visible">
                                                                <telerik:AxisX.AxisStyles>
                                                                    <telerik:AxisStyles RenderOptions.ClearTypeHint="Enabled" />
                                                                </telerik:AxisX.AxisStyles>
                                                        </telerik:AxisX>
                                                    </telerik:ChartArea.AxisX>
                                                </telerik:ChartArea>
                                            </telerik:ChartDefaultView.ChartArea>


The properties definition in ViewModel is:
double _chartRangeEnd;
        public double ChartRangeEnd 
        { 
            get { return _chartRangeEnd; }
            set
            {
                _chartRangeEnd = value;
                OnPropertyChanged("ChartRangeEnd");
            }
        }

        double _chartRangeStart;
        public double ChartRangeStart
        {
            get { return _chartRangeStart; }
            set
            {
                _chartRangeStart = value;
                OnPropertyChanged("ChartRangeStart");
            }
        }


2. Zooming only works when I change RangeStart and RangeStart value pragmatically (in code behind on ChartArea_Loaded event), as shown below:
private void ChartArea_Loaded(object sender, RoutedEventArgs e)
        {
            this.radChart.DefaultView.ChartArea.ZoomScrollSettingsX.ScrollMode = ScrollMode.None;
            this.radChart.DefaultView.ChartArea.ZoomScrollSettingsX.RangeEnd = _viewModel.ChartRangeEnd;
            this.radChart.DefaultView.ChartArea.ZoomScrollSettingsX.RangeStart = _viewModel.ChartRangeStart;
            this.radChart.DefaultView.ChartArea.ZoomScrollSettingsX.ScrollMode = ScrollMode.ScrollAndZoom;
        }

Moreover if I remove top code line (this.radChart.DefaultView.ChartArea.ZoomScrollSettingsX.ScrollMode = ScrollMode.None;) then slider stretches 100% rather then getting within the limit of RangeStart and RangeEnd values.

The problem which I am facing while using code behind approach (using ChartArea_Loaded) is that when I click on any other node (after selecting first node) in the RadTreeView then RangeStart and RangeEnd values are not getting refreshed (as ChartArea_Loaded event is called only at the starting when Chart is loaded for the first time). 

I am willing and hoping to resolve this problem by using MVVM.

Any help will be highly appreciated.


Thank you,
Moon
Petar Marchev
Telerik team
 answered on 09 Apr 2012
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?