Telerik Forums
UI for WPF Forum
3 answers
278 views

Hi Team,

 

I need to use some transition effects for RadTabControl when the tab selection is changed.I have used the below code in RadTabControl style, but it is not working as expected. Please share any ideas to use transition control in RadTabControl?

<ControlTemplate x:Key="TabControlTemplate" TargetType="telerikNavigation:RadTabControl">
    <Grid>
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Disabled"/>
                <VisualState x:Name="Normal"/>
            </VisualStateGroup>
            <VisualStateGroup x:Name="DropDownDisplayStates">
                <VisualState x:Name="DropDownButtonCollapsed"/>
                <VisualState x:Name="DropDownButtonVisible">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownButtonElement" Storyboard.TargetProperty="Visibility">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <Visibility>Visible</Visibility>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
            <VisualStateGroup x:Name="PlacementStates">
                <VisualState x:Name="Left">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderDockedElement" Storyboard.TargetProperty="LayoutTransform">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <RotateTransform Angle="-90"/>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="AdditionalContentTransform" Storyboard.TargetProperty="(telerik1:RadDockPanel.Dock)">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <Dock>Left</Dock>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownButtonElement" Storyboard.TargetProperty="(telerik1:RadDockPanel.Dock)" Duration="0">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <Dock>Left</Dock>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentBorder" Storyboard.TargetProperty="BorderThickness">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <Thickness>0 1 1 1</Thickness>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="Right">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderDockedElement" Storyboard.TargetProperty="LayoutTransform">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <RotateTransform Angle="90"/>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentBorder" Storyboard.TargetProperty="BorderThickness">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <Thickness>1 1 0 1</Thickness>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="Top"/>
                <VisualState x:Name="Bottom">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentBorder" Storyboard.TargetProperty="BorderThickness">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <Thickness>1 1 1 0</Thickness>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderDockedElement" Storyboard.TargetProperty="LayoutTransform">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <RotateTransform Angle="180"/>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="AdditionalContentTransform" Storyboard.TargetProperty="LayoutTransform">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <RotateTransform Angle="180"/>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="AdditionalContentTransform" Storyboard.TargetProperty="(telerik1:RadDockPanel.Dock)">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <Dock>Left</Dock>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownButtonElement" Storyboard.TargetProperty="(telerik1:RadDockPanel.Dock)">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <Dock>Left</Dock>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
        <telerik:RadDockPanel LastChildFill="True">
            <telerikPrimitives:LayoutTransformControl x:Name="HeaderDockedElement" SnapsToDevicePixels="True" telerik:RadDockPanel.Dock="Top">
                <Grid SnapsToDevicePixels="True">
                    <Border x:Name="HeaderBackground" SnapsToDevicePixels="True" Background="{TemplateBinding HeaderBackground}" Visibility="{TemplateBinding BackgroundVisibility}"/>
                    <telerik:RadDockPanel Panel.ZIndex="10"
                                          SnapsToDevicePixels="True">
                        <telerikPrimitives:LayoutTransformControl x:Name="AdditionalContentTransform" Margin="0 4 0 2" telerik1:RadDockPanel.Dock="Right">
                            <ContentPresenter x:Name="AdditionalContentElement" Content="{TemplateBinding AdditionalContent}"/>
                        </telerikPrimitives:LayoutTransformControl>
                        <ToggleButton x:Name="DropDownButtonElement"
                                      Visibility="Collapsed"
                                      telerik1:RadDockPanel.Dock="Right"
                                      Style="{TemplateBinding DropDownButtonStyle}"
                                      ClickMode="Press"
                                      IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
                            <telerikNavigation:RadContextMenu.ContextMenu>
                                <telerikTabControl:DropDownMenu x:Name="DropDownMenuElement"
                                                                StaysOpen="False"
                                                                Placement="Bottom"
                                                                Style="{TemplateBinding DropDownStyle}"
                                                                ItemTemplate="{TemplateBinding ItemDropDownContentTemplate}"
                                                                ItemTemplateSelector="{TemplateBinding ItemDropDownContentTemplateSelector}"
                                                                DisplayMemberPath="{TemplateBinding DropDownDisplayMemberPath}"/>
                            </telerikNavigation:RadContextMenu.ContextMenu>
                        </ToggleButton>
                        <RepeatButton x:Name="LeftScrollButtonElement" Margin="4 4 2 2"/>
                        <RepeatButton x:Name="RightScrollButtonElement" telerik:RadDockPanel.Dock="Right" RenderTransformOrigin="0.5 0.5" Margin="2 4 0 2">
                            <RepeatButton.RenderTransform>
                                <ScaleTransform ScaleX="-1"/>
                            </RepeatButton.RenderTransform>
                        </RepeatButton>
                        <Grid>
                            <ScrollViewer x:Name="ScrollViewerElement"
                                          VerticalScrollBarVisibility="Disabled"
                                          BorderThickness="0"
                                          IsTabStop="False"
                                          HorizontalScrollBarVisibility="{Binding (ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}">
                                <ItemsPresenter/>
                            </ScrollViewer>
                        </Grid>
                    </telerik:RadDockPanel>
                </Grid>
            </telerikPrimitives:LayoutTransformControl>
            <Border x:Name="ContentBorder"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness, Mode=TwoWay}"
                    Background="{TemplateBinding Background}"
                    Padding="{TemplateBinding Padding}">
 
                <Grid>
                    <telerik:RadTransitionControl x:Name="ContentElement"
                                                  Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsContentPreserved,Converter={StaticResource InvertBoolToVisConverter}}"
                                      ContentTemplate="{TemplateBinding SelectedContentTemplate}"
                                      ContentTemplateSelector="{TemplateBinding SelectedContentTemplateSelector}">
                        <telerik:RadTransitionControl.Transition>
                            <telerikTransitions:FadeTransition />
                        </telerik:RadTransitionControl.Transition>
                    </telerik:RadTransitionControl>
                    <Grid x:Name="ContentElementsPanel"
                          Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsContentPreserved, Converter={StaticResource BoolToVisConverter}}"/>
                </Grid>
            </Border>
        </telerik:RadDockPanel>
    </Grid>
