Telerik Forums
UI for WPF Forum
1 answer
153 views
how I can display a modal window in XBAP synchronously so that the process does not continue until you close the window?

Thanks
Konstantina
Telerik team
 answered on 04 Feb 2011
1 answer
297 views

Hello,
I have some problems using Radcombobox.
The list with the data is Alignment to right. 
if I choose an item from the list is longer than the width of Radcombobox
the text in Radcombobox has been cut to the right and no to the left.
i have attaced sample code here.
Thanks

<

 

 

Border Grid.Row="2" Style="{StaticResource BorderCombo_Details}" Width="140" HorizontalAlignment="Right" Grid.Column="3" VerticalAlignment="Top">
<telerikInput:RadComboBox IsReadOnly="True" KeyUp="OnKeyUpClear" FlowDirection="RightToLeft" HorizontalAlignment="Right" x:Name="cmbVolStatus" TabIndex="4"
SelectionChanged="cmbVolStatus_SelectionChanged"
Style="{StaticResource RadComboBox_Details}"
SelectedValue="{Binding Source={StaticResource VolunteersVS},
Path=VD_VolStatusID, Mode=TwoWay,
ValidatesOnDataErrors=True,
NotifyOnValidationError=True}"
Validation.Error="Validation_Error"
SelectedValuePath="VS_ID"
DisplayMemberPath="VS_Desc"/>
</Border>

 


Konstantina
Telerik team
 answered on 04 Feb 2011
0 answers
110 views
Hi everybody!

I was working with the RadGridView control in the Telerik version 2009.2.701.35 and for some reasons we can not use newer version. We have been some time working on a way to export the values of a column (that we represent with checkboxes, even in the header) to excel.

As obvious, it can not handle directly the checkboxes and it left the spaces without value. We need to know if it is possible to set the value before the exporting time as I read it was possible for ASP.

Any idea?

Thanks in advance.
Alvaro
Top achievements
Rank 1
 asked on 03 Feb 2011
2 answers
90 views
I have been attempting to incorporate the Drag and Drop example for two listBoxes.  Yet, when i drag my item it just shows the text and not the item template from the listBox.  I have included a image to show what i am talking about...

