Telerik Forums
UI for WPF Forum
1 answer
361 views
Trying to understand how recent documents works I looked at your teams demo for RibbonView and i cannot understand where template are coming from

<common:RecentDocuments x:Key="RecentDocuments" />
<common:RecentPlaces x:Key="RecentPlaces" />
<common:AvailableTemplates x:Key="AvailableTemplates" />
<common:HelpItems x:Key="HelpItemsTemplate" />
Lines showed above
<StackPanel Margin="15 15 0 0">
       <TextBlock Text="Recent Documents" FontSize="14" FontWeight="Bold" Margin="0 0 0 2" />
       <Rectangle Height="1" Fill="{StaticResource DottedLineBrush}" />
       <ItemsControl ItemsSource="{StaticResource RecentDocuments}" Margin="0 4 0 0"
                ItemTemplate="{StaticResource RecentDocumentTemplate}" />
</StackPanel>

And can you help me in understanding how ItemsControl work or direct me where can I learn about this

Thanks in advance
Miro Miroslavov
Telerik team
 answered on 24 Jul 2012
1 answer
342 views
Seems that AddHandler for a FrameworkElementFactory won't work, event are never called ...

here follows the test code

foreach (var c in radGridViewTest.Columns)

            {


                        var factory = new FrameworkElementFactory(typeof(Button), "myButton");

                        factory.SetValue(CursorPropertyCursors.Hand); // OK

                        factory.SetBinding(ContentPropertynew Binding(string.Format("[{0}]"4))); //OK

                        c.CellTemplate= new DataTemplate();

                        

                        var mh = new RoutedEventHandler(onClick);

                        factory.AddHandler(Button.ClickEventmh,true); // won't work ...

                        c.CellTemplate.VisualTree = factory;

                        c.CellTemplate.Seal();
            }


Ivan Ivanov
Telerik team
 answered on 24 Jul 2012
4 answers
144 views
I only get this some times (making it more annoying), but it seems like a bug in the OhlcSeriesRoundLayoutContext.SnapPointToGrid functionality. I need to be able to change the min/max of the vertical axis. Is there any way to turn off the snapping behaviour so it doesn't try to do it and thus doesn't break? Or is this something else doing it? I need to get this working rather soon. 


exception attached:

System.ArgumentOutOfRangeException was unhandled
  Message=Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
  Source=mscorlib
  ParamName=index
  StackTrace:
       at System.ThrowHelper.ThrowArgumentOutOfRangeException()
       at System.Collections.Generic.List`1.get_Item(Int32 index)
       at System.Collections.ObjectModel.Collection`1.get_Item(Int32 index)
       at Telerik.Charting.OhlcSeriesRoundLayoutContext.SnapToLowGridLine(OhlcDataPoint point)
       at Telerik.Charting.OhlcSeriesRoundLayoutContext.SnapPointToGrid(OhlcDataPoint point)
       at Telerik.Charting.OhlcSeriesModel.ApplyLayoutRounding()
       at Telerik.Charting.CartesianChartAreaModel.ApplyLayoutRounding()
       at Telerik.Charting.ChartAreaModelWithAxes.ArrangeOverride(RadRect rect)
       at Telerik.Charting.ChartNode.Arrange(RadRect rect, Boolean shouldRoundLayout)
       at Telerik.Charting.ChartAreaModel.Arrange()
       at Telerik.Windows.Controls.ChartView.RadChartBase.UpdateChartArea()
       at Telerik.Windows.Controls.ChartView.RadChartBase.CallUpdateUI()
       at Telerik.Windows.Controls.ChartView.RadChartBase.OnInvalidated()
       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.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
       at MyApplication.App.Main() in D:\Work\MyApplication\MyApplication
\obj\x86\Debug\App.g.cs:line 0
  InnerException: 

Evgenia
Telerik team
 answered on 24 Jul 2012
4 answers
144 views
Hi,
     I am trying to remove the readonlyrange in richtextbox. I have selection for that but the method provided in WPF requires a readonly field ReadonlyRangeStart. How can I get this field from selection. or is there any other way to deal with this problem thanks.


In richtextbox I have selection of single word or paragraph. and need to extract readonlyrangestart field for method editor.document.deletereadonlyrange(readonlyrangestart);.

Thanks.
muhammad
Top achievements
Rank 1
 answered on 24 Jul 2012
5 answers
383 views
Hi,

i add a ClickHandler to a CheckBox in a GridViewDataColumn in Codebehind. But this dont fired the Handler when i click the CheckBox.
Can you please show me the right way to do this?

Thank You
.

Here a Code Snippet

