Telerik Forums
UI for WPF Forum
3 answers
127 views
Have a touch screen app with a RadCarouselpanels populating a listbox.
(there are 3 usercontrols) . I only need to lock the scrolling on one of the usercontols.
So the user are able to use the touch features.

any thoughts?
Vanya Pavlova
Telerik team
 answered on 31 May 2012
3 answers
119 views

Hi,
I'm starting to use your RadCarousel control and I have got a problem.

I want to replace the horizontal buttons with a customized button with a picture.

How could I do this?

Thank you for your help.
 

Bea

Vanya Pavlova
Telerik team
 answered on 31 May 2012
1 answer
146 views
Hi,
    I have the following recurrence pattern string DTSTART:20120502T113000ZDTEND:20120502T123000ZRRULE:FREQ=MONTHLY;INTERVAL=16;BYMONTHDAY=2
I use this code to apply it to an appointment
                var pattern = new Telerik.Windows.Controls.ScheduleView.RecurrencePattern();
                if (Telerik.Windows.Controls.ScheduleView.ICalendar.RecurrencePatternHelper.TryParseRecurrencePattern(item.Recurrence_rule, out pattern))
                {
                    apt.RecurrenceRule = new Telerik.Windows.Controls.ScheduleView.RecurrenceRule(pattern);
}

When checking for occurennces it seems to occur every 12 months on day 2 and not every 16 months. In fact any month number over 12 seems always fall back to 12.

Is this a bug or have I got my logic wrong?
Thanks
Boyan
Telerik team
 answered on 31 May 2012
3 answers
332 views
I have a grid view that has about 450 items in it, with 8 columns on each item. There are 10 top-level nodes.

Expanding or collapsing at any level takes quite a while - click on the arrow, wait almost a second, then the change shows up in the grid. The speed doesn't seem to change depending on whether the tree is fully expanded or fully closed. The treelist is bound directly to a collection.

I did a quick profile, and it looks like it's spending most of it's time in:

Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureChild(class System.Windows.UIElement,valuetype System.Windows.Size,int32)

Any thoughts...
Vlad
Telerik team
 answered on 31 May 2012
1 answer
841 views
Hello,

I use standard WPF DataGrid for building of dynamically columns  in my 'dgFields'. I want to use telerik GridView.
If greatly simplify my code (for standard DataGrid) then I need similar for RadGridView:


dgFields.Columns.Add(new DataGridTextColumn { Binding = new Binding("Name"), Header = "Column name", IsReadOnly = true });
dgFields.Columns.Add(new DataGridTextColumn { Binding = new Binding("Header"), Header = "Header", IsReadOnly = true });
dgFields.Columns.Add(new DataGridCheckBoxColumn { Binding = new Binding("IsVisible"), Header = "Is Visible", IsReadOnly = false });
dgFields.Columns.Add(new DataGridTextColumn { Binding = new Binding("Description"), Header = "Description", IsReadOnly = true, MinWidth = 258 });
 
foreach (var column in myObject.HyperlinkColumns)
{
    var style = new Style(typeof(TextBlock));
    style.Setters.Add(new EventSetter(Hyperlink.ClickEvent, (RoutedEventHandler)EventSetter_OnHyperlinkClickEventHandler));
    dgFields.Columns.Add(new DataGridHyperlinkColumn { Binding = new Binding(column.Name), Header = column.Header, ElementStyle = style });
}


I need Text, Hyperlink and CheckBox columns with binding.

Thanks,
Dmitry
Vitaly
Top achievements
Rank 1
 answered on 31 May 2012
0 answers
175 views
Hello everyone,

I am currently programming an automation tool using the new native Microsoft UI
Automation API 3.0 (using VC++ 2010, native C++, Win7). The Application
Under Test (AUT) is a WPF application containing some Telerik controls
(particularly RadDocking, RadSplitContainer, RadGroup, RadPane).

UIA works fine - I can install event handlers, navigate through the tree,
search elements using various conditions and control the found elements
using their patterns.

However recently I encountered a behaviour that leaves me baffled: The UIA tree of
my AUT simply is not up-to-date after switching the central RadPane's
content.