private void OnDragInfo(object sender, DragDropEventArgs e)
       {
           if (e.Options.Status == DragStatus.DragComplete)
           {
               var listBox = e.Options.Source.FindItemsConrolParent() as ItemsControl;
               var itemsSource = listBox.ItemsSource as IList;
               var operation = e.Options.Payload as DragDropOperation;
               itemsSource.Remove(operation.Payload);
           }
       }
       private void OnDropInfo(object sender, DragDropEventArgs e)
       {
           var destination = e.Options.Destination;
           if (e.Options.Status == DragStatus.DropPossible && destination is ListBoxItem)
           {
               var listBox = destination.FindItemsConrolParent() as ListBox;
               FrameworkElement rootChild = VisualTreeHelper.GetChild(listBox, 0) as FrameworkElement;
               Storyboard dropStoryboard = rootChild.FindResource("DropStoryboard") as Storyboard;
               dropStoryboard.Begin();
               //Get the DropCueElemet:
               var dropCueElement = (VisualTreeHelper.GetChild(listBox, 0) as FrameworkElement).FindName("DropCueElement") as FrameworkElement;
               var operation = e.Options.Payload as DragDropOperation;
               //Get the parent of the destination:
               var visParent = VisualTreeHelper.GetParent(destination) as UIElement;
               //Get the spacial relation between the destination and its parent:
               var destinationStackTopLeft = destination.TransformToVisual(visParent).Transform(new Point());
               var yTranslateValue = operation.DropPosition == DropPosition.Before ? destinationStackTopLeft.Y : destinationStackTopLeft.Y + destination.ActualHeight;
               dropCueElement.RenderTransform = new TranslateTransform() { Y = yTranslateValue };
               e.Handled = true;
           }
           if (e.Options.Status == DragStatus.DropPossible && destination is ListBox)
           {
               var listBox = destination as ListBox;
               FrameworkElement rootChild = VisualTreeHelper.GetChild(listBox, 0) as FrameworkElement;
               Storyboard dropStoryboard = rootChild.FindResource("DropStoryboard") as Storyboard;
               dropStoryboard.Begin();
               //Get the DropCueElemet:
               var dropCueElement = (VisualTreeHelper.GetChild(listBox, 0) as FrameworkElement).FindName("DropCueElement") as FrameworkElement;
               var operation = e.Options.Payload as DragDropOperation;
               // Get the size of the items:
               var itemsPresenter = listBox.GetTemplateChild<FrameworkElement>("ItemsPresenterElement");
               var panel = VisualTreeHelper.GetChild(itemsPresenter, 0) as Panel;
               if (panel != null)
               {
                   var yTranslateValue = panel.ActualHeight;
                   dropCueElement.RenderTransform = new TranslateTransform() { Y = yTranslateValue };
               }
           }
           //Hide the DropCue:
           if (e.Options.Status == DragStatus.DropImpossible || e.Options.Status == DragStatus.DropCancel || e.Options.Status == DragStatus.DropComplete)
           {
               var listBox = destination as ListBox;
               if (listBox == null)
               {
                   listBox = e.Options.Destination.FindItemsConrolParent() as ListBox;
               }
               FrameworkElement rootChild = VisualTreeHelper.GetChild(listBox, 0) as FrameworkElement;
               Storyboard dropStoryboard = rootChild.FindResource("DropStoryboard") as Storyboard;
               dropStoryboard.Stop();
           }
           //Place the item:
           if (e.Options.Status == DragStatus.DropComplete && destination is ListBoxItem)
           {
               var listBox = e.Options.Destination.FindItemsConrolParent() as ListBox;
               var itemsSource = listBox.ItemsSource as IList;
               var destinationIndex = itemsSource.IndexOf(e.Options.Destination.DataContext);
               var operation = e.Options.Payload as DragDropOperation;
               var insertIndex = operation.DropPosition == DropPosition.Before ? destinationIndex : destinationIndex + 1;
               itemsSource.Insert(insertIndex, operation.Payload);
               listBox.Dispatcher.BeginInvoke(new Action(() =>
               {
                   listBox.SelectedIndex = insertIndex;
               }));
           }
           //Place the item:
           if (e.Options.Status == DragStatus.DropComplete && destination is ListBox)
           {
               var listBox = e.Options.Destination as ListBox;
               var itemsSource = listBox.ItemsSource as IList;
               var operation = e.Options.Payload as DragDropOperation;
               itemsSource.Add(operation.Payload);
           }
       }
       private void OnDropQuery(object sender, DragDropQueryEventArgs e)
       {
           var destination = e.Options.Destination;
           if (e.Options.Status == DragStatus.DropDestinationQuery && destination is ListBoxItem)
           {
               var listBox = destination.FindItemsConrolParent() as ListBox;
               //Cannot place na item relative to itself:
               if (e.Options.Source == e.Options.Destination)
               {
                   return;
               }
               //Get the spatial relation between the destination item and the vis. root:
               var destinationTopLeft = destination.TransformToVisual(Window.GetWindow(destination)).Transform(new Point());
               //Should the new Item be moved before or after the destination item?:
               bool placeBefore = (e.Options.CurrentDragPoint.Y - destinationTopLeft.Y) < destination.ActualHeight / 2;
               var operation = e.Options.Payload as DragDropOperation;
               operation.DropPosition = placeBefore ? DropPosition.Before : DropPosition.After;
               e.QueryResult = true;
               e.Handled = true;
           }
           if (e.Options.Status == DragStatus.DropDestinationQuery && destination is ListBox)
           {
               var listBox = destination as ListBox;
               // Cannot drop the last or only item of the list box within the same list box:
               var operation = e.Options.Payload as DragDropOperation;
               //if (listBox.ItemsSource != null && listBox.ItemsSource.Cast<object>().Last() != operation.Payload)
               //{
               e.QueryResult = true;
               e.Handled = true;
               //}
               //else
               //{
               //    e.QueryResult = false;
               //    e.Handled = true;
               //}
           }
       }
       private void OnDragQuery(object sender, DragDropQueryEventArgs e)
       {
           if (e.Options.Status == DragStatus.DragQuery)
           {
               var sourceControl = e.Options.Source;
               e.QueryResult = true;
               e.Handled = true;
               var dragCue = RadDragAndDropManager.GenerateVisualCue(sourceControl);
               dragCue.HorizontalAlignment = HorizontalAlignment.Left;
               dragCue.Content = sourceControl.DataContext;
               e.Options.DragCue = dragCue;
               e.Options.Payload = new DragDropOperation() { Payload = sourceControl.DataContext };
           }
           if (e.Options.Status == DragStatus.DropSourceQuery)
           {
               e.QueryResult = true;
               e.Handled = true;
           }
       }
any help would be great...  im still relatively new to the WPF game...   i apologize in advance...
Brian
Top achievements
Rank 1
 answered on 03 Feb 2011
2 answers
53 views
I want to make the starting day of weekly view to be Tuesday. 
How can I do it?