col = new GridViewDataColumn
                            {
                                Header = vspriorities[key],
                                CellTemplate = new DataTemplate()
                            };
  
  
                            cbx = new FrameworkElementFactory(typeof(CheckBox)); ;
                                cbx.SetValue(IsHitTestVisibleProperty, true);
                                cbx.SetValue(FocusableProperty, true);
                                cbx.SetValue(TagProperty, null);
                                cbx.SetValue(MarginProperty, new Thickness(0, 0, 0, 0));
                                cbx.SetValue(TagProperty, key);
                                cbx.SetBinding(DataContextProperty, new Binding());
                                cbx.SetBinding(CheckBox.IsCheckedProperty, new Binding("PrioritaetId") { ConverterParameter = key, Converter = (IValueConverter)TryFindResource("EqualsConverter"), Mode = BindingMode.OneTime });
  
                                //cbx.AddHandler(GridViewCheckBox.ClickEvent, new RoutedEventHandler(VSPriority_Checked));
  
                                cbx.AddHandler(CheckBox.ClickEvent, new RoutedEventHandler (VSPriority_Checked));
  
                             
  
                                //templBorder = new FrameworkElementFactory(typeof(Border));
                                //templBorder.SetValue(StyleProperty, TryFindResource("GridBorder"));
                                  
                                //templBorder.AppendChild(cbx);
  
  
  
                            col.CellTemplate.VisualTree = cbx;
                            col.CellTemplate.Seal();
                           
  
                            StatusColumns.Add(col);
  
                            lvData.Columns.Insert(idx++, col);
Pasquale Zirpoli
Top achievements
Rank 1
 answered on 24 Jul 2012
1 answer
141 views
Hello,
I found a bug (almost comical) that prevents me from moving a task in the gantt chart.  I have tasks A,B,C,and D.  Task B is a child of task A.  Task B depends on task D (via a dependency arrow).  I would like to move task B from being the child of A to being the child of C.

When I do A.Children.Remove(B), I get a "key not found exception" in your code, which I assume means that it couldn't find the other end of the dependecy arrow from D to B.  In order words, I can't remove B because of the arrow.  However, if I do C.Children.Add(B), then I get a "element already exists".  In order words, I can't add B twice.  Conclusion: B cannot be moved without deleting all of its dependency arrows, and likely all arrows on other tasks that point to B.

In order words, B cannot be moved.

It would take too long (computationally) to find and delete all dependency arrows before moving the task, only to recreate them afterwards.  This problems relates to my other query about disabling grouping until all I finish changing the structure.

Thanks,
Eric
Miroslav Nedyalkov
Telerik team
 answered on 24 Jul 2012
1 answer
158 views
Hi,

I set RadMaskedNumericInput's UpdateValueEvent="PropertyChanged" and want to update source propertyChanged. It worked correct if I type any words, but when lose focus, it always update the source again no matter whether change its value. This condition only appear when source property is float or double, never see it when integer. Please give a hand. Thanks very much.
Tina Stancheva
Telerik team
 answered on 24 Jul 2012
1 answer
110 views
I have a fairly simple scenario. In XAML, I've defined a RadDocking control. Within that control, I have a few RadSplitContainers. Within each of those contianers, I have a RadPaneGroup defined. That's the end of the xaml. In code, I dynamically add a pane to the RadPaneGroup that contains a usercontrol. I'm using the RadPaneGroup.AddItem method to do this. In the debugger, I see the new item, but when the window is rendered, there are no panes with content rendered. Is there something else I need to do in order to add panes programatically to pane groups?

Thanks in advance...
-Tony
Tony
Top achievements
Rank 1
 answered on 24 Jul 2012
16 answers
1.1K+ views
In my gridview, I only allow unique combination of values in three of my columns.  However, I want to allow the user to "clone" an existing row, and change the values in the other columns (those not constrained).  How can I copy a new row, and initially show the new row to be in an invalid state?  When I copy a new row now, it appears to be just another, valid row.

Note: The RowValidating event only seems to fire when I've completed an edit on that row.  I need something similar, but outside the scope of editing.
Vic
Top achievements
Rank 1
Iron
 answered on 23 Jul 2012
3 answers
172 views
Hi Telerik Team,

My application has multiple RadPanes, each RadPane has one or more RadGridView(s). I'm looking for a way to export all the RadGridViews on these RadPanes to an Excel files.
Currently, I'm only able to export the RadGridviews on the active RadPane which requires me to click on each RadPanes before exporting in order to export all the RadGridView. For example, I have 3 RadPanes, if I want to export all the RadGridViews in these RadPanes I have to click on these RadPanes one by one before exporting. If I don't do that I will only be able to export the GridViews on the active RadPane, but not all. 

Is there a solution for this? Thank you.    
Nick
Telerik team
 answered on 23 Jul 2012
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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?