This is a migrated thread and some comments may be shown as answers.

[Solved] Using Blend to create tabs

12 Answers 344 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Marina Levit
Top achievements
Rank 1
Marina Levit asked on 17 Sep 2009, 05:28 PM
So I can drag a RadTabControl onto the form. And I can drag RadTabItems onto the form. But how do I get them inside the tab control? What is the proper procedure for creating and designing a tab control and its contents from within Blend without using XAML, but by using the design time capabilities of Blend?

Thanks

12 Answers, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 18 Sep 2009, 11:37 AM
Hi Marina Levit,

I must admit that the design-time experience in Blend is not to the expected standard yet. We will be improving this in the Q3 release of the controls.

Currently you can add tabs to the TabControl by selecting the TabControl and then double-clicking the RadTabItem in the asset library.

Another options is to click the RadTabItem in the asset library and then double click the RadTabContorl. Either way, the TabItem will be added with nor header, so it will be visible as a few pixels in the header of the TabControl. You need to select the item and set the Header property.

If you want to add content to a TabItem you can click the TabItem and then double click on the content you want to add, say a Grid panel.

Unfortunately the TabItems will not switch in design time yet, so you will need to set the SelectedIndex of the TabControl to change the currently selected item.

Best wishes,
Miroslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Marina Levit
Top achievements
Rank 1
answered on 18 Sep 2009, 06:20 PM
Thanks for your response. I have been trying to follow your instructions, but no matter what I do the RadTabItem winds up outside the RadTabControl. That actually happens for all controls, no matter what is selected, if I double click on something the Asset library it becomes a sibling element, not a child element of the selected item.

I'm using the latest beta - does it already have the new design time features, or will that only be in the final release?
0
Miroslav
Telerik team
answered on 24 Sep 2009, 04:10 PM
Hi Marina,

I am sorry for the delayed reply.

Which version of Expression Blend are you using?

I was using Blend 3.0

Below is a screencast of how double-clicking works for me and how I can add content inside the TabItem.

http://screencast.com/t/ktt2dNt8Hyg0

So it seems that when you select the RadTabControl in the visual tree on the left and then double-click the TabItem it goes outside the TabControl?

Unfortunately the design-time improvements will be available with Q3 and not earlier. Also, they will be available for Blend 3.0 only because Blend 2 is quite inflexible as far as design-time support is concerned.

Greetings,
Miroslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Riccardo
Top achievements
Rank 1
answered on 25 Sep 2009, 10:44 AM
I've these dev plat:
Version Blend: 3.0.1927.0
Version Telerik: 2009-02-0911

RadTabControl on Blend doesn't work. The error is "Valore non compreso nell'intervallo previsto".
I've tried to create tabcontrol and tabitem structure manually but errors persist.