Right now I have an ugly workaround of the following.
The users simply has to ignore empty sunday and monday on the left.

<telerik:WeekViewDefinition
    x:Name="weekViewDefinition"                                                 
    VisibleDays="9"/>

gureumi
Top achievements
Rank 1
 answered on 03 Feb 2011
3 answers
101 views
Hi, we're getting this exception when updating to v. 2010.3.1331.40 in the RadGridView control:
 
System.Reflection.TargetInvocationException was unhandled
  Message=Property accessor 'C' on object 'RadControlsWpfApp2.A' threw the following exception:'Object does not match target type.'

It seems like the problem is related to the number of sublevels in the DataMemberBinding. In the example below the binding of the first column works, but the second column fails.

To recreate the exception:

<Window x:Class="RadControlsWpfApp2.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" 
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <telerik:RadGridView
            ItemsSource="{Binding Items}"
            AutoGenerateColumns="False">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=B.Id}" Header="Works" ></telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=B.C.Name}" Header="Fails" ></telerik:GridViewDataColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</Window>
namespace RadControlsWpfApp2
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            var model = new Model();
            DataContext = model;
        }
    }
}
using System.Collections.Generic;

namespace RadControlsWpfApp2
{
    class Model
    {
        public Model()
        {
            Items = new List<A> {new A(), new A()};
        }
        public IList<A> Items { getset; }
    }

    class A
    {
        public A()
        {
            B = new B();
        }
        public B B { getset; }
    }
    class B
    {
        public B()
        {
            C = new C();
            Id = "3213123";
        }

        public string Id { getset; }
        public C C { getset; }
    }
    class C
    {
        public C()
        {
            Name = "Test";
        }
        public string Name { getset; }
    }
}


And here is the exception details:
System.Reflection.TargetInvocationException was unhandled
  Message=Property accessor 'C' on object 'RadControlsWpfApp2.A' threw the following exception:'Object does not match target type.'
  Source=System
  StackTrace:
       at System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component)
       at Telerik.Windows.Data.PropertyPathDescriptor.GetPropertyOwnerValue(Object parentObject) in c:\Builds\WPF_Scrum\HotFix_2010_Q3\Sources\Development\Core\Data\ItemProperties\PropertyPathDescriptor.cs:line 161
       at Telerik.Windows.Controls.GridView.GridViewCell.GetDataErrors() in c:\Builds\WPF_Scrum\HotFix_2010_Q3\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 614
       at Telerik.Windows.Controls.GridView.GridViewCell.UpdateIsValidState() in c:\Builds\WPF_Scrum\HotFix_2010_Q3\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 588
       at Telerik.Windows.Controls.GridView.GridViewCell.UpdateValue() in c:\Builds\WPF_Scrum\HotFix_2010_Q3\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 1358
       at Telerik.Windows.Controls.GridView.GridViewCell.OnColumnChanged(GridViewColumn oldColumn, GridViewColumn newColumn) in c:\Builds\WPF_Scrum\HotFix_2010_Q3\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 1341
       at Telerik.Windows.Controls.GridView.GridViewCellBase.set_Column(GridViewColumn value) in c:\Builds\WPF_Scrum\HotFix_2010_Q3\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCellBase.cs:line 160
       at Telerik.Windows.Controls.GridView.DataCellsPresenter.PrepareContainerForItemOverride(DependencyObject element, Object item) in c:\Builds\WPF_Scrum\HotFix_2010_Q3\Sources\Development\Controls\GridView\GridView\GridView\DataCellsPresenter.cs:line 261
       at System.Windows.Controls.ItemsControl.MS.Internal.Controls.IGeneratorHost.PrepareItemContainer(DependencyObject container, Object item)
       at System.Windows.Controls.ItemContainerGenerator.System.Windows.Controls.Primitives.IItemContainerGenerator.PrepareItemContainer(DependencyObject container)
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.InsertContainer(Int32 childIndex, UIElement container, Boolean isRecycled) in c:\Builds\WPF_Scrum\HotFix_2010_Q3\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 889
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.InsertNewContainer(Int32 childIndex, UIElement container) in c:\Builds\WPF_Scrum\HotFix_2010_Q3\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 808
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.AddContainerFromGenerator(Int32 childIndex, UIElement child, Boolean newlyRealized) in c:\Builds\WPF_Scrum\HotFix_2010_Q3\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 791
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.GenerateChild(IItemContainerGenerator generator, Size constraint, GridViewColumn column, Int32& childIndex, Size& childSize) in c:\Builds\WPF_Scrum\HotFix_2010_Q3\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 703
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.GenerateChild(IItemContainerGenerator generator, Size constraint, GridViewColumn column, IDisposable& generatorState, Int32& childIndex, Size& childSize) in c:\Builds\WPF_Scrum\HotFix_2010_Q3\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 681
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.DetermineRealizedColumnsBlockList(Size constraint) in c:\Builds\WPF_Scrum\HotFix_2010_Q3\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 412
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.MeasureOverride(Size constraint) in c:\Builds\WPF_Scrum\HotFix_2010_Q3\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 80
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
       at System.Windows.Controls.ItemsPresenter.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Control.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Border.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Control.MeasureOverride(Size constraint)
       at Telerik.Windows.Controls.GridView.GridViewRowItem.MeasureOverride(Size constraint) in c:\Builds\WPF_Scrum\HotFix_2010_Q3\Sources\Development\Controls\GridView\GridView\GridView\Rows\GridViewRowItem.cs:line 169
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(Size constraint) in c:\Builds\WPF_Scrum\HotFix_2010_Q3\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:line 1269
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.ContextLayoutManager.UpdateLayout()
       at System.Windows.UIElement.UpdateLayout()
       at System.Windows.Interop.HwndSource.SetLayoutSize()
       at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
       at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
       at System.Windows.Window.SetRootVisual()
       at System.Windows.Window.SetRootVisualAndUpdateSTC()
       at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)
       at System.Windows.Window.CreateSourceWindow(Boolean duringShow)
       at System.Windows.Window.CreateSourceWindowDuringShow()
       at System.Windows.Window.SafeCreateWindowDuringShow()
       at System.Windows.Window.ShowHelper(Object booleanBox)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.Run()
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
       at RadControlsWpfApp2.App.Main() in c:\users\arnvol\documents\visual studio 2010\Projects\RadControlsWpfApp2\RadControlsWpfApp2\obj\x86\Debug\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.Reflection.TargetException
       Message=Object does not match target type.
       Source=mscorlib
       StackTrace:
            at System.Reflection.RuntimeMethodInfo.CheckConsistency(Object target)
            at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
            at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
            at System.SecurityUtils.MethodInfoInvoke(MethodInfo method, Object target, Object[] args)
            at System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component)
       InnerException:

