Telerik Forums
UI for WPF Forum
2 answers
458 views

On my development, each navigationView Item will display a page which is defined by an User control. When user click items on left-hand side, corresponding page is displayed on right-hand side.

Now considering following case:

  • User is working on a page (let's call it GRID page) which shows a few grids and some input editors. User rearranges columns of a grid; user selects a few rows of a grid; user inputs some texts on editor
  • User clicks another NavigationView item to look for some information on another page;
  • User switches back to GRID page, and he will discover that all the changes he just made are gone. Every thing goes back to initial state.

Debugging told me that the user control of GRID page is re-created whe user switched back to GRID page

My questions:

  1. Instead of destroying/creating pages, is that a way to hide/show pages when use switch pages?
  2. If this is impossible, how can I perserve the status of a page so that user can go back and continue working on it.

Thanks.

zigzag
Top achievements
Rank 1
 answered on 07 Oct 2019
2 answers
184 views

I need to pass multiple values into the i value converter but since multibinding isn't an option for DataMemberBinding I decided to pass the whole type into the converter as seen below: (I tried to only put the relevent code here)

                <telerik:GridViewDataColumn Header="{x:Static properties:Resources.Value}" DataMemberBinding="{Binding Converter={StaticResource myConverterSelector}}" TextAlignment="Center" HeaderTextAlignment="Center"  DataType="{x:Type sys:Double}" UniqueName="Value">

 

        public class MyConverterSelector : IValueConverter
    {
        public object Convert(object item, Type targetType, object parameter,
            System.Globalization.CultureInfo culture)
        {
            TabularTag tag = item as TabularTag;
            if (tag != null)
            {
                if (tag.Format == "Float" || tag.Format.Contains("REAL") || tag.Format == "")
                {

                    double parsedVal;
                    if (Double.TryParse(tag.Value.ToString(), out parsedVal))
                    {
                        return parsedVal.ToString("f3", CultureInfo.InvariantCulture);
                    }
                }
                else
                {
                    double parsedVal;
                    if (Double.TryParse(tag.Value.ToString(), out parsedVal))
                        return parsedVal.ToString("f0", CultureInfo.InvariantCulture);
                }
            }
            return null;
        }

        public object ConvertBack(object item, Type targetType,
            object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotSupportedException();
        }
    }

 

This works great on the cell data but the filter for this column ends up empty (I attached a snapshot of this) I tried using CellTemplate instead to edit the data but this doesn't affect the filter, which needs to match.

Jessica
Top achievements
Rank 1
 answered on 07 Oct 2019
4 answers
767 views

Hello, I want to use WebBrowser in RadWindow. I know that I need to set AllowTransparency="False". With Fluent theme it works good but with Crystal theme it looks ugly. I tried to set CrystalPalette.Palette.CornerRadius = new CornerRadius(0) but there is still some border around window. How to make it fill all the window like in some other theme like Fluent?

Vicky
Telerik team
 answered on 07 Oct 2019
3 answers
334 views

Hi,

I'm trying to get a simple test app up and running with the following functionality:

A main window with an empty docking container.

A dockable view pane that is created on the fly.  (Where multiple panes are created as needed.)

So far I have this for my main window:

<telerik:RadDocking x:Name="radDocking" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,22,0,0">
    <telerik:RadDocking.DocumentHost>
        <telerik:RadSplitContainer>
            <telerik:RadPaneGroup x:Name="PrimaryGroup">
            </telerik:RadPaneGroup>
        </telerik:RadSplitContainer>
    </telerik:RadDocking.DocumentHost>
</telerik:RadDocking>

And this for my dockable pane:

<telerik:RadPane Header="Test View">
</telerik:RadPane>

Where my main window is a <Window> and my view is a <UserControl>.

This gives me an empty window, and I can create views through the main window's main menu.  The views are created and docked as follows:

AquaView view = new AquaView();
PrimaryGroup.Items.Add( view );

Which gives me almost what I want - the views are created and docked in the main window by default.  (The text on the tab is missing, but I can figure that out later.)  The problem I am having now is any attempt to undock one of those views by dragging its tab results in a crash with the following callstack:

>   PresentationFramework.dll!System.Windows.Window.GetWindow(System.Windows.DependencyObject dependencyObject) + 0x76 bytes    
    Telerik.Windows.Controls.dll!Telerik.Windows.Controls.ApplicationHelper.TransformToScreenRoot(System.Windows.UIElement target) Line 251 + 0x8 bytes C#
    Telerik.Windows.Controls.Docking.dll!Telerik.Windows.Controls.RadDocking.GetElementPositionAtScreenRoot(System.Windows.UIElement element) Line 1456 + 0x8 bytes C#
    Telerik.Windows.Controls.Docking.dll!Telerik.Windows.Controls.RadDocking.OnDockingElementDragged(System.Windows.Point globalPosition, object draggedElement) Line 607 + 0x25 bytes  C#
    Telerik.Windows.Controls.Docking.dll!Telerik.Windows.Controls.RadDocking.OnDockingElementDragged(object sender, Telerik.Windows.Controls.Docking.DragInfoEventArgs e) Line 955  C#
    Telerik.Windows.Controls.Docking.dll!Telerik.Windows.Controls.Docking.DragInfoEventArgs.InvokeEventHandler(System.Delegate genericHandler, object genericTarget) Line 49    C#
    PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target) + 0x29 bytes  
    PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target, System.Windows.RoutedEventArgs routedEventArgs) + 0x3e bytes    
    PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised) + 0xbe bytes   
    PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args) + 0x79 bytes  
    PresentationCore.dll!System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs e) + 0x17 bytes 
    Telerik.Windows.Controls.Docking.dll!Telerik.Windows.Controls.Docking.DraggableItemHelper.OnDragDelta(System.Windows.Point globalMousePosition, System.Windows.Rect initialRect, System.Windows.Rect destinationRect, bool isResize) Line 32    C#
    Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.InternalWindow.DragBehavior.OnElementMouseMove(object sender, System.Windows.Input.MouseEventArgs e) Line 149 + 0xa3 bytes C#
    PresentationCore.dll!System.Windows.Input.MouseEventArgs.InvokeEventHandler(System.Delegate genericHandler, object genericTarget) + 0x34 bytes  
    PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target) + 0x29 bytes  
    PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target, System.Windows.RoutedEventArgs routedEventArgs) + 0x3e bytes    
    PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised) + 0xbe bytes   
    PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args) + 0x79 bytes  
    PresentationCore.dll!System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs args) + 0x41 bytes   
    PresentationCore.dll!System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs args, bool trusted) + 0x2c bytes    
    PresentationCore.dll!System.Windows.Input.InputManager.ProcessStagingArea() + 0x1ff bytes   
    PresentationCore.dll!System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs input) + 0x45 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) + 0x2c2 bytes 
    PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.FilterMessage(System.IntPtr hwnd, MS.Internal.Interop.WindowMessage msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0x1d3 bytes 
    PresentationCore.dll!System.Windows.Interop.HwndSource.InputFilterMessage(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0x75 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) + 0x7d bytes    
    WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) + 0x53 bytes 
    WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source, System.Delegate method, object args, int numArgs, System.Delegate catchHandler) + 0x42 bytes    
    WindowsBase.dll!System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs) + 0xb4 bytes    
    WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) + 0x104 bytes    
    [Native to Managed Transition]  
    [Managed to Native Transition]  
    WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame) + 0xc1 bytes  
    WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame frame) + 0x49 bytes  
    PresentationFramework.dll!System.Windows.Application.RunDispatcher(object ignore) + 0x5b bytes  
    PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window) + 0x74 bytes 
    PresentationFramework.dll!System.Windows.Application.Run(System.Windows.Window window) + 0x2b bytes 
    PresentationFramework.dll!System.Windows.Application.Run() + 0x1b bytes 
    AquaViewPro.exe!AquaViewPro.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) + 0x6d bytes    
    Microsoft.VisualStudio.HostingProcess.Utilities.dll!Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() + 0x2a bytes  
    mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state) + 0x63 bytes   
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool ignoreSyncCtx) + 0xb0 bytes    
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x2c bytes    
    mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() + 0x44 bytes   
    [Native to Managed Transition]  

