Telerik Forums
UI for WPF Forum
3 answers
1.2K+ views
Hi

I need to add a tab control programmatically.

The item I am adding is a class containing amongst other things the Description to be diaplayed on the tab.

Do you have any examples of this.

Kind Regards

David
Stefan
Telerik team
 answered on 19 Oct 2012
1 answer
191 views
Hi,

I messed around a lot with the Calendar but I can't get it working with DayButtonStyleSelector.

I created a new project, added a StyleSelector class and tried to use it -- SelectStyle is never called.
My XAML:
<Window x:Class="WpfApplication1.MainWindow"
        xmlns:VMs="clr-namespace:WpfApplication1"
        xmlns:calendar="clr-namespace:Telerik.Windows.Controls.Calendar;assembly=Telerik.Windows.Controls.Input"
        Title="MainWindow" Height="350" Width="525" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    <Grid>
        <Grid.Resources>
            <VMs:MyStyleSelector x:Key="stsWeekend">
                <VMs:MyStyleSelector.SpecialStyle>
                    <Style TargetType="{x:Type calendar:CalendarButton}">
                        <Setter Property="Background">
                            <Setter.Value>
                                <SolidColorBrush Color="Orange" Opacity="0.6"/>
                            </Setter.Value>
                        </Setter>
                    </Style>
                </VMs:MyStyleSelector.SpecialStyle>
            </VMs:MyStyleSelector>
        </Grid.Resources>
 
        <telerik:RadCalendar HorizontalAlignment="Left" Margin="68,96,0,0" Name="radCalendar1" VerticalAlignment="Top" DayButtonStyleSelector="{StaticResource stsWeekend}"/>
    </Grid>
</Window>

My Style selector Class:
namespace WpfApplication1 {
    public class MyStyleSelector : System.Windows.Controls.StyleSelector {
        public override Style SelectStyle(object item, DependencyObject container) {
            CalendarButtonContent content = item as CalendarButtonContent;
            if(content != null) {
                if(content.Date.DayOfWeek == DayOfWeek.Tuesday && content.ButtonType == CalendarButtonType.Date) {
                    return SpecialStyle;
                }
            }
            return base.SelectStyle(item, container);
        }
        public Style SpecialStyle { get; set; }
    }
}

I use 2012.2.1015.40

Manfred
Yana
Telerik team
 answered on 19 Oct 2012
1 answer
245 views
Hi,
How to add custom ListStyle  in RichTextbox . My Liststyle is attacteh this post
please help any one
Petya
Telerik team
 answered on 19 Oct 2012
13 answers
137 views
Hi!

I can't find how to have a button or a blank line to add a new element to my List<> with my RadGridView.

I've the "CanUserInsertRows" checked, but nothing on the GUI permit me to add/delete an element.

We have to create ourself buttons to do this? Why have these properties then?

Thank you!
Priyalakshmi
Top achievements
Rank 1
 answered on 19 Oct 2012
6 answers
451 views
Hi, I'm using the latest ScheduleView control, in timeline view mode only. I would really like to have a more "fluid" horizontally scrolling experience, rather than the default day-by-day scrolling.

Question 1: Is it possible to scroll the timeline view by using eg. hours? By default, it seems to insist on starting at 00:00 on the first day within view, and allows only scrolling day-by-day. (With LargeChangeInterval = "1d" - setting hours does not seem to work here).

Question 2: What I would really like is to have the timeline view positioning itself with the current time always at a fixed position, eg. towards the left of the screen. So it would appear to be "floating by" underneath. Have you seen/heard about anyone doing this before with your control?

Regards,
Thomas
Gurpreet
Top achievements
Rank 1
 answered on 19 Oct 2012
4 answers
202 views
2012 Q2

Is it possible to store the words for the dictionary in a database? If not, can do you have an example of how to store it in a file. I have a smart client application that will be run on multiple machines and I will need to place the file on a network share that they can all access. I want to use a global dictionary file that is shared by all users. Using a database would be the best option.

Also, have you added the check as you type red underline feature yet for mispelled words?

Thanks,

Billy Jacobs
Don
Top achievements
Rank 1
 answered on 19 Oct 2012
5 answers
182 views
Hi,

I noticed, that under cetain circumstances my whole application hangs when trying to expand a group in the RadGridView. To reproduce, please find the example app here:

https://dl.dropbox.com/u/1551828/WpfApplication1.zip

and follow the steps described below:

1. Expand the groups 5-1 (in that order)
2. Maximize the window
3. Collapse the groups 1-5 (in that order)
4. Epand the group 5
5. The App hangs in:

Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewCellsPanel.UpdateVirtualizedCells() Line 269    C#
Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewCellsPanel.MeasureOverride(System.Windows.Size availableSize) Line 306  C#



The version of the Telerik WPF UI Controls is: 2012.2.912.35. Client OS is Windows 7 x64.