After switching the RadPane's content, I can *see* the new controls in the
AUT's GUI but the UIA tree still reflects the controls that have been there
before. The (outdated) UIA sub-tree can be still completely read using UIA
search functions or using a UIA walker but of course it can not be written
since the underlying controls do not exist anymore.

I was not able to force an update of the the UIA sub-tree; neither by
calling any UIA functions nor by restarting the tester application or by
switching the RadPane's content back and forth.

The issue happens only if my tester application does access the
RadPane's UIA sub-tree before it is switched. I.e. the system seems to
memorize the RadPane's UIA sub-tree and keeps the old elements even after
switching the RadPane's content.

This exactly looks like there would be an outdated cache... however I do NOT
use any caching UIA functions at all. None. Never. Nowhere.

Currently I found only one mysterious, cumbersome way to update the RadPane's
UIA sub-tree reliably: Using one of the Microsoft tools "Inspect" or
"UISpy"! E.g. when using the Inspect tool having a brief look into RadPane's
UIA sub-tree (by click-expanding the corresponding node in the tree), the
problem is suddenly gone and my tester application can access the actual,
RadPane's up-to-date UIA sub-tree immediately! Of course this is a temporary
solution only.

I have no idea what Inspect/UISpy is doing to update the UIA tree of an
unrelated application.
Inspect.exe uses the same native interface as I do but UISpy.exe uses the
.NET interface AFAIK so this seems not to depend from the used Microsoft
API. BTW, the tool "Snoop" does not have this effect.

I really need help. Currently I am unable to locate the origin of the
problem. On the one hand this problem happens with Rad controls (and their
content) only, on the other hand the Microsoft tools seem to do the trick
somehow. So I suppose there is some detail I have to know when automating
Rad controls via UIA.

Does anyone have an idea how to approach the problem?

Thanks in advance,
Bernhard
Bernhard
Top achievements
Rank 1
 asked on 30 May 2012
1 answer
95 views
If I add a Column Header or Footer to a GridViewColumn an InvaidOperationException is thrown with a message of "Specified element is already the logical child of another element. Disconnect it first." when I attempt to change the Theme. If I comment out the footer, there is no exception and the theme changes as expected.

Below is the xaml for the RadGridView and following that is the exception details.

<telerik:RadGridView AutoGenerateColumns="False"
                     Width="498"
                     ShowGroupPanel="False"
                     Margin="0,5,0,0"
                     Height="200"
                     ItemsSource=" "
                     ShowColumnFooters="True"
                     telerik:StyleManager.Theme="{Binding TelerikTheme}">
    <telerik:RadGridView.Columns>
        <telerik:GridViewColumn Header="Period"
                                Width="150">
            <telerik:GridViewColumn.CellTemplate>
                <DataTemplate>
                    <TextBlock Text="Some Data" />
                </DataTemplate>
            </telerik:GridViewColumn.CellTemplate>
            <telerik:GridViewColumn.Footer>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="Period Range"
                               FontWeight="Bold" />
                </StackPanel>
            </telerik:GridViewColumn.Footer>
        </telerik:GridViewColumn>
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

