Telerik Forums
UI for WPF Forum
5 answers
261 views
Hi,

We are currently using the tabcontrol with IsContentPreserved="true".  This works beautifully at preserving the viewmodels, that is until we drag the tabs to re-order them.  When the tabs are reordered the tab being dragged loses it content and the viewmodel is recreated.  As a result a user loses all their data etc.

Background
  • We are utilising the CINCH V2 MVVM framework which makes use of MEF as a viewmodel locator
  • Our viewmodels are all set to non-shared (in MEF) and are set to the views datacontext via

    meffed

     :ViewModelLocator.ViewModel="{x:Static ViewModels:ViewModelKeys.MainWindowViewModel}"

  • Our tabcontrol has it's item source bound as ItemsSource="{Binding Views}"
  • We dynamically add tabs programmatically via

var workspace = new ValidatingAwareWorkspace(null, viewToDisplayInTab, workspaceDataParameter, tabLabel, true);

 Views.Add(workspace); 

  • This also uses MEF to determine which view to display via the key "viewToDisplayInTab" and displays that view on the tab via the following datatemplate

<DataTemplate DataType="{x:Type CinchV2:WorkspaceData}">

    <AdornerDecorator>

        <Border HorizontalAlignment="Stretch"

                VerticalAlignment="Stretch"

                Margin="2"

                CinchV2:NavProps.ViewCreator="{Binding}"/>

    </AdornerDecorator>

</DataTemplate>

 

What i'm after:
I understand that there are obviously a lot of factors at play here that could be breaking the IsContentPreserved when reordering tabs but i thought i would post here to see if you guys have any ideas because it only breaks when i set AllowDragReorder to true

Thanks,
Brock

 

Martin Ivanov
Telerik team
 answered on 29 Jun 2015
2 answers
152 views

I am having problem with FirstVisibleTime Property, I have set it to 8 but when the calendar is displayed it shows 12:00 AM. This property works is working for other calendars, there is really no difference between them. the only difference is that i have set the width of the claendar to 55 becasue i just want to use it to display the time ruler.

 

Vikas

 

Vikas
Top achievements
Rank 1
 answered on 29 Jun 2015
1 answer
117 views

I've installed the Q2 2015 msi on my dev box.

I am trying to build the new ExamplesCS_WPF solution and getting the following errors:

RadTreeViewItemStyle and RadToolBarStyle not found

This occurs in Telerik_UI_for_WPF_2015_2_623_Demos\Examples\Docking\FirstLook\Example.xaml

I have to comment out those styles to build. 

Can anyone offer a solution to this issue?

Thanks!

 

Kalin
Telerik team
 answered on 29 Jun 2015
1 answer
97 views

 I have RadDocument which is having some html input.

var provider = new HtmlFormatProvider();
RadDocument _document = provider.Import(some xml text input);

Now I am assigning this _document to the RichTextBox Document.

RichTextBox1.Document = _document ;

While rendering this RichTextBox in UI we are getting the below Exception.

The component 'Telerik.Windows.Documents.UI.Layers.TableDecorationLayers.TableMovement.TableAdorner' does not have a resource identified by the URI '/Telerik.Windows.Documents;component/ui/layers/tabledecorationlayers/tablemovement/tableadorner.xaml'

 And StackTrace is:





at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at Telerik.Windows.Documents.UI.Layers.TableDecorationLayers.TableMovement.TableAdorner..ctor(DocumentWebLayoutPresenter webPresenter, UILayerUpdateContext context, TableMovementUILayer movementLayer)
at Telerik.Windows.Documents.UI.Layers.TableDecorationLayers.TableMovement.TableMovementUILayer.InitializeAdorner()
at Telerik.Windows.Documents.UI.Layers.TableDecorationLayers.TableMovement.TableMovementUILayer.UpdateViewPortOverride(UILayerUpdateContext context)
at Telerik.Windows.Documents.UI.Layers.UIElementsLayer.UpdateViewPort(UILayerUpdateContext context)
at Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.UpdateUILayersViewPortSize(RectangleF viewPort)
at Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.MeasureOverride(Size availableSize)
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.ContentPresenter.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, Boolean& hasDesiredSizeUChanged)
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.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.StackPanel.StackMeasureHelper(IStackMeasure measureElement, IStackMeasureScrollData scrollData, Size constraint)
at System.Windows.Controls.StackPanel.MeasureOverride(Size constraint)
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.ScrollContentPresenter.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, Boolean& hasDesiredSizeUChanged)
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.ScrollViewer.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.Border.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, Boolean& hasDesiredSizeUChanged)
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 MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
at System.Windows.Controls.ContentPresenter.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.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(Object resizedCompositionTarget)
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) 

 

Please help me to resolve this issue.


 

Petya
Telerik team
 answered on 29 Jun 2015
5 answers
524 views
When using KeyboardNavigation.IsTabStop="true" in a RadMaskedInput textbox, you cannot shift-tab out of the control.
If I remove that it shift tabs OK.

Is that a bug?
Peshito
Telerik team
 answered on 29 Jun 2015
2 answers
128 views

Hello,

after updating to Q2 2015, I have a strange behavior on my ribbon: the first time a tab is displayed, the text of the buttons are not correct (they are slightly larger than they should do). This behavior dissappears after selecting another tab (which shows the same problem the first time) and coming back to the previous one.

Very strange...

Evgenia
Telerik team
 answered on 29 Jun 2015
6 answers
449 views

Hi Guys,

 

I'm doing a lot of work with data in multiple threads and the RadObservableCollection is a great little gem.

 

However I have discovered an a small bug in AddRange method of the RadObservableCollection that has major implications. The AddRange method does not honour the manually set SuspendNotifications state and calls ResumeNotifications inside the method without first checking if already suspended. Any UI thread bindings monitoring for updates hit a fatal error condition.

 

As a  paid subscriber I can change the code manually but this would mean I would have to manually patch every time when new releases are made available. Would it be possible to fix this oversight?

 

Thanks,

 

Graeme

 

Graeme
Top achievements
Rank 2
 answered on 29 Jun 2015
1 answer
194 views

Hi,

I’m trying to only allow certain character in some columns (for example no letter in a columns). I’ve manage to do this easily but getting access to the TextBox’s event in the PreparingCellForEdit event.

My issue is that it does not cover the TextInput EditTrigger value, since it that will overwrite the previous value of the field. I’ve managed to get the value (the letter that was typed) from the EditingEventArgs property of the GridViewPreparingCellForEditEventArgs in the PreparingCellForEdit event by casting it to a TextCompositionEventArgs and then reading the Text property but by then, cancelling the event doesn’t not prevent the editor from being display.

Is there a better solution? Ideally I would need the TextInput EditTrigger value in the BeginningEdit event.

 

Thanks

Ivan Ivanov
Telerik team
 answered on 29 Jun 2015
4 answers
279 views
I would like to see a Lookup edit control like this one:

http://community.devexpress.com/blogs/theprogressbar/archive/2010/10/12/new-lookup-editor-control-for-wpf-and-silverlight-coming-in-v2010-vol-2.aspx

I made one with the standard controls of wpf and its slow as hell.

Do you have plans for this control in near future?
Hristo
Telerik team
 answered on 29 Jun 2015
2 answers
135 views

Good day, I can not find event  DropDownOpened in DataFormComboBoxField.

How to track opening?

form
Top achievements
Rank 1
 answered on 29 Jun 2015
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
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?