The whole stacktrace is:

    PresentationFramework.dll!System.Windows.FrameworkElement.MinMax.MinMax(System.Windows.FrameworkElement e) + 0xe4 bytes
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) + 0xca bytes  
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) + 0x337 bytes 
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size constraint) + 0x4fc bytes   
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) + 0x1d0 bytes 
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) + 0x337 bytes 
    PresentationFramework.dll!System.Windows.Controls.Control.MeasureOverride(System.Windows.Size constraint) + 0x7b bytes 
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) + 0x1d0 bytes 
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) + 0x337 bytes 
>   Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewCellsPanel.MeasureCell(Telerik.Windows.Controls.GridViewColumn column, Telerik.Windows.Controls.GridView.GridViewCellBase cell, System.Windows.Size size) Line 439  C#
    Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewCellsPanel.RealizeAndMeasureCells(int startIndex, int predictedLastIndex, System.Func<int,int> calculateNextIndex) Line 340 C#
    Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewCellsPanel.UpdateVirtualizedCells() Line 269    C#
    Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewCellsPanel.MeasureOverride(System.Windows.Size availableSize) Line 306  C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) + 0x1d0 bytes 
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) + 0x337 bytes 
    PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayout() + 0x1c4 bytes  
    PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayoutCallback(object arg) + 0x19 bytes 
    PresentationCore.dll!System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork() + 0x10 bytes
    PresentationCore.dll!System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() + 0x97 bytes  
    PresentationCore.dll!System.Windows.Media.MediaContext.RenderMessageHandlerCore(object resizedCompositionTarget) + 0x80 bytes  
    PresentationCore.dll!System.Windows.Media.MediaContext.RenderMessageHandler(object resizedCompositionTarget) + 0x2b bytes  
    WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, bool isSingleParameter) + 0x8a bytes 
    WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler) + 0x4a bytes
    WindowsBase.dll!System.Windows.Threading.Dispatcher.WrappedInvoke(System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler) + 0x44 bytes
    WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl() + 0x5d bytes 
    WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(object state) + 0x38 bytes
    mscorlib.dll!System.Threading.ExecutionContext.runTryCode(object userData) + 0x51 bytes
    [Native to Managed Transition] 
    [Managed to Native Transition] 
    mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x67 bytes   
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x45 bytes   
    WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke() + 0x63 bytes 
    WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue() + 0x127 bytes   
    WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0x63 bytes
    WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0xbe bytes   
    WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) + 0x7a bytes   
    WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, bool isSingleParameter) + 0x8a bytes 
    WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler) + 0x4a bytes
    WindowsBase.dll!System.Windows.Threading.Dispatcher.WrappedInvoke(System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler) + 0x44 bytes
    WindowsBase.dll!System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, bool isSingleParameter) + 0x91 bytes
    WindowsBase.dll!System.Windows.Threading.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority priority, System.Delegate method, object arg) + 0x40 bytes  
    WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) + 0xdc bytes
    [Native to Managed Transition] 
    [Managed to Native Transition] 
    WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame) + 0xc4 bytes 
    WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame frame) + 0x49 bytes 
    WindowsBase.dll!System.Windows.Threading.Dispatcher.Run() + 0x4c bytes 
    PresentationFramework.dll!System.Windows.Application.RunDispatcher(object ignore) + 0x1e bytes 
    PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window) + 0x6f bytes
    PresentationFramework.dll!System.Windows.Application.Run(System.Windows.Window window) + 0x26 bytes
    PresentationFramework.dll!System.Windows.Application.Run() + 0x19 bytes
    WpfApplication1.exe!WpfApplication1.App.Main() + 0x5e bytes C#
    [Native to Managed Transition] 
    [Managed to Native Transition] 
    mscorlib.dll!System.AppDomain.ExecuteAssembly(string assemblyFile, System.Security.Policy.Evidence assemblySecurity, string[] args) + 0x3a bytes   
    Microsoft.VisualStudio.HostingProcess.Utilities.dll!Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() + 0x2b bytes 
    mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state) + 0x66 bytes  
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x6f bytes   
    mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() + 0x44 bytes  

any help would be appreciated.
Kind Regards,
Nico
Dimitrina
Telerik team
 answered on 19 Oct 2012
4 answers
247 views
Hi,

I am experiencing some problem.While exporting the gridview to PDF using RadDocument.
If normal gridview with out any grouping its working fine,
In case if I am grouped the grid on some column the data is exporting in wrong way.
Suppose in case my grouping contains 5 rows after exporting to PDF in PDF file that group contains 25 rows.(incase 3 then 9).
I followed the Demos which you provided in the silverlight demo as well as installed demos.for that also same problem.
you can check in your online demos.

Wonder till no one found that problem in your demos.Here I am giving demo link 

http://demos.telerik.com/silverlight/#GridView/PrintAndExportWithRadDocument

just group and export to PDF.

please solve the problem and it si helpfull if you give solved demo project.

Thanks and Regards
Naresh Mesineni
Makrand
Top achievements
Rank 1
 answered on 19 Oct 2012
1 answer
161 views
Hi,

we use VS2008 and Telerik V2012.2.912.35 and we have a RadDocking application with multiple RadPanes inside of it. I would like to know if it's possible to persist only all RadPane but not their content because all RadPane have multiple TextBox and we don't want to persist all textbox.text property inside all of them.

If it's possible, can you provide us a small demo on how to do it?

Thank's
Tina Stancheva
Telerik team
 answered on 18 Oct 2012
2 answers
74 views
Hi,

Reading the release notes for Q3 2012 it states that Drag Reorder has now been enabled.

Is there any "How to" documentation on this subject?

Thanks,

Rob
Robert
Top achievements
Rank 1
 answered on 18 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?