The output window of Visual Studio has the following (extremely unhelpful) message:

An unhandled exception of type 'System.ArgumentNullException' occurred in PresentationFramework.dll
Additional information: Value cannot be null.

So, I'm wondering what it is I'm missing, or does the WPF docking library not support creating views dynamically?  (All the samples and examples I've seen do only seem to build static GUIs where all the components are known at compile time.)

Regards,

James

Hans
Top achievements
Rank 1
Veteran
 answered on 07 Oct 2019
2 answers
70 views

Hello,

I need some assistance identifying one last piece that I would like to remove.  I'm not really sure what this is (I'm new to Telerik), so I included a screenshot.  Whatever this is, it can be dragged to each of the columns.  I would like to remove it.

Thanks!

Scott
Top achievements
Rank 1
 answered on 04 Oct 2019
1 answer
122 views
In Form1 I take the BackColor with RadColor Dialog and in the second Form I use a ConditionalFormattingObject. How do I pass the Cell.BackColor of the first Form to the Form2?
Nadya | Tech Support Engineer
Telerik team
 answered on 04 Oct 2019
1 answer
312 views

Hi Telerik,

 

I'mu using a base class with all proerties which are overridable :

Public Class SelectionDetailItemViewModel
        Inherits ViewModelBase
 
        Public Overridable Property Children As New ObservableCollection(Of SelectionDetailItemViewModel)
        Public Overridable Property Reference As String
        Public Overridable Property Name As String
 
        'Other properties .....

 