</ControlTemplate>

 

 

Regards,

Antony

Antony
Top achievements
Rank 1
 answered on 23 Mar 2017
0 answers
163 views

I have a Telerik grid, and have following columns, that are binding with a data source

 

<telerik:RadGridView.Columns>
    <telerik:GridViewDataColumn Width="Auto" UniqueName="Id" Header="Id" DataMemberBinding="{Binding Id}"/>
<telerik:GridViewDataColumn Width="Auto" UniqueName="Name" Header="Name" DataMemberBinding="{Binding Name}"/>
<telerik:GridViewDataColumn Width="Auto" UniqueName="State" Header="State" DataMemberBinding="{Binding State}"/>
<telerik:GridViewDataColumn Width="Auto" UniqueName="Status" Header="Status" DataMemberBinding="{Binding localvariable}" "/>
</telerik:RadGridView.Columns>

Taimoor
Top achievements
Rank 1
 asked on 22 Mar 2017
9 answers
369 views

Hello,

I like the fact that you've implemented cell selection now, but I can't find any way of detecting which cells are selected, which seems fairly fundamental. Am I missing something?

Thanks,

Richard

Grinden
Top achievements
Rank 1
 answered on 22 Mar 2017
1 answer
147 views

Hi Team,

I want to add RadAutoCompleteBox inside RadGridView. On Mouse click focus is going to the RadAutoCompleteBox, but on Tab from the previous cell, the focus is not going to the RadAutoCompleteBox. The focus is still on the GridCell on Tab.

Could you please help me.

Thanks in advance.

Stefan
Telerik team
 answered on 22 Mar 2017
2 answers
170 views

Hi,

I use the RadRibbonWindow control. 

Is there a way to unify the theme of that control with the rest of the application. Actually, the control uses the system theme. The result vary from a system to another. Here are two screenshot, one from a windows 7 machine, another one from a windows server 2008 R2 machine.

Is it possible to "Metro-ize" the control ?