System.InvalidOperationException was unhandled
  Message=Specified element is already the logical child of another element. Disconnect it first.
  Source=PresentationFramework
  StackTrace:
       at System.Windows.FrameworkElement.ChangeLogicalParent(DependencyObject newParent)
       at System.Windows.FrameworkElement.AddLogicalChild(Object child)
       at System.Windows.Controls.ContentControl.OnContentChanged(Object oldContent, Object newContent)
       at System.Windows.Controls.ContentControl.OnContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       at Telerik.Windows.Controls.GridView.GridViewFooterRow.PrepareCellProperties(GridViewFooterCell cell, GridViewColumn column) in c:\TB\105\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\Rows\GridViewFooterRow.cs:line 277
       at Telerik.Windows.Controls.GridView.GridViewFooterRow.PrepareCell(GridViewCellBase cellBase, GridViewColumn column) in c:\TB\105\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\Rows\GridViewFooterRow.cs:line 220
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.PrepareCell(GridViewCellBase cell, GridViewColumn column) in c:\TB\105\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 410
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.GetVirtualizedCell(GridViewColumn column, Boolean createIfNull) in c:\TB\105\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.Virtualization.cs:line 399
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.RealizeAndMeasureCells(Int32 startIndex, Int32 predictedLastIndex, Func`2 calculateNextIndex) in c:\TB\105\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.Virtualization.cs:line 334
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.UpdateVirtualizedCells() in c:\TB\105\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.Virtualization.cs:line 269
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.MeasureOverride(Size availableSize) in c:\TB\105\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 306
       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.ItemsPresenter.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.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
       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.Control.MeasureOverride(Size constraint)
       at Telerik.Windows.Controls.GridView.GridViewRowItem.MeasureOverride(Size constraint) in c:\TB\105\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\Rows\GridViewRowItem.cs:line 215
       at Telerik.Windows.Controls.GridView.GridViewFooterRow.MeasureOverride(Size availableSize) in c:\TB\105\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\Rows\GridViewFooterRow.cs:line 172
       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)
       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.ScrollViewer.MeasureOverride(Size constraint)
       at Telerik.Windows.Controls.GridView.GridViewScrollViewer.MeasureOverride(Size constraint) in c:\TB\105\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\ScrollViewer\GridViewScrollViewer.cs:line 179
       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)
       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.Control.MeasureOverride(Size constraint)
       at Telerik.Windows.Controls.GridView.GridViewDataControl.MeasureOverride(Size constraint) in c:\TB\105\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 6576
       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.RenderMessageHandler(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)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       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.WrappedInvoke(Delegate callback, 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.Application.RunInternal(Window window)
       at System.Windows.Application.Run()
       at AM.NET.App.Main() in C:\Dev\Genesis\AM.NET\AM.NET\obj\Debug\App.g.cs:line 50
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
       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.Threading.ThreadHelper.ThreadStart()
  InnerException:

Hopefully there is a work around.

Thank you in advance
Steve
Steve
Top achievements
Rank 1
 answered on 30 May 2012
5 answers
157 views
Hello,

I am using your (Telerik) Bar_Rating_WPF custom control for bar graph style ratings. Everything displays well and the click action selects the proper rating bar. Where I am having difficulty is setting or getting a value. I don't see how I can set a datacontext?

FWIW I add the control at runtime:
Bar_Rating_WPF uctrl_ConfOpn = new Bar_Rating_WPF();
grd_ConfOpn.Children.Add(uctrl_ConfOpn);

I'm not going to put the whole source code for the Bar_Rating_WPF user control here as 1. it came from you (Telerik) and 2. it's quite lengthy.

Thank You
JB

Tina Stancheva
Telerik team
 answered on 30 May 2012
1 answer
139 views
Hello!

We have issue with RadWindow used as dialog. This problem is observed on Windowx XP only (we checked on two different computers). It's not observed in Windows 7 (we also checked on two different computers). The issue looks like this: 
  • Show modal dialog with title.
  • Press ALT+Tab
  • See empty text in Alt Tab manager (see screen shot)
We need to solution for Windows XP which eliminates observed effect. 


Georgi
Telerik team
 answered on 30 May 2012
6 answers
337 views
Hi,

We are having a slight issue trying to find a solution for the following issue:

We have a Horizontal Bar Chart, using the RadChart in WPF, and have set the screen up so that the chart proportionally resizes with the resizing of the screen.  The issue that we have is that although we can manually set the ScrollMode, RangeStart and RangeEnd so that the axis labels and the chart values are clearly visible and do not overlap, when the user resizes the screen (and subsequently the chart) the axis labels start to overlap and we loose some of the bar values.

Ideally we are looking for a solution that would allow the chart to dynamically set the ScrollMode, RangeStart and RangeEnd values so that the bars on the chart are always shown at the optimal height to remain clear (or to abide to a minimum height).

Any help on this would be greatly appreciated.

Thanks in advanced

Carl
PSP IT Design & Development
Carl
Top achievements
Rank 1
 answered on 30 May 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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?