I have 2 classes A & B which inherit of SelectionDetailItemViewModelA class has children of type of A & B.

The ItemSource is bound to a ObservableCollection(Of SelectionDetailItemViewModel). For each column, the filter panel has all column values but select a value doesn't filter the RadTreeListView. There the following error :

System.Windows.Data Error: 8 : Cannot save value from target back to source. BindingExpression:Path=IsActive; DataItem='DistinctValueViewModel' (HashCode=63240628); target element is 'CheckBox' (Name=''); target property is 'IsChecked' (type 'Nullable`1') ArgumentException:'System.ArgumentException: La valeur "((Name IsEqualTo er 2d2 MC)) AND ((Name IsEqualTo <Unset>) AND (Name IsEqualTo <Unset>))" n'est pas de type "Telerik.Windows.Data.IFilterDescriptor" et ne peut pas être utilisée dans cette collection générique.
Nom du paramètre : value
   Ã  System.ThrowHelper.ThrowWrongValueTypeArgumentException(Object value, Type targetType)
   Ã  System.Collections.ObjectModel.Collection`1.System.Collections.IList.Insert(Int32 index, Object value)
   Ã  Telerik.Windows.Data.CollectionHelper.Insert(IList target, IEnumerable newItems, Int32 startingIndex, IEqualityComparer itemComparer)
   Ã  Telerik.Windows.Data.ObservableCollectionManager.HandleCollectionChanged(IList sender, NotifyCollectionChangedEventArgs args)
   Ã  Telerik.Windows.Data.ObservableCollectionManager.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs args)
   Ã  Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
   Ã  System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   Ã  System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   Ã  Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   Ã  Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   Ã  System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
   Ã  Telerik.Windows.Data.RadObservableCollection`1.InsertItem(Int32 index, T item)
   Ã  Telerik.Windows.Data.FilterDescriptorCollection.InsertItem(Int32 index, IFilterDescriptor item)
   Ã  System.Collections.ObjectModel.Collection`1.Add(T item)
   Ã  Telerik.Windows.Controls.GridViewColumn.OnColumnFilterDescriptorPropertyChanged(Object sender, PropertyChangedEventArgs e)
   Ã  Telerik.Windows.Data.DescriptorBase.OnPropertyChanged(PropertyChangedEventArgs args)
   Ã  Telerik.Windows.Data.DescriptorBase.OnPropertyChanged(String propertyName)
   Ã  Telerik.Windows.Data.DescriptorBase.ResumeNotifications()
   Ã  Telerik.Windows.Controls.GridView.FilteringViewModel.ApplyFilters()
   Ã  Telerik.Windows.Controls.GridView.FilteringViewModel.OnDistinctValuesChanged()
   Ã  Telerik.Windows.Controls.GridView.FilteringViewModel.OnDistinctValuesItemChanged(Object sender, ItemChangedEventArgs`1 e)
   Ã  Telerik.Windows.Data.ObservableItemCollection`1.RaiseGenericItemChanged(ItemChangedEventArgs`1 e)
   Ã  Telerik.Windows.Data.ObservableItemCollection`1.OnItemChanged(ItemChangedEventArgs`1 e)
   Ã  Telerik.Windows.Data.ObservableItemCollection`1.Telerik.Windows.Data.IWeakEventListener<System.ComponentModel.PropertyChangedEventArgs>.ReceiveWeakEvent(Object sender, PropertyChangedEventArgs args)
   Ã  Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
   Ã  System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
   Ã  Telerik.Windows.Controls.ViewModelBase.OnPropertyChanged(String propertyName)
   Ã  Telerik.Windows.Controls.GridView.DistinctValueViewModel.set_IsActive(Boolean value)'

 

Have you got any idea ?

Thanky you.

Martin Ivanov
Telerik team
 answered on 04 Oct 2019
3 answers
1.4K+ views

The data binding of the RadRichTextBox does not work. What am I wrong about?

Document Class:

01.public class Document : INotifyPropertyChanged
02.{
03.   private Guid _id = Guid.NewGuid();
04.   private string _title = "New Document";
05.   private string _description
06.   ....
07.   public string Description
08.   {
09.     get { return _description; }
10.     set
11.     {
12.       _description = value;
13.       NotifyPropertyChanged("Description");
14.     }
15.   }
16.}

RadRichTextBox in XAML:

01.<telerik:WizardPage x:Name="DescriptionPage" HeaderTemplate="{StaticResource headerTemplate}" BorderThickness="0">
02.....
03.  <telerik:RadRichTextBox x:Name="DocumentDescriptionTextBox" Grid.Row="2" Grid.Column="1"  Margin="10" Height="200"                                       
04.              IsSpellCheckingEnabled="True"
05.              IsContextMenuEnabled="True"
06.              IsSelectionMiniToolBarEnabled="False"
07.              IsImageMiniToolBarEnabled="False"  
08.              AllowScaling="False"
09.              DocumentInheritsDefaultStyleSettings="True"
10.                          PreviewEditorKeyDown="RichTextBox_PreviewEditorKeyDown"/>
11.  <telerik:TxtDataProvider RichTextBox="{Binding ElementName=DocumentDescriptionTextBox}"
12.               Text="{Binding Path=Description, Mode=TwoWay}"/>
13.....
14.</telerik:WizardPage>

 

Assignment of the DataContext:

1.....
2.this.DescriptionPage.DataContext = _document;
3.....

 

Martin
Telerik team
 answered on 04 Oct 2019
13 answers
627 views
Hello Telerik,

Currently I'm evaluating RadChartView control for task of rendering huge data collections (millions of points) as line charts.
I need the following chart behavior:
- show brief charts when no Zoom
- show precise charts when Zoom is on (greater precise for greater zoom values)
- scrolling should work always on all data (no input data cut is possible though)
- everything should work relatively fast (especially on scrolling)

I know how to achieve part of requirements using ChartDataSource, but I can't understand if it's possible to implement such dynamic adaptive data sampling on zooming and with proper scrolling support.

Could you please advise if it's possible? Is this feature planned? Can it be done using RadChart instead of RadChartView (with good performance on millions of raw data objects)?

Thanks.
Martin Ivanov
Telerik team
 answered on 04 Oct 2019
1 answer
334 views

Hi,

I tacked this message onto an old thread and realized, 3 days later, that might not be the wisest course. Hi Martin,

Just updated my VS to the Net Core 3.0 release. Also updated Telerik. But I cannot get the Telerik Controls to show up in the toolbox when I create a Core project, despite following the installation instructions including manual installation. Note, everything works fine if I create a .NET Framework project

Any thoughts?

Wayne

Yana
Telerik team
 answered on 04 Oct 2019
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
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?