Emmanuel
Top achievements
Rank 1
 answered on 22 Mar 2017
2 answers
108 views

Hi,

I have a custom control which inherits from Radgridview. For few columns (GridViewDataColumn), I have set IsResizable to false. However, when i reorder this column I am still able to resize it. Any ideas what might be the issue? 

When i set IsResizable to false what does it exactly do?

Naved
Top achievements
Rank 1
 answered on 22 Mar 2017
3 answers
223 views

Good afternoon. Not working AutoFit(). After loading the diagram, should be AutoFit, but the screen always goes in the center of the diagram. I have tried the following combinations:

1)    like in this post  http://www.telerik.com/forums/autofit-to-fill-whole-space-of-the-host-window

this.diagram.AutoFit(new Thickness(5), true); 

it didn't help and I tried:

2)      Rect allShapesBounds = this.diagram.Shapes.GetEnclosingBounds();
            Rect inflatedRect = allShapesBounds.InflateRect(10, 10, 10, 10);
            this.diagram.FitTo(inflatedRect);

and it did not help too and I tried so:

3)         Rect allShapesBounds = this.diagram.Shapes.GetEnclosingBounds();
            Rect inflatedRect = allShapesBounds.InflateRect(10, 10, 10, 10);                                                                                                                                    this.diagram.BringIntoView(inflatedRect);

 

Svyatoslav
Top achievements
Rank 1
 answered on 22 Mar 2017
1 answer
125 views

Hi,

 

we are currently having problems with premature execution of CanExecute (System.Windows.Input.ICommand.CanExecute(object)) on our custom asynchronous ICommand implementation. Unfortunately, we cannot base our asynchronous ICommand on your DelegateCommand (Telerik.Windows.Controls.DelegateCommand). Our research has shown that this problem (and other problems like memory leaks) can be solved by using a WeakEventHandlerManager implementation. Frameworks like Prism are implementing such a WeakEventHandlerManager.

In general, we would like to keep our dependencies in our projects as low as possible, hence avoid referencing Prism or other libraries implementing a WeakEventHandlerManager. We have found in several forum posts (see below), that UI for WPF is implementing the internal static class WeakEventHandlerManager (Telerik.Windows.Controls.WeakEventHandlerManager), but is inaccessible to us due to its protection level.

http://www.telerik.com/forums/custom-appointment-validation#31FR5-6S9UGnhsD0Fcbzyw

http://www.telerik.com/forums/radmediaplayer-system-nullreferenceexception-object-reference-not-set-to-an-instance-of-an-object#3aeiMSrBEEGTu9wz1x4Wcw

http://www.telerik.com/forums/getfirstpartofoccurrenceswithnoenddates-leads-to-argumentoutofrangeexception-when-adding-no-end-date-recurring-appt-at-daystarttime-in-dayview#ERl6dJHd20yu02FAW4VkXw

http://www.telerik.com/forums/random-com-exception#RAVYUzxVokKq-46Gm1Q9qA

 

 

I am asking you to change the visibility of your WeakEventHandlerManager to public, so we can benefit from it without introducing an additional dependency in our projects just for the sake of this one helper class.

Please see the associated Feature Request: https://feedback.telerik.com/Project/143/Feedback/Details/213908-make-weakeventhandlermanager-public

 

Best Regards

Ivan Ivanov
Telerik team
 answered on 22 Mar 2017
1 answer
204 views

Hello,

I know this is an approved feature already. but no schedule of release yet.

Is there an alternative way at the moment in order to do this.?

I really need to use .xlsb

Regards,

John

Lance | Senior Manager Technical Support
Telerik team
 answered on 21 Mar 2017
5 answers
171 views

I am using this template:

<Style TargetType="telerik:TrackBallInfoControl">
    <Setter Property="Background" Value="White"/>
    <Setter Property="Foreground" Value="#FF103766"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
</Style>

 

And i am wonder how to reach other properties for example Pillar and the Dot color ?

Lance | Senior Manager Technical Support
Telerik team
 answered on 21 Mar 2017
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
Slider
Expander
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?