The XAML works correctly on browser :(
0
Miroslav
Telerik team
answered on 30 Sep 2009, 07:15 AM
Hi Riccardo,

Could you please send me the project that does not work for you?

You can email it to miroslav.paskov @ [telerik].com, if you cannot open a support ticket.

Kind regards,
Miroslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Marina Levit
Top achievements
Rank 1
answered on 07 Oct 2009, 06:16 PM
Regarding my original question. I am using Blend 3, I tried watching the screen capture and do what it is doing, but no matter what I do, the item is added after the control itself in the hierarchy, not inside.

Speaking of the screen capture, I'm not quite sure if I am doing everything right, it is running 2-3 times faster then it's supposed to be, because I'm guessing no one was actually clicking that quickly.  It's very hard to follow, can't tell what the user is really doing.

Including a screen shot. You can see that even though the radtabcontrol is selective, the blue rectangular highlight is over layout root. No matter what I do, I can't get it to go on the tab control.
0
Riccardo
Top achievements
Rank 1
answered on 12 Oct 2009, 08:13 AM
Sorry Miroslav for lately reply. I see your reply only now (losing notification...). There's something strange.
I've just create a little void project for you with only simple radtabcontrol. But so it works.
I don't understand what is wrong in my full project, unfortunaly I can't send it to you.

In my full project I checked also "ItemsControl" by Telerik, and it doesn't work.

Thanks.
0
Miroslav
Telerik team
answered on 13 Oct 2009, 07:53 AM
Hello Riccardo,

You say that:

"In my full project I checked also "ItemsControl" by Telerik, and it doesn't work."

Are you seeing the same error?

This is a base class and any problems there could be inherited by the controls.

Do you see the error when you place the control on the design canvas or when you edit its template?

Could you also try to translate the exception message for us if you see any?

Greetings,
Miroslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Riccardo
Top achievements
Rank 1
answered on 13 Oct 2009, 08:01 AM
Creating new void XAML in Visual Studio. Then opening it on blend 3 and inserting a RadTabControl (or an ItemsControl by Telerik).
If I add a ItemsControl (ms original) it works.
0
Miroslav
Telerik team
answered on 16 Oct 2009, 01:31 PM
Hi Riccardo,

I thought that the important thing may be creating the project first from VisualStudio but it worked for me. Event the VS preview showed the TabCotnrol, so this must be something that I am missing. (I am attaching a screenshot if what I see)

Would it be possible for you to attach  the VisualStudio debugger to Blend and send us the CallStack at the moment when the error in the ItemsControl appears?

To do this:

1. Go to Tools -> Options -> Debugging and uncheck Debug Just My Code Only (if it is checked)
2. Go to Debug -> Exceptions and make sure all types of exceptions and are checked.
3. Then run blend and go back to VS
4. Go to Debug -> Attach to Process and select the Blend.exe.
5. Break the design time by dropping the items control. At that time you should see the exception in blend as well. The CallStack of the exception could help us get to the issue.

Thank you for helping us resolve this,

Regards,
Miroslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Riccardo
Top achievements
Rank 1
answered on 16 Oct 2009, 02:18 PM
Error expeption detail
{"Attribute /Telerik.Windows.Controls.Navigation;Component/Themes/Office/Black/CoverFlow.xaml value is out of range. [Line: 17 Position: 34]"}

Call stack
> System.Windows.dll!MS.Internal.XcpImports.CreateFromXaml(System.IO.UnmanagedMemoryStream stream, string sourceAssemblyName, bool createNamescope, bool requireDefaultNamespace, bool allowEventHandlers) + 0xf0 bytes 
  System.Windows.dll!System.Windows.Controls.Control.GetBuiltInStyle(System.IntPtr nativeTarget, out System.IntPtr nativeStyle = 0) + 0x1df bytes 
  [Native to Managed Transition] 
  [Managed to Native Transition] 
  System.Windows.dll!MS.Internal.XcpImports.MethodEx(System.IntPtr ptr, string name = "Insert", MS.Internal.CValue[] cvData) + 0x79 bytes 
  System.Windows.dll!MS.Internal.XcpImports.MethodPack(System.IntPtr objectPtr, string methodName, object[] rawData) + 0x6d0 bytes 
  System.Windows.dll!MS.Internal.XcpImports.Collection_Insert<System.__Canon>(System.Windows.PresentationFrameworkCollection<System.__Canon> collection, int index, object value) + 0x5b bytes 
  System.Windows.dll!System.Windows.PresentationFrameworkCollection<System.__Canon>.InsertImpl(int index, object value) + 0x4c bytes 
  System.Windows.dll!System.Windows.PresentationFrameworkCollection<System.__Canon>.System.Collections.IList.Insert(int index, object value) + 0xe bytes 
  Microsoft.Expression.Platform.Silverlight.dll!Microsoft.Expression.Platform.Silverlight.InstanceBuilders.PresentationFrameworkCollectionInstanceBuilder.UpdateChild(Microsoft.Expression.DesignModel.Core.IInstanceBuilderContext context, Microsoft.Expression.DesignModel.Core.ViewNode viewNode, int childIndex, Microsoft.Expression.DesignModel.DocumentModel.DocumentNodeChangeAction action, Microsoft.Expression.DesignModel.DocumentModel.DocumentNode childNode) + 0x6d bytes 
  Microsoft.Expression.DesignModel.dll!Microsoft.Expression.DesignModel.InstanceBuilders.ClrObjectInstanceBuilder.UpdateInstance(Microsoft.Expression.DesignModel.Core.IInstanceBuilderContext context = {Microsoft.Expression.DesignSurface.ViewModel.InstanceBuilderContext}, Microsoft.Expression.DesignModel.Core.ViewNode viewNode = {UIElementCollection PropertyOrChildInvalid Add,0}) + 0x8f bytes 
  Microsoft.Expression.DesignModel.dll!Microsoft.Expression.DesignModel.Core.ViewNodeManager.UpdateInstance(Microsoft.Expression.DesignModel.Core.ViewNode viewNode = {UIElementCollection PropertyOrChildInvalid Add,0}) + 0x58 bytes 
  Microsoft.Expression.DesignModel.dll!Microsoft.Expression.DesignModel.Core.ViewNodeManager.UpdateInternal(Microsoft.Expression.DesignModel.Core.ViewNode viewNode = {UIElementCollection PropertyOrChildInvalid Add,0}) + 0xa2 bytes 
  Microsoft.Expression.DesignModel.dll!Microsoft.Expression.DesignModel.Core.ViewNodeManager.UpdateInternal(Microsoft.Expression.DesignModel.Core.ViewNode viewNode = {Grid Valid}) + 0x2f2 bytes 
  Microsoft.Expression.DesignModel.dll!Microsoft.Expression.DesignModel.Core.ViewNodeManager.UpdateInternal(Microsoft.Expression.DesignModel.Core.ViewNode viewNode = {UserControl Valid}) + 0x2f2 bytes 
  Microsoft.Expression.DesignModel.dll!Microsoft.Expression.DesignModel.Core.ViewNodeManager.Update(Microsoft.Expression.DesignModel.Core.IAttachViewRoot siteRoot = "DockTest:C:\\proj\\VS9\\Test\\Silverlight\\DockTest\\DockTest\\Tmp.xaml; Type: {Microsoft.Expression.DesignSurface.View.SilverlightSceneView}") + 0x88 bytes 
  Microsoft.Expression.DesignSurface.dll!Microsoft.Expression.DesignSurface.View.SceneView.Update() + 0x13d bytes 
  Microsoft.Expression.DesignSurface.dll!Microsoft.Expression.DesignSurface.View.SilverlightSceneView.Update() + 0x21 bytes 
  Microsoft.Expression.DesignSurface.dll!Microsoft.Expression.DesignSurface.View.SceneView.UpdateFromDamage(Microsoft.Expression.DesignSurface.ViewModel.SceneViewModel.ViewStateBits viewStateBits = None, Microsoft.Expression.DesignModel.DocumentModel.DocumentNodeChangeList damage, Microsoft.Expression.DesignSurface.ViewModel.SceneUpdateTypeFlags updateFlags) + 0x4cb bytes 
  Microsoft.Expression.DesignSurface.dll!Microsoft.Expression.DesignSurface.ViewModel.SceneViewModel.UpdateView(Microsoft.Expression.DesignSurface.ViewModel.SceneUpdateTypeFlags flags) + 0x1c bytes 
  Microsoft.Expression.DesignSurface.dll!Microsoft.Expression.DesignSurface.ViewModel.SceneViewModel.FirePipelineUpdate(Microsoft.Expression.DesignSurface.ViewModel.SceneUpdateTypeFlags flags = Updated) + 0x37 bytes 
  Microsoft.Expression.DesignSurface.dll!Microsoft.Expression.DesignSurface.ViewModel.SceneViewModel.SceneDocument_EditTransactionUpdated(object sender, System.EventArgs e) + 0xa bytes 
  Microsoft.Expression.DesignSurface.dll!Microsoft.Expression.DesignSurface.Documents.SceneDocument.OnUpdatedEditTransaction() + 0x29 bytes 
  Microsoft.Expression.DesignSurface.dll!Microsoft.Expression.DesignSurface.Tools.DefaultTypeInstantiator.CreateInstance(Microsoft.Expression.DesignModel.Metadata.ITypeId instanceType, Microsoft.Expression.DesignSurface.ViewModel.ISceneInsertionPoint insertionPoint = {UserControl:null->UserControl:Grid.Children}, System.Windows.Rect rect, Microsoft.Expression.DesignSurface.Tools.OnCreateInstanceAction action) + 0x3a4 bytes 
  Microsoft.Expression.DesignSurface.dll!Microsoft.Expression.DesignSurface.Tools.Assets.TypeAsset.InternalCreateInstance(Microsoft.Expression.DesignSurface.ViewModel.ISceneInsertionPoint insertionPoint, System.Windows.Rect rect, Microsoft.Expression.DesignSurface.Tools.OnCreateInstanceAction action) + 0x8c bytes 
  Microsoft.Expression.DesignSurface.dll!Microsoft.Expression.DesignSurface.Tools.Assets.Asset.CreateInstance(Microsoft.Expression.DesignSurface.ILicenseFileManager licenseManager = {Microsoft.Expression.DesignSurface.LicenseFileManager}, Microsoft.Expression.DesignSurface.ViewModel.ISceneInsertionPoint insertionPoint, System.Windows.Rect rect, Microsoft.Expression.DesignSurface.Tools.OnCreateInstanceAction action) + 0xb7 bytes 
  Microsoft.Expression.DesignSurface.dll!Microsoft.Expression.DesignSurface.Tools.AssetTool.OnDoubleClick() + 0x9b bytes 
  Microsoft.Expression.DesignSurface.dll!Microsoft.Expression.DesignSurface.UserInterface.ToolGroupButton.OnMouseDoubleClick(System.Windows.Input.MouseButtonEventArgs e = {System.Windows.Input.MouseButtonEventArgs}) + 0x34 bytes 
  PresentationFramework.dll!System.Windows.Controls.Control.HandleDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e = {System.Windows.Input.MouseButtonEventArgs}) + 0x135 bytes 
  PresentationCore.dll!System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate genericHandler, object genericTarget) + 0x31 bytes 
  PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target) + 0x27 bytes 
  PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target, System.Windows.RoutedEventArgs routedEventArgs) + 0x3e bytes 
  PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source = {Microsoft.Expression.DesignSurface.UserInterface.ToolGroupButton Contenuto: IsChecked:True}, System.Windows.RoutedEventArgs args = {System.Windows.Input.MouseButtonEventArgs}, bool reRaised = true) + 0x1bf bytes 
  PresentationCore.dll!System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject sender = {Microsoft.Expression.DesignSurface.UserInterface.ToolGroupButton Contenuto: IsChecked:True}, System.Windows.RoutedEventArgs args = {System.Windows.Input.MouseButtonEventArgs}, System.Windows.RoutedEvent newEvent) + 0x10a bytes 
  PresentationCore.dll!System.Windows.UIElement.CrackMouseButtonEventAndReRaiseEvent(System.Windows.DependencyObject sender, System.Windows.Input.MouseButtonEventArgs e) + 0x2e bytes 
  PresentationCore.dll!System.Windows.UIElement.OnMouseDownThunk(object sender, System.Windows.Input.MouseButtonEventArgs e) + 0xde bytes 
  PresentationCore.dll!System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate genericHandler, object genericTarget) + 0x31 bytes 
  PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target) + 0x27 bytes 
  PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target, System.Windows.RoutedEventArgs routedEventArgs) + 0x3e bytes 
  PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source = {Microsoft.Expression.DesignSurface.UserInterface.ToolGroupButtonContent}, System.Windows.RoutedEventArgs args = {System.Windows.Input.MouseButtonEventArgs}, bool reRaised = false) + 0x1bf bytes 
  PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject sender = {Microsoft.Expression.DesignSurface.UserInterface.ToolGroupButtonContent}, System.Windows.RoutedEventArgs args = {System.Windows.Input.MouseButtonEventArgs}) + 0x79 bytes 
  PresentationCore.dll!System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs args = {System.Windows.Input.MouseButtonEventArgs}, bool trusted) + 0x35 bytes 
  PresentationCore.dll!System.Windows.Input.InputManager.ProcessStagingArea() + 0x311 bytes 
  PresentationCore.dll!System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs input) + 0x42 bytes 
  PresentationCore.dll!System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport inputReport) + 0x62 bytes 
  PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.ReportInput(System.IntPtr hwnd, System.Windows.Input.InputMode mode, int timestamp, System.Windows.Input.RawMouseActions actions, int x, int y, int wheel) + 0x2e2 bytes 
  PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.FilterMessage(System.IntPtr hwnd = 2164084, int msg = 513, System.IntPtr wParam = 1, System.IntPtr lParam = 33226774, ref bool handled = false) + 0x4e1 bytes 
  PresentationCore.dll!System.Windows.Interop.HwndSource.InputFilterMessage(System.IntPtr hwnd = 2164084, int msg = 513, System.IntPtr wParam = 1, System.IntPtr lParam = 33226774, ref bool handled = false) + 0x75 bytes 
  WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd = 2164084, int msg = 513, System.IntPtr wParam = 1, System.IntPtr lParam = 33226774, ref bool handled = false) + 0xbe bytes 
  WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) + 0x7a bytes 
  WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback = {Method = {System.Object DispatcherCallbackOperation(System.Object)}}, object args = {MS.Win32.HwndSubclass.DispatcherOperationCallbackParameter}, bool isSingleParameter = true) + 0x8a bytes 
  WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source = {System.Windows.Threading.Dispatcher}, System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler = null) + 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 = 2164084, int msg = 513, System.IntPtr wParam = 1, System.IntPtr lParam = 33226774) + 0xdc bytes 
  [Native to Managed Transition] 
  [Managed to Native Transition] 
  WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame = {System.Windows.Threading.DispatcherFrame}) + 0xc7 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 
  Microsoft.Expression.Framework.dll!Microsoft.Expression.Framework.ExpressionApplication.RunApplication() + 0x3e bytes 
  Microsoft.Expression.Blend.dll!Microsoft.Expression.Blend.BlendApplication.BlendApplication(Microsoft.Expression.Framework.UserInterface.SplashScreen splashScreen) + 0x1f bytes 
  Blend.exe!Microsoft.Expression.Application.Main(string[] args) + 0x257 bytes 
0
Hristo Borisov
Telerik team
answered on 24 Oct 2009, 02:31 PM
Hi Riccardo,

We will do our best to include a fix for this in our release, and make our RadCoverFlow compatible with the latest version of Blend. Thank you for reporting this problem, and we look forward to receiving more valuable feedback from you again.

Kind regards,
Hristo Borisov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
TabControl
Asked by
Marina Levit
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
Marina Levit
Top achievements
Rank 1
Riccardo
Top achievements
Rank 1
Hristo Borisov
Telerik team
Share this question
or