Regards,
Arnstein
Nedyalko Nikolov
Telerik team
 answered on 03 Feb 2011
5 answers
213 views
After I've updated to latest version, I've recieved a null reference exception when I was setting the RadGridView's ItemSource to null.
I've rolled back to the previous version of Telerik Controls and it is back to normal.  Could you check the new version for a possible bug?
Vlad
Telerik team
 answered on 03 Feb 2011
1 answer
124 views
Please let me know how I can:

1. Programmatically select an item in a Hierarchical gridview. I want to select items both from the inner and the outer grids.

2. If an item (in the outer grid ) is not in the visible range and it has been expanded programmatically, how I can bring it up in the visible range.
Maya
Telerik team
 answered on 03 Feb 2011
1 answer
150 views

Simple code:

 

 

 

 

 

<Window x:Class="MainWindow"
    Height="350" Width="525" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    <Grid>
        <telerik:RadTabControl>
  
            <telerik:RadTabItem Header="Calendar">
                    <telerik:RadDocking>
  
                    </telerik:RadDocking>
            </telerik:RadTabItem>
  
            <telerik:RadTabItem Header="Colors">
                    <telerik:RadDocking >
  
                    </telerik:RadDocking>
            </telerik:RadTabItem>
  
            <telerik:RadTabItem Header="Quote">
                    <telerik:RadDocking >
  
                    </telerik:RadDocking>
            </telerik:RadTabItem>
  
        </telerik:RadTabControl>
  
    </Grid>
</Window>





The main window is blinking when you switch between tabs repeatedly. Sometimes window even disappear/hides.
How to solve this ?
George
Telerik team
 answered on 03 Feb 2011
1 answer
91 views
Hi,

Please excuse my ignorance but I'm just beginning to do battle with WPF styling / Templates etc.

I'm trying to style up a RadMenu that is databound and uses the  HierarchicalDataTemplate. I'd like to have the header row menu items styled differently to the child items, including font sizes, mouseover colors / animations etc. The examples contained in the documentation seem to be very limited, showing only the most basic of style setters and no examples of selecting different styles based on the type of menu item (header item or child). Can anyone provide me with a more complete example of radically changing the styling of a RadMenu as described above?

Many thanks

Mat
Pana
Telerik team
 answered on 03 Feb 2011
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?