Telerik Forums
UI for WPF Forum
3 answers
226 views
Hello,

I was wondering how can i have the checkbox "keep aspect ratio" in crop tool.

There is one easy way to do that?

By the way i couldn't find the documentation about this control.


Gilberto
Iva Toteva
Telerik team
 answered on 24 Jul 2012
1 answer
323 views
I've tried to no avail to remove the space between my header and the body of my document.  Is there any way to do this?  See my attached image.
Thanks in advance,
Steve

Martin Ivanov
Telerik team
 answered on 24 Jul 2012
1 answer
113 views
Hi telerik,

In my app I need to drag a row from at gridview onto a treeview.

When trying to drag, the cursor never changes to dragging-cursor. I'm a bit at a loss here.

I've tried to look at the example from "GridView Reorder Rows", but merging it over in my code has not produced the dragging cursor.


Can you confirm for me that it should be possible to drag from gridview to treeview?
Is it possible to construct a super simple example where it's done?

Internally in the treeview, I've got dragging working just fine -- the problem seems to be in allowing the dragging action to be initiated from gridview.

I'm still running Q1-release.

Thanks,

Anders, Denmark
Nick
Telerik team
 answered on 24 Jul 2012
1 answer
357 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
339 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
140 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
139 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
378 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
135 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
154 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
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?